Eloooww welcome to another day of learning
I will be explaining the Shell command.
The Shell command is used to open programs from within the actual program. So what we need is a Common Dialog Control, and a Command Button.
So when we click the command button, a dialog shows up where we can select what program we want to open.
Now double click the command button. Name your Common Dialog Control comdlg32
Now copy this code:
Comdlg32.ShowOpen }} This shows the dialog where we can choose what program we want to openCode:Private Sub Command1_Click() Comdlg32.ShowOpen Shell comdlg32.FileName, vbNormalFocus End Sub
Shell comdlg32.FileName }} tells the program to open the program we have selected in the open dialog.
vbNormalFocus }} Opens the program normal. Instead of vbNormalFocus you could also use vbHide, this hides the program when we open it. You could also select vbMaximizedFocus, vbMinimizedFocus, vbNormalNoFocus, vbMaximizedNoFocus, vbMinimizedNoFocus
Now test it, and click on your command button, select an exe and click okif everything is okay it should open!
I hope this tut was useful
GrTz Virtual



LinkBack URL
About LinkBacks



but aww well nice tut anyway

Bookmarks