?
Solved

C# to VB convertion issue

Posted on 2009-07-16
4
Medium Priority
?
212 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 2000 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

770 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