|
-
Jul 8th, 2010, 08:48 AM
#1
Thread Starter
Addicted Member
how to convert this into vb net
how to convert this vb6 into vb net
it has en error on addressof
vb.net Code:
m_lngPreviousValue = SetWindowLong(p_lngWindowHandle, GWL_WNDPROC, AddressOf WindowProc)
-
Jul 8th, 2010, 09:08 AM
#2
Re: how to convert this into vb net
what error exactly ?
it also says here that you should now use SetWindowLongPtr.
Alex
.NET developer
"No. Not even in the face of Armageddon. Never compromise." (Walter Kovacs/Rorschach)
Things to consider before posting.
Don't forget to rate the posts if they helped and mark thread as resolved when they are.
.Net Regex Syntax (Scripting) | .Net Regex Language Element | .Net Regex Class | DateTime format | Framework 4.0: what's new
My fresh new blog : writingthecode, even if I don't post much.
System: Intel i7 920, Kingston SSDNow V100 64gig, HDD WD Caviar Black 1TB, External WD "My Book" 500GB, XFX Radeon 4890 XT 1GB, 12 GBs Tri-Channel RAM, 1x27" and 1x23" LCDs, Windows 10 x64, ]VS2015, Framework 3.5 and 4.0 
-
Jul 8th, 2010, 10:31 PM
#3
Re: how to convert this into vb net
The error is not in the code you have posted, but rather in your declaration of SetWindowLong. You are no doubt using a VB6 declaration where the last parameter is declared as a number. In VB.NET AddressOf returns a delegate so you must declare that parameter as an appropriate delegate type. You should serahc for a VB.NET declaration for that function. Try PInvoke.net first.
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
|