How to hide the close button??

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I am developing a smart device application(pocket pc) in VB.Net. I dont
want the user to exit the application, when the close button is clicked. Or
the close button should not be there in the form. For this, what I have to
do?
Also, when the application is running, the user cannot start any other
application. My aim is to load the application in the pocket pc and give it
to the user, so that he can only run that particular application.

Regards,
Hari
 
Hi,

Make a search in the archives by "kiosk mode" this will give you the answer
to the full screen app.

to avoid closing the form , I use a bool var :
dim canClose as bool
set it to false in the constructor
in the closing event of the form:

e.Cancel = !canClose;

and voila, the form can only be closed if you set the variable to true,
where and why it's up to you

cheers,
 
To remove the (OK) or (X) set ControlBox property of the form to false.

You should lookup kiosk mode to prevent users from accessing any other
applications on the pocketpc.

/ Peter
 
In addition to what Ignacio said, if you really don't want the close (or
smart minimize) button to appear in the caption area, possibly because there
is no use for it in your application, then set the Form's "ControlBox"
property to false.

--
Tim Wilson
..Net Compact Framework MVP

<Feedback>
Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups
</Feedback>
 
Hi,
Thank you very much for your reply

Tim Wilson said:
In addition to what Ignacio said, if you really don't want the close (or
smart minimize) button to appear in the caption area, possibly because there
is no use for it in your application, then set the Form's "ControlBox"
property to false.

--
Tim Wilson
..Net Compact Framework MVP

<Feedback>
Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups
</Feedback>
 
Hi,
Thank you very much for your reply.

Ignacio Machin ( .NET/ C# MVP ) said:
Hi,

Make a search in the archives by "kiosk mode" this will give you the answer
to the full screen app.

to avoid closing the form , I use a bool var :
dim canClose as bool
set it to false in the constructor
in the closing event of the form:

e.Cancel = !canClose;

and voila, the form can only be closed if you set the variable to true,
where and why it's up to you

cheers,
 
Back
Top