<DllImport("kernel32.dll")> _ PrivateSharedFunction CreateProcess()Function CreateProcess(ByVal lpApplicationName AsString, ByVal lpCommandLine AsString, ByVal lpProcessAttributes As IntPtr, _ ByVal lpThreadAttributes As IntPtr, ByVal bInheritHandles AsInteger, ByVal dwCreationFlags AsInteger, _ ByVal lpEnvironment As IntPtr, ByVal lpCurrentDirectory AsString, ByRef lpStartupInfo As STARTUPINFO, _ ByRef lpProcessInformation As PROCESS_INFORMATION) AsBoolean End Function <StructLayout(LayoutKind.Sequential)> _ PrivateStructure STARTUPINFOStructure STARTUPINFO Public cb AsInteger Public lpReserved AsString Public lpDesktop AsString Public lpTitle AsString Public dwX AsInteger Public dwY AsInteger Public dwXSize AsInteger Public dwYSize AsInteger Public dwXCountChars AsInteger Public dwYCountChars AsInteger Public dwFillAttribute AsInteger Public dwFlags AsInteger Public wShowWindow As Int32 Public cbReserved2 AsShort Public lpReserved2 As IntPtr Public hStdInput As IntPtr Public hStdOutput As IntPtr Public hStdError As IntPtr End Structure <StructLayout(LayoutKind.Sequential)> _ PrivateStructure PROCESS_INFORMATIONStructure PROCESS_INFORMATION Public hProcess As IntPtr Public hThread As IntPtr Public dwProcessId AsInteger Public dwThreadId AsInteger End Structure <DllImport("shell32.dll")> _ PrivateSharedFunction ShellExecuteEx()Function ShellExecuteEx(ByRef lpExecInfo As SHELLEXECUTEINFO) AsInteger End Function <StructLayout(LayoutKind.Sequential)> _ PublicStructure SHELLEXECUTEINFOStructure SHELLEXECUTEINFO Public cbSize AsInteger Public fMask AsInteger Public hwnd As IntPtr Public lpVerb AsString' /* Action,edit,open,print */ Public lpFile AsString'; /* According to the value of lpVerb,always set to the filename */ Public lpParameters AsString'; /* Parameters chars */ Public lpDirectory AsString'; /* Directory */ Public nShow AsInteger Public hInstApp As IntPtr Public lpIDList AsInteger Public lpClass AsString Public hkeyClass As IntPtr Public dwHotKey AsInteger Public hIcon As IntPtr Public hProcess As IntPtr End Structure