Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

C# to VB convertion issue

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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

610 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