Solved

Exit VB program...

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
VB error "Type mismatch" 2 43
Visual Basic Excel Formatting error 4 67
Using "ScreenUpdating" 6 45
vb6 connector to SQL Server 2 32
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
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…

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now