http://www.developerfusion.com/tools/convert/csharp-to-vb/
<http://www.developerfusion.com/tools/convert/csharp-to-vb/>heres what i
got.
1. Private Sub CreateManager()
2. Try
3. wiaMgr = New WiaClass()
4.
5. wiaEvtDisc = New _IWiaEvents_OnDeviceDisconnectedEventHandler(
Me.wia_OnDeviceDisconnected)
6. wiaMgr.OnDeviceDisconnected += wiaEvtDisc
7.
8. wiaEvtTransfer = New
_IWiaEvents_OnTransferCompleteEventHandler(Me.wia_OnTransferComplete)
9. wiaMgr.OnTransferComplete += wiaEvtTransfer
10. Catch generatedExceptionName As Exception
11. MessageBox.Show(Me, "Create WIA manager object failed",
"WIA", MessageBoxButtons.OK, MessageBoxIcon.[Stop])
12. Application.[Exit]()
13. End Try
14. End Sub
On Wed, Aug 5, 2009 at 1:29 PM, Cerebrus <[email protected]> wrote:
>
> ~ What prevents you from using any of the myriad free code converters
> (VB -> C# or C# to VB) available online ?
> ~ What prevents you from researching Event Handlers ?
>
> Hint: Check out the AddHandler statement in VB.
>
> On Aug 5, 8:11 pm, waqas <[email protected]> wrote:
> > 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;".
> >
>