Results 1 to 9 of 9

Thread: replaing this: | with this: _

  1. #1

    Thread Starter
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Err.. huh?

    You want to swap the pipe character '|' with the underscore character'_' in a text box?
    Harry.

    "From one thing, know ten thousand things."

  2. #2
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    yea
    NXSupport - Your one-stop source for computer help

  3. #3

    Thread Starter
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Text1.Text = Replace(Text1.Text, "|", "_")
    Harry.

    "From one thing, know ten thousand things."

  4. #4
    Guest
    he means he wan'ts to replace the Carrot(blinking I)
    with a blinking underscore.... like in DOS

  5. #5

    Thread Starter
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Ohhh I seeeee, the ibeam Sorry, I didn't know what you were on about, I thought you meant the pipe character.

    No idea mate
    Harry.

    "From one thing, know ten thousand things."

  6. #6
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    Try using the WinAPI caret functions to change it. Dan Appleman's book Visual Basic Programmer's Guide to the Win32 API is a great reference for creating your own carets.
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  7. #7
    Guest
    Use the CreateCaret() function. Add the following code to a Form with a PictureBox and a TextBox. In the PictureBox, load a picture of how you want the caret to look.
    Code:
    Private Declare Function CreateCaret Lib "user32" (ByVal hwnd As Long, ByVal hBitmap As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long
    Private Declare Function ShowCaret Lib "user32" (ByVal hwnd As Long) As Long
    
    Private Sub Text1_GotFocus()
        CreateCaret Text1.hwnd, Picture1.Picture, 0, 0
        ShowCaret Text1.hwnd
    End Sub

  8. #8
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    that works perfectly, but it appears on TOP of the text, how do I get it to appear at the bottom of the text
    NXSupport - Your one-stop source for computer help

  9. #9
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    Try turning the picture for the caret upside down.
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width