Results 1 to 4 of 4

Thread: [RESOLVED] Using CS in VB

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2009
    Posts
    49

    Resolved [RESOLVED] Using CS in VB

    Hey all,

    I'm developing an app for a WinCE barcode device. I am trying to kill an external process from my app and reload it. This would be easy if I was using Framework 3.5 as there is native code to do this. I have come across this piece of code which lists the processes in memory in a listbox.

    http://msdn.microsoft.com/en-us/library/aa446560.aspx

    Works perfect

    Except...my app is developed in VB not C Sharp. Does anybody know if I can use the process.cs file in my VB app and call the functions from it? I've attached the process.cs file that contains the code and the calling code is as follows:

    lstProcess.DataSource = Process.GetProcesses();
    Attached Files Attached Files

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Using CS in VB

    Hey,

    Welcome to the Forums!!

    No, you won't be able to use it directly.

    However, you should be able to easily re-write it in VB, or, if you wrapped the cs file in a class library, you should be able to reference that DLL in your application.

    Gary

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 2009
    Posts
    49

    Re: Using CS in VB

    Thanks for the welcome gep13 and you're a star, this worked nicely.

    There was me busy all day trying to convert it to Vb code!

  4. #4
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: [RESOLVED] Using CS in VB

    Hey,

    Not a problem at all.

    If you know something is working exactly as you want it, and it is not something that you are going to have to edit in the future, then there is no real reason to convert it, just use it as is.

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width