Solved

C# to VB convertion issue

Posted on 2009-07-16
4
203 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now