Open a form form a form

Posted on 2003-03-17
Medium Priority
Last Modified: 2010-04-17
Right basically i have written a program in VB which runs when a user logs in and shows them an acceptable use policy, what i have is 2 buttons, 1 decline = logs them off and the over accept which maps there drives, what i want to do is create a new form with this policy (which is 6 pages long), and add a 3rd button on the main screen, that when pressed show the use policy but keeps the original form open. I know very very little about VB, am using VB6. Thank You
Question by:dbaker1201
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 43

Accepted Solution

TimCottee earned 1000 total points
ID: 8151720
Hi dbaker1201,

I am not sure I entirely understand but anyway:

Private Sub cmdShowUsePolicyForm_Click()
  frmSecondForm.Show vbModal,Me
End Sub

Would show your second form, waiting until it is closed before releasing control back to the first form (remove vbModal,Me to make this an independent form).

So you would have three command buttons on the first form one of which is the button as above, this displays presumably the entire policy with a "Close" button. In the close button's click event you need to have :

Private Sub cmdClosePolicy_Click()
  Unload Me
End Sub

This will return control back to the main form.


Brainbench MVP for Visual Basic

Experts-Exchange Advisory Board Member

Author Comment

ID: 8158748
Excellent, Thank You, One more thing.

I am adding a lot of functions eg, finding ip addresses and mapping drives, but unless i copy over the correct dll's i get an error from my program when run on a different computer, is there a way round this, can the files be storred in the program, please help this is doing my head in
LVL 43

Expert Comment

ID: 8646749
You need to create an installation package for your application. VB provides the P&D (package and deployment) wizard which can be used to create a setup-based installation package. Your required components are included in a .CAB file and a small installer executable (setup.exe) is also created along with setup.lst which contains details for the installation. Simply run through the wizard ensuring that all your required files are included (99.8% of the time they will be automatically detected). Then make this available somewhere to be installed from (a network share is a good place). You can then run the setup.exe (as an administrator of course) on each machine and all required components will be installed and registered on each machine. Your application will then run quite happily.

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question