|
-
Sep 26th, 2000, 03:37 AM
#1
Thread Starter
New Member
Does anyone know the best way to refresh a form when in the middle of a complex loop without adding to much time to the loop itself.
-
Sep 26th, 2000, 04:34 AM
#2
Fanatic Member
I reckon this might work:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_PAINT = &HF
Private Sub RefreshForm()
'probably best to move this line out of the proc,
'and into the looping procedure instead of
'calling refreshform every time
SendMessage Form1.hwnd, WM_PAINT, Form1.hDC, 0&
End Sub
Crispin
VB6 ENT SP5
VB.NET
W2K ADV SVR SP3
WWW.BLOCKSOFT.CO.UK
[Microsoft Basic: 1976-2001, RIP]
-
Sep 26th, 2000, 04:54 AM
#3
transcendental analytic
Code:
For x=0 to 10000
if x mod 500=0 then form1.refresh:doevents
next x
This will refresh form1 20 times in 10000 loops
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Sep 26th, 2000, 05:00 AM
#4
Thread Starter
New Member
Cheers Guys
Muchos Graciasssss!!!!!!!!!!!!!!!!!1
-
Sep 26th, 2000, 05:13 AM
#5
Refresh should fire off the repaint itself, you should not require the DoEvents.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|