Howdy, Stranger!

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

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Changing Mouse Icon in runtime

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 Posts: 68Member
    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 Posts: 49Member
    : 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 Posts: 3Member
    Thanks!! Both your suggestions worked great.
Sign In or Register to comment.