User Profile

Collapse

Profile Sidebar

Collapse
MACH4
MACH4
Last Activity: May 6 '08, 05:17 PM
Joined: May 3 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • MACH4
    replied to Sleep command problem
    in .NET
    Hi Plater,

    Yes, thanks or the info! I'm guilty of looking too deep!

    One thing that is becoming obvious with .NET is that if some code is more than 5 lines long, then there must exist an easier way! lol

    MACH4
    See more | Go to post

    Leave a comment:


  • MACH4
    replied to Sleep command problem
    in .NET
    Hi M,

    Just to qualify my last message statement, I've just concocted the following code using the win32 api "UpdateWindow". ..

    Declare Auto Function UpdateWindow Lib "user32"(By Val hwnd As IntPtr) As IntPtr


    ' Button handler code

    Dim ptr As IntPtr = Handle

    TextBox1.Text = "Waiting"
    UpdateWindow(pt r)
    Thread.Sleep(50 0)
    ...
    See more | Go to post

    Leave a comment:


  • MACH4
    replied to Sleep command problem
    in .NET
    Hi M,

    Thanks for replying!
    Yes your additional line does work thanks!

    Must admit I haven't used the Sleep command much before and my default language is Assembler, which prompted me to check it out further in that language.

    It seems that Do.Events (in this particular case) is equivalent to the UpdateWindow api function call. Using InvalidateRect to force a re-paint didn't work...

    ...
    See more | Go to post

    Leave a comment:


  • MACH4
    started a topic Sleep command problem
    in .NET

    Sleep command problem

    Hi all,
    First post!
    Learning vb.net

    the following is the button handler code:

    TextBox1.text = "Sleeping"
    Thread.Sleep(50 0)
    TextBox1.text = "Done!"

    Why is the first line being ignored?

    TextBox stays empty until after Sleep() then shows "Done" message...

    Thanks for any help!
    See more | Go to post
No activity results to display
Show More
Working...