Results 1 to 5 of 5

Thread: Easy question

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    oxford,mi,usa
    Posts
    10

    Question

    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

  2. #2
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Try This

    Try This:

    Code:
    Private Sub Picture1_Click()
      Shell "C:\windows\notepad.exe", vbNormalFocus
    End Sub

  3. #3
    Hyperactive Member mikef's Avatar
    Join Date
    Jun 2000
    Location
    Beach bound...
    Posts
    510
    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!

  4. #4

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    oxford,mi,usa
    Posts
    10

    Talking swet

    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

  5. #5
    Guest
    Or you can just use:
    Code:
    Shell "notepad.exe", vbnormalfocus
    To load a txt file or even an exe file using notepad:
    Code:
    Shell "Notepad.exe ""C:\autoexec.bat", vbNormalFocus

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width