Jump to content

dman

Member
  • Posts

    708
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Posts posted by dman

  1. Cyber,

    Your "reversestring" function is clever, but I think not necessary. Try the InStrRev function, it was made to search backwards. try this.....

    Public Sub FindNext(ByVal Value, ByVal Direction, ByVal CaseSensative)
           If Value IsNot Nothing Then ' Only run if Search String is not Null
               ' Set The CaseSensative to the appropriate Search Method
               If CaseSensative = False Then
                   CaseSensative = CompareMethod.Text
               Else
                   CaseSensative = CompareMethod.Binary
               End If

               ' Set Search Start Location Based on Selection Length
               Dim varPosition As Integer = frmNotepad.txtNotepad.SelectionStart + frmNotepad.txtNotepad.SelectionLength

               ' Search for the Text In the specified Direction from the text cursor
               Dim lengthPosition As Long ' Declare Search Result Variable

               If Direction = "Down" Then
                   lengthPosition = InStr(varPosition + 1, frmNotepad.txtNotepad.Text, Value, CaseSensative) 'Find Value After Caret varPosition
               Else
                   If frmNotepad.txtNotepad.SelectionStart > 0 Then
                       lengthPosition = InStrRev(frmNotepad.txtNotepad.Text, Value, frmNotepad.txtNotepad.SelectionStart, CaseSensative) 'Find Value After Caret varPosition
                   End If
               End If

               ' Select Searched Text
               If lengthPosition > 0 Then
                   frmNotepad.txtNotepad.SelectionStart = lengthPosition - 1 ' Move Caret to Start of Text
                   frmNotepad.txtNotepad.SelectionLength = Len(Value) ' Set Length of Selection to the Search String
               Else
                   MsgBox("Cannot find " + Chr(34) + varFind + Chr(34), MsgBoxStyle.Information) ' Display Message if no more Instances of Search String in Specified Direction or None at all
               End If
               CaretRefresh(frmNotepad.txtNotepad) ' Scroll txtNotepad to Caret Position
               SetCharacterPosition() ' Update Line / Character in Status Bar
           End If
       End Sub

  2. ok its been a month and i was wondering if anyone would be able todo this for me. i know its not to difficult todo but i have no programming skills unfortunately.

    If this is easy please tell how you believe it can be done. You can reshack the dll and change the icon pictures, but then they will perform wrong function when clicked. The dll is compiled and no source available, so can't recode it. Unless I am missing something it's not that easy.

  3. no, no central computer. like ring said, connect broadband modem to switch uplink, pc's to other switch ports. as long as switch is powered any or all computers can be on or off.

  4. If I understand the question correctly, answer is yes... you can share internet connection with switch. Like you say, only one can transmit at a time on hub, switch is full duplex, more like smart bridge than hub.

  5. Your editor looks just as you described you would make it... clean, simple and functional. I like it.

    Problem #1. Cursor position starts at 0 but instr() function would consider that place in string to be 1. Just add 1 to varPosition in this function and should work OK

    If Direction = "Down" Then
       lengthPosition = InStr(varPosition + 1, frmNotepad.txtNotepad.Text, Value, CaseSensative) 'Find Value After Caret varPosition
    Else
      .....

    I try to take a look at looparound problem tomorrow.

    Cya

  6. I heard that it is. I have tried a few times but will keep on trying. Practice makes perfect right? What is the dif between a cmd. and batch. I can convert a txt to both?

    Basically they are the same, except win9x does not support .cmd

    It is mainly a naming convention then. Scripts that use NT-Only functions should be named .cmd, while scripts that can also run on win 9x should be named .bat.

  7. Rather than creating a dsn, try using a dsnless connection.

    You pass all connection info as as string in your code.

    To create your connections, create a text file and name myconn.udl. Then in properties set all of the correct parameters and save it, then open in text editor to get the connection string that you will use in your code.

    google "ado dsnless connection" for more info.

    you could also set the connection to use the .udl file itself and include it in your install.

×
×
  • Create New...