Results 1 to 6 of 6
  1. #1
    New Lounger
    Join Date
    Aug 2002
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cursor Problem (VB6/Word2000)

    Hello all,

    I have a richtext box on a form. The form is always on top of a Word
    document, but the Word document is the active window at any point of time,
    hence the form is inactive, but it can seen by the user. My problem is, even tough
    the Form and hence the RichtextBox is inactive I need to show the cursor on
    the Richtext box . How do I do that ?Can I fake a cursor so that It looks like the cursor is
    there, whether the form is active or not......Any code will be of great use.
    Please Help........

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Cursor Problem (VB6/Word2000)

    Just an idea:

    Create a graphic that looks like the vertical bar cursor -- I think you can even create an animated one --
    and assign it as the backgroud to the text box. Position it upper left and it just might look real.

    As soon as the RTBox gets focus set the backgroud to nothing.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    New Lounger
    Join Date
    Aug 2002
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Cursor Problem (VB6/Word2000)

    Thanks,
    That was exactly wat I was thinking about, but have u done something like tis or have an idea as to how I go about doing it?
    I have heared of sprite in game programming, will that be useful???
    Hope you can help .........
    Regards

  4. #4
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Cursor Problem (VB6/Word2000)

    I've done it for a textbox, but I don't have an RTbox to play with.

    Check out <!post=this thread,174433>this thread<!/post> to get some ideas.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  5. #5
    New Lounger
    Join Date
    Aug 2002
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Cursor Problem (VB6/Word2000)

    Thanks Kevin
    but wats life without a lil problems......Here is mine at the moment!!! How will I be able to position it in front of the character just like a real cursor. What I mean is, suppose the user selects on a different character and the deactivates the form, the fake cursaor should show itself in the new position...........Now how would I go about moving the image in multiples of cursor positions? Because the letters with CAPS on have different width than the letters without......Suppose I somehow (I exactly dont know how) decide on the width of each character and move the image in multiples of those many characters, It still might not help me...............cos the user has the option to change the font to his wish (which obviously will have different chracter widths). Can uhelp me out here???
    DO I make sense or am I talking crazy (cos thats wat most of my freiends say I have become, after I started having tis problem)

    Regards

  6. #6
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Cursor Problem (VB6/Word2000)

    I figured your form fields would be blank until the form gets focus. I was unaware you would need to fill in some fields then switch focus to another window...then back again, etc. The "background graphic emulating a cursor" solution would probably not work then.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

Posting Permissions

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