views:

201

answers:

2

I have a simple Windows Form application that is using the .net 3.5 compact framework.

I have a UserControl that I have created to show a Message to the user(I don't want to use the MessageBox as the close icon is too small)

How do I get my UserControl to show on top of all of the other Grids and controls? The UserControl is declared in a Base form that the main forms inherit from and it is never visible.

A: 

Did you try the Control.BringToFront method?

Fredrik Mörk
A: 

Does userctl.BringToFront() work? And of course you should set Visible=rue

Henk Holterman
As a comment. You need to set Visible to true, execute the bringtoFront() methode, set the Index to something higher than other controls and you must add the Control to the Form (ie Form.Controls.Add(ctrl); if you did not use the designer to create the control
runxc1 Bret Ferrier