Link to home
Start Free TrialLog in
Avatar of paulwhelan
paulwhelan

asked on

Show and Load

Hi

I have a page and when I go to events it has a Load event.
When I double click on it I can do something like

private void ElementLabelControlPropertyPage_Load(object sender, EventArgs e)
        {
            MessageBox.Show("This is a test");
        }

But I want to do a Shown event.

But Shown isnt in the list of Events.

Is there a way to make it appear in the properties?

Thanks
Paul
Avatar of htang_us
htang_us

There is an event called VisibleChanged at the end of event list. Give it a shot.
Avatar of paulwhelan

ASKER

Thanks htang_us but its the same as the Load Event.

i.e. they both show the message before my page loads.


private void ElementLabelControlPropertyPage_VisibleChanged(object sender, EventArgs e)
        {
            MessageBox.Show("test");
        }

Is there another event I can use?
Or can I make Show appear in the list of events?

thanks
Paul
BTW when it says 'Control' as in
CursorChanged - Event raised when the value of the cursor property is changed on Control.

what does Control mean?
Thanks
Paul
ASKER CERTIFIED SOLUTION
Avatar of pauljk1619
pauljk1619

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
pauljk1619

The 'Activated' Event Handler is not showing up

I see

AutoSizeChanged

as the first.

Thanks
By the way

public class ElementLabelControlPropertyPage : PropertyPage

and

public class PropertyPage : UserControl
   
(UserControl is System.Windows.Forms.UserControl)

Thanks
Interestingly if I change

public class ElementLabelControlPropertyPage : PropertyPage
to
public class ElementLabelControlPropertyPage : Form

I can do

this.Shown

------------------------------

Is it possible to do
public class ElementLabelControlPropertyPage : PropertyPage, Form
it doesnt seem to allow me?

Or is there another way around it?

Thanks
Paul