|
-
Mar 10th, 2003, 05:26 AM
#1
Thread Starter
Member
Form handle in VB .NET
Hi!
How to get form handle in VB .NET? In VB 6 I use this:
Code:
Dim wHandle as Long
wHandle = frmMain.hWnd
Thank you!
Penavin 
-
Mar 10th, 2003, 06:16 AM
#2
Sleep mode
In .NET , we do it like so
VB Code:
Dim lng As Long = Me.Handle.ToInt32
-
Mar 10th, 2003, 11:06 AM
#3
Junior Member
Int32 is an Integer data type.
VB Code:
Dim hWnd as Integer = Me.Handle.ToInt32
The arrow shot by the archer may, or may not, kill a single person. However, stratagems devised by a wise man, can kill even babes in the womb.
-
Mar 10th, 2003, 11:17 AM
#4
Or just leave it an IntPtr. That way it won't overflow as soon as you run the app on a 64 bit OS. It depends what you want to do with it though.
VB Code:
Dim hWnd as IntPtr = Me.Handle
-
Mar 10th, 2003, 11:21 AM
#5
Junior Member
I learn something new everyday. =)
The arrow shot by the archer may, or may not, kill a single person. However, stratagems devised by a wise man, can kill even babes in the womb.
-
Mar 11th, 2003, 04:09 AM
#6
Thread Starter
Member
Thank you!
I thank to all of you for help.
Penavin 
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
|