/ Forside / Teknologi / Udvikling / VB/Basic / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
VB/Basic
#NavnPoint
berpox 2425
pete 1435
CADmageren 1251
gibson 1230
Phylock 887
gandalf 836
AntonV 790
strarup 750
Benjamin... 700
10  tom.kise 610
menu?
Fra : -= Roy =-


Dato : 22-12-00 20:56

Hi, I just started using visual basic (i'm now studying some books) but I
got a question: Is it possible to link a button (I already know how to
create forms) to a certain file??
and that if I click the buttons to start the file???

Thanks!!

-= Roy =-
(P.S does anybody of you know a good online book to learn visual basic??)



 
 
Carsten Saugmann (29-12-2000)
Kommentar
Fra : Carsten Saugmann


Dato : 29-12-00 15:40

Hi Roy

If you just want to launch an exe, you can use "Shell" like:

Private Sub Command1_Click()
Shell "E:\Music\DanceRobot.exe", vbNormalFocus
End Sub

Your VB-program continues without waiting for the exe to terminate. See
further details in Help.
You might want to add an error handler so your program doesn't crash if the
exe-file cannot be found.

Private Sub Command1_Click()
On Error GoTo eh
Shell "E:\Musik\DanceRobot.exe", vbNormalFocus
Exit Sub
eh:
MsgBox "'E:\Musik\DanceRobot.exe' could not be launched", vbExclamation
End Sub

So now you can both launch exe's and new year fireworks

Carsten

-= Roy =- skriver:

> Hi, I just started using visual basic (i'm now studying some books) but I
> got a question: Is it possible to link a button (I already know how to
> create forms) to a certain file??
> and that if I click the buttons to start the file???
>
> Thanks!!
>
> -= Roy =-
> (P.S does anybody of you know a good online book to learn visual basic??)




Søg
Reklame
Statistik
Spørgsmål : 177552
Tips : 31968
Nyheder : 719565
Indlæg : 6408848
Brugere : 218887

Månedens bedste
Årets bedste
Sidste års bedste