Wait Cursor
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Wait Cursor

  1. #1
    ovidiucucu's Avatar
    ovidiucucu is offline Moderator/Reviewer Power Poster
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,021

    Wait Cursor

    I have a form with a button and a textbox.
    I have a also a class Cls_Import with a public function Import performing a long task.
    From Import I use RaiseEvent to notify main form to write some task info in the textbox.

    How to show the wait cursor during the long task?

    I did something like this:
    Code:
    Private Sub cmdImport_Click()
    ' ...
       If oImp Is Nothing Then
           Set oImp = New Cls_Import
       End If
       Me.MousePointer = vbHourglass
       bRet = oImp.Import() 'a long task here
       Me.MousePointer = vbDefault
    '...
    End Sub
    But doesn't work.
    What must be done?
    Ovidiu Cucu
    "When in Rome, do as Romans do."
    Visit: Microsoft Virtual Academy
    Follow: https://twitter.com/#!/ovidiucucu
    My blog: http://codexpert.ro/blog/author/ovidiu-cucu/

  2. #2
    Join Date
    Sep 2000
    Location
    FL
    Posts
    1,451

    Re: Wait Cursor

    Try.

    Screen.MousePointer = vbhourglass


    Screen.MousePointer = 0 ' return to normal

  3. #3
    ovidiucucu's Avatar
    ovidiucucu is offline Moderator/Reviewer Power Poster
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,021

    Re: Wait Cursor

    Thank you very much.
    It works.
    Ovidiu Cucu
    "When in Rome, do as Romans do."
    Visit: Microsoft Virtual Academy
    Follow: https://twitter.com/#!/ovidiucucu
    My blog: http://codexpert.ro/blog/author/ovidiu-cucu/

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center