Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Exit VB program...

Posted on 2000-03-13
5
Medium Priority
?
388 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
[X]
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
  • 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

715 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