|
-
Dec 10th, 2003, 08:45 PM
#1
Thread Starter
New Member
TextBox question..[Resolved - thx bruce]
I'm using the TextBox control from the "Microsoft Forms 2.0" designer(because it can be transparent) and i want to be able to press for instance a command button and have the textbox scroll. Well unlike normal textbox's there is no TextBox1.hwnd (like Text1.hwnd of normal ones). How do i get the hwnd of this type of textbox?
VB Code:
Const EM_LINESCROLL = &HB6
Private Declare Function SendMessage Lib "user32" Alias _
"SendMessageA" _
(ByVal hWnd As Long, _
ByVal wMsg As Integer, _
ByVal wParam As Integer, _
ByVal lParam As Long) As Long
Private Sub Command1_Click()
Dim lngRet As Long
lngRet = SendMessage([B]TextBox1.hwnd[/B], EM_LINESCROLL, 0, 5&)
End Sub
This works on a normal textbox but since the TextBox1 doesn't have a .hwnd property i have no idea how to find the .hwnd of the textbox. WELL thanks in advance!
Last edited by TuckWat; Dec 11th, 2003 at 02:24 PM.
Tucker Watson
-
Dec 10th, 2003, 10:32 PM
#2
Thread Starter
New Member
Did i stump people, or is the question unclear? Any feedback would be appreciated.
Thanks guys.
-
Dec 11th, 2003, 01:39 AM
#3
Are you aware of the consequences of using Forms 2.0 in a VB project not to mention the fact of it being illegal to re-distribute.
INFO: Usage and Redistribution of FM20.DLL
PRB: "Error 7 - Out of Memory" Error Message From Visual Basic Application Using FM20.DLL
Regardless, Forms 2.0 controls are window-less controls (like the VB Label control) and thus do not have an hwnd.
-
Dec 11th, 2003, 03:58 AM
#4
Aaron Young posted an example of a Transparent TextBox, do a search and see if its something you can use 
Edit:
This may be a place to start.
Bruce.
Last edited by Bruce Fox; Dec 11th, 2003 at 04:04 AM.
-
Dec 11th, 2003, 02:23 PM
#5
Thread Starter
New Member
Thanks bruce... and bruce i had no idea that it was illegal to redistribute or that they were "windowless" - but now i do. I guess i'll do transparent textboxes again - thanks guys!
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
|