How to hide the close button??

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
 
I

Ignacio Machin \( .NET/ C# MVP \)

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,
 
P

PeterB

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
 
T

Tim Wilson

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>
 
G

Guest

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>
 
G

Guest

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,
 

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