Results 1 to 3 of 3

Thread: how to convert this into vb net

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2010
    Posts
    182

    how to convert this into vb net

    how to convert this vb6 into vb net


    it has en error on addressof

    vb.net Code:
    1. m_lngPreviousValue = SetWindowLong(p_lngWindowHandle, GWL_WNDPROC, AddressOf WindowProc)

  2. #2
    Fanatic Member stlaural's Avatar
    Join Date
    Sep 2007
    Location
    Quebec, Canada
    Posts
    683

    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

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width