K
Kenny Rymes
Hello
I have a problem using .NET CF. If I open a new form with
"settings.showdialog" and I stay on the new form for 5-10 minutes, then the
old form disappears. If I close the settings-form, then I see the
Today-Screen instead of the old form.
Must be something with timeout...
I now tried to use this:
<DllImport("coredll.dll", EntryPoint:="SetForegroundWindow",
SetLastError:=True)> _
Public Shared Function SetForegroundWindow( _
ByVal hwnd As IntPtr) As Boolean
End Function
<DllImport("Coredll", CallingConvention:=CallingConvention.Winapi,
CharSet:=CharSet.Auto)> _
Public Shared Function FindWindow(ByVal lpClassName As String, ByVal
lpWindowName As String) As IntPtr
End Function
Public Shared Function BringFormToFront(ByVal FormName As String) As Boolean
Dim hwnd As IntPtr
hwnd = (FindWindow(Nothing, FormName))
SetForegroundWindow(hwnd)
End Function
after settings.showdialog I use:
BringFormToFront(me.text)
But this doesnt work either?!
Any solution to this problem?
Thanks
Kenny
I have a problem using .NET CF. If I open a new form with
"settings.showdialog" and I stay on the new form for 5-10 minutes, then the
old form disappears. If I close the settings-form, then I see the
Today-Screen instead of the old form.
Must be something with timeout...
I now tried to use this:
<DllImport("coredll.dll", EntryPoint:="SetForegroundWindow",
SetLastError:=True)> _
Public Shared Function SetForegroundWindow( _
ByVal hwnd As IntPtr) As Boolean
End Function
<DllImport("Coredll", CallingConvention:=CallingConvention.Winapi,
CharSet:=CharSet.Auto)> _
Public Shared Function FindWindow(ByVal lpClassName As String, ByVal
lpWindowName As String) As IntPtr
End Function
Public Shared Function BringFormToFront(ByVal FormName As String) As Boolean
Dim hwnd As IntPtr
hwnd = (FindWindow(Nothing, FormName))
SetForegroundWindow(hwnd)
End Function
after settings.showdialog I use:
BringFormToFront(me.text)
But this doesnt work either?!
Any solution to this problem?
Thanks
Kenny