Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Jan 2005
    Location
    Orange, California, USA
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Mouse pointer inconsistent (VB6)

    This question is related to the screen.mousepointer = vbNormal and vbHourglass command. I have a subroutine I am calling which calls other nested subroutines and functions. In the primary sub I set the mouse cursor to hourglass and turn it back to normal just prior to its termination. I have it tied to a 3rd party control combo box in the close_up event which triggers the subroutine. There are two items in the combo box. The first one turns the pointer to hourglass and off as expected. When I select the second item it never goes to hourglass. I've put a watch on the value change of the screen.mousepointer to break whenever it changes. The value changes properly each time an item is selected in the combo box, it just doesn't show an hourglass on the screen. I have even tried moving the mousepointer commands to the close_up event itself. The only way I can get around it this is another sub I created that is a counter loop, used to count through the loop and then return to the calling procedure. What I have found is after I have changed the cursor to hourglass when selecting the second item in the combo box, it will change to hour glass only if the counter subroutine counts greater than 5000 times. Less than that it will not function for the second item.

    Anyone else experience this frustration...or have an idea what is going on with this thing?

    Mike

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Mouse pointer inconsistent (VB6)

    Try inserting an instruction

    DoEvents

    at various places in your code - it gives other processes a chance to execute.

  3. #3
    Lounger
    Join Date
    Jan 2005
    Location
    Orange, California, USA
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mouse pointer inconsistent (VB6)

    Hans, it didn't work - but I have to tell you, it was an excellent suggestion. After trying it in multiple places I tried a different angle by taking out the command to return the cursor to normal. Interesting that during execution the cursor didn't change to hourglass, but after comletion, it turned to an hourglass and stayed that way. I think this is one of those anomalies that I will just have to live with.

Posting Permissions

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