Results 1 to 7 of 7

Thread: Running a VB screen from C#

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2002
    Location
    London
    Posts
    63

    Question Running a VB screen from C#

    I have a VB application that has a few screens.

    Is there a way in C# to run this application and call one of it'screens?

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    What do you mean by 'run this application and call one of it'screens' ?

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 2002
    Location
    London
    Posts
    63
    I mean't actually invoking the VB application from with C#, then intead of the user opening forms from within the VB application, just have say a button on a C# Windows App and then the C# windows app shows the VB screen.

    I have though about building a COM component wrapper around my VB App and then incorporating the COM component in C# in interop mode and that way I can go through my COM component to do whatever I like in the VB program.

    What do you think?

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Umm , if the app is exe , then you can use process.start(yourapp) to run it . Otherwise , I'm afraid I don't know much about it and I've never worked on such stuff , so sorry I can't help you furthur .

    Luck .

  5. #5
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Yes, you can do it if I understand you right. First, you need to compile your VB.Net application.

    In your C# application, you need to reference the above dll.

    Now, create a new form from that dll like you would any other form, just it is in a different namespace.

  6. #6
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    I think he means VB6 not VB.NET (I think) , if he means VB.NET , then he can use C# forms directly .

  7. #7

    Thread Starter
    Member
    Join Date
    Sep 2002
    Location
    London
    Posts
    63
    Yes, I meant an old VB6 app.

    I worked out how to do this using COM so all is cool.

    Thanks anyway guys.

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