简体   繁体   中英

How to know that a control is loaded in .Net Compact Framework, WinForms application?

How to know that a control is loaded in .Net Compact Framework, WinForms application?

Any ideas please...

you can check it by

 If Me.IsHandleCreated Then
  ' When winform is loaded
 End If

It depends on exactly what you mean by "loaded". The constructor is called when the Control is created, so if you need to know when an instance is creatred, that's where you'd put it.

If you want to know when it gets put into a Form/Container, then overriding OnParentChanged is probably a good place to put your code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM