Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Changing Mouse Icon in runtime

capone888capone888 Member Posts: 3
Here's an easy one that is giving me some trouble.
I want to click a command button to load a new form. The new form has a longer than usual load time (roughly 5 seconds). Instead of having my users click the command button to load the next form, and sit there wondering for 5 seconds if they actually hit the command button or not, I want to change the mouse icon to the common hourglass icon common to all Win machines. Then, when the form finally loads, I want to change the mouse icon back to the common arrow pointer.
Could someone supply me with a code snippet on how to make this happen. I am assuming it is fairly easy. A URL to a page that has a tutorial on the topic would also be welcomed. The only articles I have found so far are on using custom icons. I tried to convert those articles to my own needs, but I am probably doing something wrong. Could anyone help? Thanks!

Comments

  • ganesh4uganesh4u Member Posts: 68
    It's very simple

    use timer control when user clicks cmd button change forms.mouse icon property to hourglass and after 5 secs (use timer controls property)change it to default.
    Ganesh :)

  • Mike_AB1Mike_AB1 Member Posts: 49
    : Here's an easy one that is giving me some trouble.
    : I want to click a command button to load a new form. The new form has a longer than usual load time (roughly 5 seconds). Instead of having my users click the command button to load the next form, and sit there wondering for 5 seconds if they actually hit the command button or not, I want to change the mouse icon to the common hourglass icon common to all Win machines. Then, when the form finally loads, I want to change the mouse icon back to the common arrow pointer.
    : Could someone supply me with a code snippet on how to make this happen. I am assuming it is fairly easy. A URL to a page that has a tutorial on the topic would also be welcomed. The only articles I have found so far are on using custom icons. I tried to convert those articles to my own needs, but I am probably doing something wrong. Could anyone help? Thanks!
    :

    You can do it this way:

    Private Sub Form_Load()
    Screen.MousePointer = vbHourglass
    '''
    '''
    '''
    Screen.MousePointer = vbDefault

    End Sub

  • capone888capone888 Member Posts: 3
    Thanks!! Both your suggestions worked great.
Sign In or Register to comment.