If I click a button how my computer will be open? I want I click a button then my computer will be open.
help me with my computer, control panel

Shell "rundll32.exe shell32.dll,Control_RunDLL"

then you need to push the power button on your computer.

then you need to push the power button on your computer.

No that would be how my computer on not how to open the box to my computer :D

Dear Deba what your answer!

dear vb5prgrmr, please clear and details.

Dear Deba what your answer!

dear vb5prgrmr, please clear and details.

Quite simple. Start a new project, add a button, add the code, run program, click button.

Good Luck

thanks. but, dear tell me about my computer. it works with control panel.

thanks. but, dear tell me about my computer. it works with control panel.

Press the Power Button. That's a good one :) I like that one. Well, you weren't very explicit.

But I think this is what you want.

Add the Shell Controls and Automation reference in the Projects/Reference Menu by clicking on that item.

dim MyShell as Shell

Private sub form_load()
set MyShell = New Shell
     MyShell.Explore &H11 '  For My Computer
     MyShell.Explore &H3  '  For Control Panel
end sub

Private sub form_unload()
Set MyShell = Nothing
end sub()

Hopefully, that's enough to get you going. You can take the code from the form_load event and stick it in the appropriate Command Button.

commented: Very Good Work Here. +12

dear hkdani
if you don't mind can you help me one more. how can I open start menu by clicking a button.

Once you load the Shell Controls and Automation reference, then you should find all these constants available for your use and you can just use the autocompletion feature of your IDE: just type ssf and then Ctl + Space to see the constants appear in your code window.
These are a list of the constants available for your use:

ssfDESKTOP Desktop folder.
ssfPROGRAMS File system folder that contains the items in the Programs folder on the Start menu.
ssfCONTROLS Control Panel folder.
ssfPRINTERS Printers folder.
ssfPERSONAL File system folder that contains the user's documents.
ssfFAVORITES Favorites folder.
ssfSTARTUP Startup folder on the Start menu.
ssfRECENT Folder that contains shortcuts to the user's most recently used documents.
ssfSENDTO Folder that contains the items that are added to the Send To menu.
ssfBITBUCKET Recycle Bin.
ssfSTARTMENU Folder that contains the items that are displayed on the Start menu.
ssfDESKTOPDIRECTORY File system folder that contains the items on the desktop.
ssfDRIVES My Computer.
ssfNETWORK Network Neighborhood.
ssfNETHOOD File system folder that contains items displayed inside the Network Neighborhood.
ssfFONTS Folder that contains the installed fonts.
ssfTEMPLATES File system folder that contains document templates. MSDN

If you just want to open the start menu, why not just click the start menu button?

But if you want to use code, then you can use the Windows API function SendMessage .

Option Explicit
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
    (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _
    lParam As Any) As Long
Private Const WM_SYSCOMMAND = &H112
Private Const SC_TASKLIST = &HF130&


Private Sub Command1_Click()
    Dim lngReturn As Long
    lngReturn = SendMessage(Me.hwnd, WM_SYSCOMMAND, SC_TASKLIST, 0)
End Sub
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.