Micro Niche Builder

View Poll Results: Who Should Win The S.O.T.W 21

Voters
19. You may not vote on this poll
  • Entry One

    1 5.26%
  • Entry Two

    3 15.79%
  • Entry Three

    4 21.05%
  • Entry Four

    5 26.32%
  • Entry Five

    6 31.58%
Closed Thread
Results 1 to 3 of 3

Thread: [VB] Shell function

  1. #1

    Default [VB] Shell function

    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:

    Code:
    Private Sub Command1_Click()
    Comdlg32.ShowOpen
    Shell comdlg32.FileName, vbNormalFocus
    End Sub
    Comdlg32.ShowOpen }} This shows the dialog where we can choose what program we want to open

    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 ok if everything is okay it should open!

    I hope this tut was useful
    GrTz Virtual


  2. SEO Software

  3. #2

    Default RE: [VB] Shell function

    yea this works, pitty it doesnt work for other files but aww well nice tut anyway

  4. #3

    Default RE: [VB] Shell function

    thanx

Closed Thread

Bookmarks

Posting Permissions

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