Can someone convert the following c# code (which can be found in this
codeproject article: 
http://www.codeproject.com/KB/dotnet/wiascriptingdotnet.aspx)
to VB?

I have managed to convert the rest of the code to VB but I am having
trouble with this sub.

Particulary the line "wiaMgr.OnDeviceDisconnected += wiaEvtDisc;".

Thanks.

private void CreateManager(){
try {
wiaMgr = new WiaClass();

wiaEvtDisc = new _IWiaEvents_OnDeviceDisconnectedEventHandler
( this.wia_OnDeviceDisconnected );
wiaMgr.OnDeviceDisconnected += wiaEvtDisc;

wiaEvtTransfer = new _IWiaEvents_OnTransferCompleteEventHandler
( this.wia_OnTransferComplete );
wiaMgr.OnTransferComplete += wiaEvtTransfer;
}
catch( Exception ) {
MessageBox.Show( this, "Create WIA manager object failed", "WIA",
MessageBoxButtons.OK, MessageBoxIcon.Stop );
Application.Exit();
}
}

Reply via email to