VB6 AddressOf and Callbacks in VS 2008
VB6 AddressOf and Callbacks in VS 2008
VB6 AddressOf and Callbacks in VS 2008
VB6 AddressOf and Callbacks in VS 2008
VB6 AddressOf and Callbacks in VS 2008
VB6 AddressOf and Callbacks in VS 2008 VB6 AddressOf and Callbacks in VS 2008 VB6 AddressOf and Callbacks in VS 2008 VB6 AddressOf and Callbacks in VS 2008 VB6 AddressOf and Callbacks in VS 2008 VB6 AddressOf and Callbacks in VS 2008 VB6 AddressOf and Callbacks in VS 2008 VB6 AddressOf and Callbacks in VS 2008
VB6 AddressOf and Callbacks in VS 2008 VB6 AddressOf and Callbacks in VS 2008
VB6 AddressOf and Callbacks in VS 2008
Go Back  Xtreme Visual Basic Talk > > > VB6 AddressOf and Callbacks in VS 2008


Reply
 
Thread Tools Display Modes
  #1  
Old 07-14-2017, 07:14 PM
StealthRT's Avatar
StealthRT StealthRT is offline
Contributor
 
Join Date: Aug 2002
Posts: 785
Question VB6 AddressOf and Callbacks in VS 2008


Hey all I am trying to convert some VB6 code to VS 2008 via its automated VB6 code converter. Most does well but there are a few that need a touch up.

The touch up is this piece of code:
Code:
    GrCapStartCapture(myIdSensor, AddressOf GrCapFingerEventHandler, AddressOf GrCapImageEventHandler)
The **AddressOf ...** are the errors in this one:

The GrCapFingerEventHandler:
Code:
    Public Sub GrCapFingerEventHandler(ByVal pidSensor As Integer, ByVal eventRaised As Integer)
		While fireFinger = True
			System.Windows.Forms.Application.DoEvents()
		End While
		
		myPIdSensor = pidSensor
		myEventRaised = eventRaised
		fireFinger = True
		
		While fireFinger = True
			System.Windows.Forms.Application.DoEvents()
		End While
	End Sub
And GrCapImageEventHandler:
Code:
    Public Sub GrCapImageEventHandler(ByVal pidSensor As Integer, ByVal width As Integer, ByVal height As Integer, ByVal pRawImage As Integer, ByVal res As Integer)
		While fireImage = True
			System.Windows.Forms.Application.DoEvents()
		End While
		
		myPIdSensor = pidSensor
		myWidth = width
		myHeight = height
		myRes = res
		myRawImage = pRawImage
		fireImage = True
		
		While fireImage = True
			System.Windows.Forms.Application.DoEvents()
		End While
	End Sub
And the error is:

> Error 44 'AddressOf' expression cannot be converted to 'Integer' because 'Integer' is not a delegate type.

Can anyone help me with converting this code areas over to .net?
Reply With Quote
  #2  
Old 08-09-2017, 03:55 AM
Goggy's Avatar
Goggy Goggy is offline
Contributor
 
Join Date: Sep 2005
Location: Enschede,The Netherlands
Posts: 670
Default

How is the sub "GrCapStartCapture" Declared?
I'm suspect there should be some delegates involved to get it to work.....
__________________
As finishing touch, god created the Dutch!

utterly useless, but always trying to help
Reply With Quote
Reply

Tags
integer, true, byval, code, pidsensor, addressof, firefinger, vb6, fireimage, public, grcapimageeventhandler, grcapfingereventhandler, error, res, height, width, prawimage, mypidsensor, eventraised, touch, expression, converted, myrawimage, mywidth, myheight


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
VB6 AddressOf and Callbacks in VS 2008
VB6 AddressOf and Callbacks in VS 2008
VB6 AddressOf and Callbacks in VS 2008 VB6 AddressOf and Callbacks in VS 2008
VB6 AddressOf and Callbacks in VS 2008
VB6 AddressOf and Callbacks in VS 2008
VB6 AddressOf and Callbacks in VS 2008 VB6 AddressOf and Callbacks in VS 2008 VB6 AddressOf and Callbacks in VS 2008 VB6 AddressOf and Callbacks in VS 2008 VB6 AddressOf and Callbacks in VS 2008 VB6 AddressOf and Callbacks in VS 2008 VB6 AddressOf and Callbacks in VS 2008
VB6 AddressOf and Callbacks in VS 2008
VB6 AddressOf and Callbacks in VS 2008
 
VB6 AddressOf and Callbacks in VS 2008
VB6 AddressOf and Callbacks in VS 2008
 
-->