|
-
Oct 5th, 2000, 09:51 AM
#1
Thread Starter
Lively Member
I've got some code that will use the SendMessage function to change the text within a text box on another application, i.e.
SendMessage(tHandle, EM_REPLACESEL, CLng(1), text_to_send)
Does anyone know if its possible to update a progress bar using a similar method ??
-
Oct 5th, 2000, 11:20 AM
#2
Fanatic Member
paste this code into a form with a progress bar on it, and set the scrolling to smooth, then repeatedly click the command button 
Private Const PBM_SETPOS = &H402
Private Const PBM_DELTAPOS = &H403
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 Sub Command1_Click()
Debug.Print SendMessage(ProgressBar1.hwnd, PBM_DELTAPOS, 50, 0)
End Sub
HTH
Crispin
VB6 ENT SP5
VB.NET
W2K ADV SVR SP3
WWW.BLOCKSOFT.CO.UK
[Microsoft Basic: 1976-2001, RIP]
-
Sep 21st, 2002, 01:26 PM
#3
Addicted Member
What is the CLng(1) in this?
SendMessage(tHandle, EM_REPLACESEL, CLng(1), text_to_send)
-
Sep 21st, 2002, 01:52 PM
#4
Fanatic Member
It specifies whether the change can be undone. Non zero allows for undo, 0 prevents it.
I'm baaaack...
VB5 Professional Edition, VC++ 6
Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se
I feel special because I finally figured out how to loop midis: Post link
I'm a fanatic too 
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
|