Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 06-04-2004, 09:40 AM   #1
Member (10 bit)
 
Designer's Avatar
 
Join Date: Mar 2004
Location: Essex, UK
Posts: 982
Send a message via AIM to Designer Send a message via MSN to Designer
Newbie to visual basic 6

I've only just started using VB6. The problem I have is that I want to launch a dos based program from a button in the application i'm writing. How would I go about this as i can't find any information on this anywhere?

Also, the dos application will have to start in full screen, can I do this with a pif? Target OS for the application is Win98SE
__________________
Intel Core i7 920 2.66GHz | Asus P6T SE| 6GB Corsair ram | XFX Radeon HD 4780 | 2 x 250 Gb Maxtor SATA II (in RAID 0), 1 x 250GB SATA II | Creative XFI soundcard | Coolermaster 650W PSU | ThermalTake Tsunami case

My new website -Carp Fishing Forums
Designer is offline   Reply With Quote
Old 06-04-2004, 12:36 PM   #2
Professional gadfly
 
doctorgonzo's Avatar
 
Join Date: Jan 2002
Location: Minneapolis, MN
Posts: 6,364
Send a message via MSN to doctorgonzo
Use the shell command, like this:

shell("C:\DOS\MYFILE.EXE", vbMaximizedFocus)

The vbMaximizedFocus will start it maximized and with the focus (imagine that! ) You should be able to find the details on the other options available.
doctorgonzo is offline   Reply With Quote
Old 06-04-2004, 12:49 PM   #3
Member (10 bit)
 
Designer's Avatar
 
Join Date: Mar 2004
Location: Essex, UK
Posts: 982
Send a message via AIM to Designer Send a message via MSN to Designer
Thanks Doctorgonzo,

Got it launching the appliction OK now.

Is there a way to get the program to start full screen (not in a window, like it would if you started from dos mode)

Also using the shell command can I include switches because to launch the program from dos I would normally have to key in:

G6E_Keba.exe 1919

As this bypasses the applications default setting to ask for the password (which is 1919 by the way) otherwise this ancient program gets really frustrating as you would be keying the password in every couple of minutes.

Many thanks

Last edited by Designer; 06-04-2004 at 12:53 PM.
Designer is offline   Reply With Quote
Old 06-04-2004, 01:27 PM   #4
Professional gadfly
 
doctorgonzo's Avatar
 
Join Date: Jan 2002
Location: Minneapolis, MN
Posts: 6,364
Send a message via MSN to doctorgonzo
Yes, you can add switches. I don't know about launching in full screen, though. I'm sure there is a way to do it, but it would probably involve API functions.
doctorgonzo is offline   Reply With Quote
Old 06-04-2004, 01:36 PM   #5
Member (10 bit)
 
Designer's Avatar
 
Join Date: Mar 2004
Location: Essex, UK
Posts: 982
Send a message via AIM to Designer Send a message via MSN to Designer
Thanks again Doc, you've saved me from a major headache

Would you believe i've spent £50 on a book and it's next to useless unless you want to learn how to do hello world type programs.
Designer is offline   Reply With Quote
Old 06-04-2004, 01:46 PM   #6
Professional gadfly
 
doctorgonzo's Avatar
 
Join Date: Jan 2002
Location: Minneapolis, MN
Posts: 6,364
Send a message via MSN to doctorgonzo
Yes, I would believe that.

All my programming knowledge is self-taught for the most part. I have bought some books, but as you have found out the poorer ones don't tell you anything useful.

Actually, I don't think I have bought any books at all for Visual Basic. It is pretty easy to get something up and running in VB (many would say too easy). I have just bought books on Java, C++, and C#, which are structured differently (in other words, better than VB). I still do most of my work in VB, though, simply because that's been forced upon me.
doctorgonzo is offline   Reply With Quote
Old 06-05-2004, 02:12 AM   #7
Member (10 bit)
 
Designer's Avatar
 
Join Date: Mar 2004
Location: Essex, UK
Posts: 982
Send a message via AIM to Designer Send a message via MSN to Designer
Basically, my work have been paying a guy a fortune for writing software for us. They asked me to have a crack at learning it to see if I could solve some of the problems this guy normally comes in for.

Normally I do PLC programming (also SoftPLC's) and that sort of thing so this is a bit new to me, I remember briefly touching on BASIC in school many years ago but thats the only computer programming experience i've had.
Designer is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 06:46 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2