Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Exit VB program...

Posted on 2000-03-13
5
Medium Priority
?
393 Views
Last Modified: 2010-05-02
It will be very much appreciated if anyone VB expert will help me this.
Many Thanks in advance.

I had this VB Database updating program call sample.exe,
What can I do to let the program go directly to the VB runing interface rather than VB design form once I click on my sample.exe file.

Rgds

Felicia
0
Comment
Question by:felicia
  • 2
  • 2
5 Comments
 
LVL 3

Expert Comment

by:pacificdb
ID: 2614660
Your question is a bit confusing to me, however, if you mean that the wrong form is displayed when you execute your program, here is what you should do.

1. Open your VB project in design mode.

2. From the Project menu, select 'Project Properties'.

3. From the 'Startup Object' dropdown list, select the name of the form you want to see when you execute your program.

4. Click OK.

5. From the File menu, select 'Make Sample.exe'.

6. Exit VB, then execute your program again.

I hope this helps.
0
 

Author Comment

by:felicia
ID: 2614827
Pardon for the confusion.

I had done what u mention.

U see, when I execute the sample.exe, it displays the form. I need to click the run icon to enter into the runing mode, then I could updating by price through clicking the updating comand button...cmdUpdate.Click()

Instead of display the form when I execute the VB project sample.exe,
I would like it to display in the running VB mode that I could directly
click the cmdUpdate.Click() command button.

Can that be done???

Many Thanks
0
 
LVL 5

Accepted Solution

by:
KDivad earned 0 total points
ID: 2614862
Is this what you mean?:
Right-click the project file and select "Run" instead of the default "Open". This will load the project and cause VB to immediately begin running it.
0
 

Author Comment

by:felicia
ID: 2614900
Great !!! Thanks !!!

That's what I want.

Sorry, again what command could I used to quite to windows mode instead of VB form after running the update.

Am using a quit command button as follows:

Private Sub cmdQuit_Click()
End
End Sub

The purpose of me using this approach is to allow end user directly using the updating program rather than using entering VB program that they may not be familier with.

Many Thanks agin

Felicia
0
 
LVL 5

Expert Comment

by:KDivad
ID: 2618598
There isn't a correct way to do it. However, you may be able to use a method simliar to one I used in VB3. I used Appactivate to switch the focus to VB's main window and SendKeys to send the "Alt-Space C" that would close VB.  DO NOT SET THE "WAIT" PARAMETER FOR SENDKEYS TO TRUE! This method is loaded with difficulties, but may help you figure out some way to do it.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

824 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