|
-
Aug 25th, 2000, 01:58 PM
#1
I think he is talking about using it on a text box or something. I think you would have to use SendMessage to do that.
-
Aug 25th, 2000, 02:07 PM
#2
Monday Morning Lunatic
Put a textbox and a commandbutton onto a form. Then add this code:
Code:
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
Const EM_SCROLL = &HB5
Const SB_LINEDOWN = 1
Const SB_LINEUP = 0
Const SB_PAGEDOWN = 3
Const SB_PAGEUP = 2
Private Sub Command1_Click()
SendMessage Text1.hwnd, EM_SCROLL, SB_LINEDOWN, 0
End Sub
Private Sub Form_Load()
For i = 1 To 50
Text1.Text = Text1.Text + vbCrLf + "here is some particularly useful text being used as an example."
Next i
End Sub
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 25th, 2000, 02:09 PM
#3
Fanatic Member
And here's how you'd do that...
Code:
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 SB_LINEDOWN = 1
Private Const SB_LINEUP = 0
Private Const EM_SCROLL = &HB5
Private Sub cmdScrollUp_Click()
Call SendMessage(Text1.hWnd, EM_SCROLL, SB_LINEUP, 0)
End Sub
Private Sub cmdScrollDown_Click()
Call SendMessage(Text1.hWnd, EM_SCROLL, SB_LINEUP, 0)
End Sub
I haven't tested it, but I'm pretty sure it'll work.
Le one and only moi.
-
Aug 25th, 2000, 02:10 PM
#4
Fanatic Member
That's the second time you've beaten me to it in this thread...
Grrrr.
I'll have to neutralise the threat.
I know where you live...almost
-
Aug 27th, 2000, 10:35 AM
#5
Lively Member
I will try those tips. Thanks alot everyone!!!
VB6(SP4), QB4.5, PDS7.0, IBM-U2
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
|