Solved

C# to VB convertion issue

Posted on 2009-07-16
4
209 Views
Last Modified: 2013-11-26
Hi to all,

I am trying to convert the following line of code to VB.Net, but I am running into some issues.
The first part of the code below is the C# code and the second part is the VB code.

It states that the argument for parameter e is not specified. I do not know what it is looking for and how to get the code to work.

I am working from the following sample on Code Project if you need the full C# code.
http://www.codeproject.com/KB/WPF/TouchScreenKeyboardWPF.aspx

Thanks

CommandBinding CbTlide = new CommandBinding(CmdTlide, RunCommand);
Run Command:
static void RunCommand(object sender, ExecutedRoutedEventArgs e)
 
VB Code:
Dim CbTlide As New CommandBinding(CmdTlide, RunCommand)
Run Command:
Private Shared Sub RunCommand(ByVal sender As Object, ByVal e As ExecutedRoutedEventArgs)

Open in new window

0
Comment
Question by:ALawrence007
  • 2
  • 2
4 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24868695
Try using this free online converter

http://www.developerfusion.com/tools/convert/csharp-to-vb/
0
 

Author Comment

by:ALawrence007
ID: 24868702
That was the one I used to get the code shown below.
Thanks CodeCruiser :)
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 24868752
It looks like there needs to be a delegate at the place of the RunCommand because VB would try to call the actual function whereever you place the RunCommand word. You may want to try this


Dim CbTlide As New CommandBinding(CmdTlide, AddressOf RunCommand)
0
 

Author Closing Comment

by:ALawrence007
ID: 31604177
Man that was easy! Thanks CodeCruiser!!!!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question