Using about box as splash screen

  • Thread starter Thread starter Michael A. Covington
  • Start date Start date
M

Michael A. Covington

Greetings all,

I have an About Box which was added to the project with Microsoft's wizard,
edited a bit so it just has 2 text box in it, and works fine.

I'm trying to also use it as a splash screen which I put up before, and take
down after, a time-consuming initialization operation. For this purpose I
made another constructor for it which does InitializeComponent(), stuffs
some different text in one of the text boxes, and then sets buttonOK.Visible
= false.

Well... When it pops up, the entire text in one of the text boxes is
highlighted.

This affects whichever text box is earlier in the tab order, and is caused
by making the OK button invisible, presumably throwing the focus to the text
box.

What should I do? My present kluge is to "hide" the button by putting a
text box in front of it but not setting it invisible.

Can the text boxes be made non-focusable?

Thanks!
 
Fixed it... and the solution was simple, and strange. See below.

Michael A. Covington said:
I have an About Box which was added to the project with Microsoft's
wizard, edited a bit so it just has 2 text box in it, and works fine.

I'm trying to also use it as a splash screen which I put up before, and
take down after, a time-consuming initialization operation. For this
purpose I made another constructor for it which does
InitializeComponent(), stuffs some different text in one of the text
boxes, and then sets buttonOK.Visible = false.

Well... When it pops up, the entire text in one of the text boxes is
highlighted.

This affects whichever text box is earlier in the tab order, and is caused
by making the OK button invisible, presumably throwing the focus to the
text box.

Cured by setting the TabStop property of each textbox to False.
 
Hi,

A solution I have used before is creating a new window before calling
Application.Run. It will have no message pump associated but that is ok.

You can later close it after your init process
 

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