Originally Posted by
rocky79
I am using easyHID sofware to generate a Visual basic code 6.0. I have the visual basic .net installed. So when i copy the file from vb.6 to vb.net , Vb.net upgrades the file to the .net configuration.Except for one thing that gave me an error:it's the upgrade warning about adding a delegate.
I couldn't figure out how to fix it, Any idea??
Sorry for the about 1 year later reply but anyways, this will be handy for new VBExpress 2005 user... probably .NET ones too.
Today, while trying to port USBDemo From VB6 to VBExpress, i came across the same issue. The simple fix is to add those 2 lines bellow in the mcHIDInterface.vb module, right under all Declare statement
Code:
'
' adding delegate to suite VBExpress 2005 requirement
' ===================================================
Delegate Function SubClassProcDelegate(ByVal hwnd As Integer, ByVal msg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer
Declare Function SetWindowLong Lib "USER32.DLL" Alias "SetWindowLongA" (ByVal hwnd As Integer, ByVal attr As Integer, ByVal lVal As SubClassProcDelegate) As Integer
HTH
Bookmarks