Click here to Skip to main content
15,909,039 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: excel conditional formatting - or excel control Pin
Eddy Vluggen4-Jul-13 5:02
professionalEddy Vluggen4-Jul-13 5:02 
Questionvb.net tree view Pin
walsh273-Jul-13 2:52
walsh273-Jul-13 2:52 
AnswerRe: vb.net tree view Pin
Eddy Vluggen4-Jul-13 3:16
professionalEddy Vluggen4-Jul-13 3:16 
QuestionWebcam Capture and print A5 Paper, Codes (Two Cameras) Pin
Uğur Şirin1-Jul-13 22:57
Uğur Şirin1-Jul-13 22:57 
AnswerRe: Webcam Capture and print A5 Paper, Codes (Two Cameras) Pin
Eddy Vluggen2-Jul-13 0:32
professionalEddy Vluggen2-Jul-13 0:32 
Questionvb6 to vb.net Pin
Smith00530-Jun-13 19:13
Smith00530-Jun-13 19:13 
AnswerRe: vb6 to vb.net Pin
Dave Kreskowiak1-Jul-13 2:21
mveDave Kreskowiak1-Jul-13 2:21 
QuestionHow to get address of a function or method Pin
treddie30-Jun-13 11:05
treddie30-Jun-13 11:05 
Hi.

I think an answer to this problem lies in the use of delegates and marshaling, but if so, I cannot figure this one out.

In vb6, you could use the AddressOf method to get the address of a function. vb.Net no longer allows such a simple idea. Some have even suggested that you do not need to get the address of a function. Apparently they do not use API functions, where getting the address of a function is essential.

Now, in vb.Net, if you attempt to use AddressOf(SomeFunction), as in:
VB
lPrevWndProc = SetWindowLong(hControl, GWL_WNDPROC, AddressOf WindowProc)


You get the following error:
VB
'addressof' expression cannot be converted to 'IntPtr' because 'IntPtr' is not a delegate type


MSDN is as obtuse as ever when describing this problem where a simple example of how to replace the as-simple-as-it-gets vb6 "AddressOf" method with a vb.Net method would have been the obvious thing to do. I reference:
http://msdn.microsoft.com/en-us/library/ms184628%28v=vs.90%29.aspx[^]

which explains no more than the IDE message does in that respect, so they might as well have not even created that link. They offer other links to study which venture off into space because...All they needed to do was offer a simple comparison of how to do in vb.Net, to what was done in vb6.

I have searched high and low for an answer and all I have found is frustration.

Any help would be greatly appreciated. HELP! SOS!
AnswerRe: How to get address of a function or method Pin
TnTinMn30-Jun-13 16:46
TnTinMn30-Jun-13 16:46 
GeneralRe: How to get address of a function or method Pin
treddie1-Jul-13 12:17
treddie1-Jul-13 12:17 
GeneralRe: How to get address of a function or method Pin
TnTinMn1-Jul-13 14:28
TnTinMn1-Jul-13 14:28 
GeneralRe: How to get address of a function or method Pin
treddie1-Jul-13 20:43
treddie1-Jul-13 20:43 
GeneralRe: How to get address of a function or method Pin
TnTinMn2-Jul-13 7:32
TnTinMn2-Jul-13 7:32 
GeneralRe: How to get address of a function or method Pin
treddie2-Jul-13 9:35
treddie2-Jul-13 9:35 
AnswerRe: How to get address of a function or method Pin
Bernhard Hiller1-Jul-13 0:57
Bernhard Hiller1-Jul-13 0:57 
GeneralRe: How to get address of a function or method Pin
treddie1-Jul-13 12:18
treddie1-Jul-13 12:18 
GeneralRe: How to get address of a function or method Pin
treddie1-Jul-13 20:30
treddie1-Jul-13 20:30 
AnswerRe: How to get address of a function or method Pin
Richard Deeming1-Jul-13 1:54
mveRichard Deeming1-Jul-13 1:54 
GeneralRe: How to get address of a function or method Pin
treddie1-Jul-13 12:20
treddie1-Jul-13 12:20 
GeneralRe: How to get address of a function or method Pin
treddie1-Jul-13 19:29
treddie1-Jul-13 19:29 
GeneralRe: How to get address of a function or method Pin
Richard Deeming2-Jul-13 1:25
mveRichard Deeming2-Jul-13 1:25 
GeneralRe: How to get address of a function or method Pin
treddie2-Jul-13 9:41
treddie2-Jul-13 9:41 
QuestionHow to express this in a Regex? Pin
Sonhospa28-Jun-13 0:50
Sonhospa28-Jun-13 0:50 
AnswerRe: How to express this in a Regex? Pin
thanh_bkhn28-Jun-13 2:50
professionalthanh_bkhn28-Jun-13 2:50 
News[RESOLVED] Re: How to express this in a Regex? Pin
Sonhospa28-Jun-13 2:59
Sonhospa28-Jun-13 2:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.