PDA

View Full Version : Start an application hidden or minimized


Thommas
15th February 2008, 05:34 PM
Hi !

I have a problem and i've been looking for a solution for many days.
My goal is to run an application minimized or hidden on windows mobile 6.0.

But classes Process and ProcessStartInfo are different in my Visual Studio 2008 (dotnet 3.5 with compact framework), see also the link :
http://msdn2.microsoft.com/en-us/library/0w4h05yb.aspx

Indeed, there is no "WindowStyle" in class ProcessStartInfo
(startInfo.WindowStyle = ProcessWindowStyle.Minimized

If you know a solution, please tell me.

Thank you to all in advance.
Best regards.
--
Thommas (a french developer in Paris)
Be Quick ! Time is Mana...

Thommas
18th February 2008, 11:50 AM
I guess nobody here knows a solution... -_-'

I'll try to use MortScript to do the job...

Thommas
19th February 2008, 09:47 AM
I found this :


# Imports System.Runtime.InteropServices
# Public Class Launch
# <DllImport("CoreDll.DLL", SetLastError:=True)> _
# Private Shared Function CreateProcess(ByVal imageName As String, ByVal cmdLine As String, ByVal lpProcessAttributes As IntPtr, ByVal lpThreadAttributes As IntPtr, ByVal boolInheritHandles As Int32, ByVal dwCreationFlags As Int32, ByVal lpEnvironment As IntPtr, ByVal lpszCurrentDir As IntPtr, ByVal si() As Byte, ByVal pi As ProcessInfo) As Integer
# End Function
#
# <DllImport("CoreDll.dll")> _
# Private Shared Function GetLastError() As Int32
# End Function
#
# Public Shared Function CreateProc(ByVal ExeName As String, ByVal CmdLine As String, ByVal pi As ProcessInfo) As Boolean
# If pi Is Nothing Then
# pi = New ProcessInfo
# End If
# Dim si(127) As Byte
# Return CreateProcess(ExeName, CmdLine, IntPtr.Zero, IntPtr.Zero, 0, 0, IntPtr.Zero, IntPtr.Zero, si, pi) <> 0
# End Function 'CreateProc
# End Class 'Externals
# Public Class ProcessInfo
# Public hProcess As IntPtr
# Public hThread As IntPtr
# Public ProcessId As Int32
# Public ThreadId As Int32
# End Class
#
# 'dans votre form
#
# Launch.CreateProc("\Windows\solitaire.exe", Nothing, Nothing)
# 'lancera le solitaire

Maybe it can help ?

yoman74
19th February 2008, 01:04 PM
Personnaly I use for few day ftouch associate with alt+tab for left to right gesture, so you can access hidden software. I think it is not the best solution, but it is the only one I find ;-)
good luck
Lionel