I have an icon and when you click it i would like to run a program say notepad for example how would i do this?
Thanks
DJLunacy
http://www.mp3.com/voi
Printable View
I have an icon and when you click it i would like to run a program say notepad for example how would i do this?
Thanks
DJLunacy
http://www.mp3.com/voi
Try This:
Code:Private Sub Picture1_Click()
Shell "C:\windows\notepad.exe", vbNormalFocus
End Sub
NegativeO's example is perfect. If your ICON is on a command button, then just change the Picture1_Click to Command1_Click and issue the SHELL command!
Thanks I figured it would be shell (QuickBasic vetran) wasn't 100% sure though.. I wish there was an easy way for me to port my QuickBasic game in VB.. The game is like 6MB
Peace Out,
DJLunacy
www.mp3.com/voi
Or you can just use:
To load a txt file or even an exe file using notepad:Code:Shell "notepad.exe", vbnormalfocus
Code:Shell "Notepad.exe ""C:\autoexec.bat", vbNormalFocus