Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Incorporating two applications 1

Status
Not open for further replies.

ecojohnson

Programmer
Jul 2, 2001
54
US
I have two separate apps that I am trying to combine into one app. The first app is just a standard winsock app. The second application is a simple SMTP app.

The goal of combining the two is this: if the first app creates an error, I want to send an e-mail using the SMTP app. So, on the first app, I am adding two new fields, an IP address for the SMTP server and a e-mail address. Once an error occurs, I would send off the e-mail using the IP and e-mail address entered on the first app.

I am extremely new at VB. Is there any guildelines, or any helpful hints on how to begin this process? I have absolutely no idea on how to even start melding these two apps together. Any ideas are much appreciated.

Also, if you need the code, I am more than happy to provide it. I just didn't include it since it's rather long and complicated. But, if I need to provide it to get help, I'm more than happy to.
 
If you have the source code for both apps, you can make a copy of the larger one to use as the new app and open the smaller one in a second running VB at the same time. Cut and paste each form from the smaller one to the larger one and do the same with any modules.
You also have to cut and paste any code for each form to its corresponding new form.
You will prob have duplications of dimensioning variables that you will have to sort out so it's better to test run the new combined app after adding each form or code.
Put Option Explicit at the start of the module or each form so you cant duplicate things or miss dimensioning any variables.
You might have to slightly change the name of some added controls if they had the same name in both apps.
To use the new app, make the first app the main one that runs (project properties) and call any other things from it such as loading the minor app forms in the background.
You will have to add any control components to the toolbox that are in app2 that were not in form1

If the second app was small you might be able to cut and paste the controls and code to the main app new form and delete the minor app.

OR.

You can have both apps running at the same time and communicate using windsock as per example in MSDN disk.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top