[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Show and Load

Posted on 2006-05-02
7
Medium Priority
?
212 Views
Last Modified: 2010-04-16
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
0
Comment
Question by:paulwhelan
  • 5
7 Comments
 
LVL 2

Expert Comment

by:htang_us
ID: 16586728
There is an event called VisibleChanged at the end of event list. Give it a shot.
0
 

Author Comment

by:paulwhelan
ID: 16586832
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
0
 

Author Comment

by:paulwhelan
ID: 16587398
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
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 7

Accepted Solution

by:
pauljk1619 earned 225 total points
ID: 16588331
Control is used as a generic term to refer to all Controls.   All objects on your form basically inherit from the Control Class...   forms, buttons, textboxes, labels, panels, etc. etc.

I don't know what you need the Shown event for, but the Activated event will fire after the load, but if the form is refreshed, it will fire again.  I think when it's behind a form and brought to the front, it will also fire again.
0
 

Author Comment

by:paulwhelan
ID: 16594426
pauljk1619

The 'Activated' Event Handler is not showing up

I see

AutoSizeChanged

as the first.

Thanks
0
 

Author Comment

by:paulwhelan
ID: 16594451
By the way

public class ElementLabelControlPropertyPage : PropertyPage

and

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

Thanks
0
 

Author Comment

by:paulwhelan
ID: 16596039
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
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question