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
Solved

Exit VB program...

Posted on 2000-03-13
5
374 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

856 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