Solved

C# to VB convertion issue

Posted on 2009-07-16
4
211 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

696 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