|
-
Sep 23rd, 2009, 01:32 AM
#1
Thread Starter
Lively Member
[RESOLVED] Starting VB6 Application from C# ????
Hi all,
I have a VB 6.0 application which i am calling from my C# application,
using
Code:
Process startProcess = null;
startProcess = Process.Start("ApplicationPath to start");
this will run the application, next after minimizing the VB 6.0 application I need to display it again, so I used
Code:
ShowWindow(startProcess.MainWindowHandle, SW_SHOWNORMAL);
Here the problem begins that VB6 application do not get displayed back from minimized state.
This code works well if we try it for any other windows application like Notepad.exe, but not with a VB6 exe created with single form without any code.
Need to know about this that why this is not happening in C# to display VB6 application.
Thanks,
-
Sep 23rd, 2009, 01:58 AM
#2
Re: Starting VB6 Application from C# ????
Have you used any tools to check the value of the MainWindowHandle and the actual handle of your window? Are they the same or different?
-
Sep 24th, 2009, 01:12 AM
#3
Thread Starter
Lively Member
-
Sep 24th, 2009, 12:44 PM
#4
Re: [RESOLVED] Starting VB6 Application from C# ????
I helped someone with a similar issue a while back.
Look specifically at post 9. The problem seems to be the way windows are created for vb6 applications with the ThunderRT6Main window and the ThunderRT6Form window.
The solution I provided does not guarantee that you will get back the correct window though, as someone posted on my blog
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|