Not letting the user exit

C

chook.harel

Hi, I'm trying to build a form on POCKET PC 2003 SE,
That I don't want my user to beable to get out from...

I've locked the form with the CLOSING event...

but he can still click the Start button at the top left corner of it...

what can I do ?
should i invoke lost focus or something?
 
C

chook.harel

Hey thanks for the info..
Too much information on the subject!

First, were can I find this coredll.dll everybody's talking about
Second, I've tried SPB but then relized they want 1000$..

So what do you suggest I do next?
 
C

chook.harel

Why not just use

this.WindowState = System.Windows.Forms.FormWindowState.Maximized; ?
 
A

Anatoliy

Hi
I symply hide the "Start" button:
On Global module:

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ F O R M S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'<DllImport("aygshell.dll")> Public Function SHFullScreen(ByVal
hwndRequester As IntPtr, ByVal dwState As Integer) As Integer
'End Function

'<DllImport("coredll.dll")> Public Function GetCapture() As IntPtr
'End Function
Declare Function GetCapture Lib "coredll.dll" () As IntPtr
Declare Function SHFullScreen Lib "aygshell.dll" (ByVal hWnd As
IntPtr, ByVal state As Integer) As Boolean
Declare Function SetWindowPos Lib "coredll.dll" (ByVal hWnd As
IntPtr, _
ByVal hWndInsertAfter As IntPtr, ByVal x As Integer, _
ByVal y As Integer, ByVal cx As Integer, ByVal cy As Integer,
_
ByVal flags As Integer) As Boolean

Public Enum enShowHide
enShowTaskbar = &H1
enHideTaskbar = &H2
enShowSipButton = &H4
enHideSipButton = &H8
enShowStartButton = &H10
enHideStartButton = &H20
End Enum
'End ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ F O R M S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Property form:

Private _iSHFS As enShowHide 'отображать ли
контролы типа кнопки "Start" при
активации формы
Public Property ShowHideStart() As Integer
Get
Return CInt(_iSHFS)
End Get
Set(ByVal aiSHFS As Integer)
'Me.ShowHideStart = CInt(enShowHide.enHideStartButton)
'Ñкрыть кнопку "Start"
_iSHFS = CType(aiSHFS, enShowHide)
Capture = True
Dim hwnd As IntPtr = GetCapture()
Capture = False
SHFullScreen(hwnd, _iSHFS)
End Set
End Property

On load form:
Me.ShowHideStart = CInt(enShowHide.enHideStartButton)
'Ñкрыть кнопку "Start"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top