Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

I wonder if you can help me, bascially we have a crystal report viewer application written in VB6. When the execuatble is launched from one of our software programs it is passed three values (see below).

 

Option Explicit

Public strDataSource As String

Public strInitCatalog As String

Public lngReportID As String

 

The question is how to I start the VB6 application and pass the three values to the application from my New VB .NET appication (just like our other software does).

 

Thanks for our help

 

Slim

  • *Experts*
Posted
The System.Diagnostics.Process class and its Start method accept an exe path and arguments that you pass in to it. You can start your application like that and the arguments will be passed in.
Posted (edited)

In case you need the alternative way. SetWindowText API would help. This is a dirty trick, but it works perfectly. It's much better than old DDE.

 

1. Put an invisible text box in VB6's main form. Use this text box to receive strings from your vb.net app.

 

2. Send the strings to the text box in your vb6 app by using SetWindowText API.

 

3. Changed event of the text box will raise whenever there are strings received.

 

Note: you will also use other simple APIs to get the hWnd of the textbox. Good Luck! :D

Edited by dragon4spy
Don't judge a man by his look. Don't judge a book by its cover. :D

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...