How to have user can only control aboutbox?

  • Thread starter Thread starter Boki
  • Start date Start date
B

Boki

Hi All,

It is very convenient to make a About box in C#.

My problem is how to let user must to click OK to close this About
box. ( user should not allow to click any other place at this time )

Thank you!

Best regards,
Boki.
 
if you are making windows app, you can open the aboutbox from with
showdialog(). like this

Form aboutbox = new Form();
aboutbox.ShowDialog();
 
How are you showing the About box?

Try calling .ShowDialog(this)
[where this refers to the calling Form]

Marc
 
How are you showing the About box?

Try calling .ShowDialog(this)
[where this refers to the calling Form]

Marc

Hi

I have tried, but I can still click anywhere outside the about box.
(original I used .show() )

Boki.
 
ShowDialog with an owner will block that owner until you leave the
modal form. *where* can you click? What is the setup here? (how many
forms open at once).

If you mean you don't want the user to be able to do anything *at all*
(i.e. blocking other apps aka system modal) until closed, then simply:
don't do this

Marc
 
ShowDialog with an owner will block that owner until you leave the
modal form. *where* can you click? What is the setup here? (how many
forms open at once).

If you mean you don't want the user to be able to do anything *at all*
(i.e. blocking other apps aka system modal) until closed, then simply:
don't do this

Marc

sorry, I still can click 'start' button of Windows, is that correct ?

I want use can only click ok of my messagebox, I believe I missed some
setting... but I don't konw... yet. :)

Boki.
 
sorry, I still can click 'start' button of Windows, is that correct ?

I want use can only click ok of my messagebox, I believe I missed some
setting... but I don't konw... yet. :)

Boki.

You realize that this is non-standard behaviour: you want to make the
dialog box modal not only for your application but for the whole
machine. In effect, you want your single application take control of
the whole machine for a while. Do you really want to prevent the user
from launching any other application, from doing anything else with
any other program, until they dismiss your "About" dialog?

What does your application do, that it is much more important than
anything else on the user's machine?
 
I say again... "don't do this" - or at least, not in a standard client
app; quite simply, it is rude to assert that your app is so much more
important than everything else the user is doing.

In some circumstances it is reasonable - standalone UIs for instance
at a demo stand, or on dedicated (non-user) hardware such as an ATM or
other similar device. Various tools are available to switch into this
mode of use; I have never had the need to use any, so I can't
recommend any particular one.

Marc
 
I say again... "don't do this" - or at least, not in a standard client
app; quite simply, it is rude to assert that your app is so much more
important than everything else the user is doing.

In some circumstances it is reasonable - standalone UIs for instance
at a demo stand, or on dedicated (non-user) hardware such as an ATM or
other similar device. Various tools are available to switch into this
mode of use; I have never had the need to use any, so I can't
recommend any particular one.

Marc

Thanks, I agree.

However, is this function doable ?

When I were using Vista, I can saw this behavior when I installed new
program.
I think my app should not use this feature for now, but curious the
implement method.

Thanks!

Boki.
 
When I were using Vista, I can saw this behavior when I installed new
program.
I think my app should not use this feature for now, but curious the
implement method.

It sounds as though you are thinking of the UAC user interface that's
built into Vista. This was implemented for a very specific need: to alert
users in a very clear way that the operating system has shifted modes
temporarily and is requiring the user to provide guidance regarding some
potentially dangerous operation (for example, installing software or
running certain kinds of software).

This is definitely not something that normal applications should do. It's
a behavior that is implemented in an integral way by the operating system,
reserved for use only by the operating system.

Pete
 

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

Back
Top