Click here to Skip to main content
15,914,109 members
Home / Discussions / C#
   

C#

 
GeneralRe: CONTROLLING PROCESSES Pin
Heath Stewart12-Jun-04 5:00
protectorHeath Stewart12-Jun-04 5:00 
GeneralRe: CONTROLLING PROCESSES Pin
_Comet_Keeper_12-Jun-04 10:07
_Comet_Keeper_12-Jun-04 10:07 
GeneralRe: CONTROLLING PROCESSES Pin
Heath Stewart12-Jun-04 10:34
protectorHeath Stewart12-Jun-04 10:34 
GeneralBandwidth usage info Pin
Liskl12-Jun-04 2:19
Liskl12-Jun-04 2:19 
GeneralRe: Bandwidth usage info Pin
Heath Stewart12-Jun-04 4:47
protectorHeath Stewart12-Jun-04 4:47 
GeneralNewbish Question on Child/Parent Issues Pin
Anonymous11-Jun-04 23:39
Anonymous11-Jun-04 23:39 
GeneralRe: Newbish Question on Child/Parent Issues Pin
bneacetp12-Jun-04 0:45
bneacetp12-Jun-04 0:45 
GeneralRe: Newbish Question on Child/Parent Issues Pin
Heath Stewart12-Jun-04 5:10
protectorHeath Stewart12-Jun-04 5:10 
If the "Child" you refer to is in the "Parent"'s Controls collection, then use the Parent property (as the other reply stated), but you must cast the return value to your "Parent"'s class. The Parent property, for example, returns a Control. Your "Parent" derives from that (if you're talking about controls for child and parents, that is), but your method is not defined on the Control class, is it? It's defined on your class. In C#, you can use the keyword as to perform a safe cast, so that if the type isn't valid an InvalidCastException is not thrown, like so:
MyForm form = this.Parent as Myform;
if (form != null) form.SomeMethod();


 

Microsoft MVP, Visual C#
My Articles
GeneralTimeZone problem Pin
Andy *M*11-Jun-04 23:34
Andy *M*11-Jun-04 23:34 
GeneralRe: TimeZone problem Pin
Dave Kreskowiak12-Jun-04 2:08
mveDave Kreskowiak12-Jun-04 2:08 
GeneralRe: TimeZone problem Pin
Andy *M*12-Jun-04 2:58
Andy *M*12-Jun-04 2:58 
GeneralRe: TimeZone problem Pin
Heath Stewart12-Jun-04 5:07
protectorHeath Stewart12-Jun-04 5:07 
GeneralSending message to a window Pin
DavidR_r11-Jun-04 21:50
DavidR_r11-Jun-04 21:50 
GeneralRe: Sending message to a window Pin
Anonymous11-Jun-04 23:33
Anonymous11-Jun-04 23:33 
GeneralRe: Sending message to a window Pin
Heath Stewart12-Jun-04 5:03
protectorHeath Stewart12-Jun-04 5:03 
GeneralRFID - Capturing Data Pin
Tarakeshwar11-Jun-04 21:24
Tarakeshwar11-Jun-04 21:24 
GeneralRe: RFID - Capturing Data Pin
Andy *M*11-Jun-04 23:22
Andy *M*11-Jun-04 23:22 
GeneralRe: RFID - Capturing Data Pin
Heath Stewart12-Jun-04 4:51
protectorHeath Stewart12-Jun-04 4:51 
Generalc# Stream buffer problem Pin
Liskl11-Jun-04 19:14
Liskl11-Jun-04 19:14 
GeneralRe: c# Stream buffer problem Pin
leppie11-Jun-04 20:53
leppie11-Jun-04 20:53 
GeneralRe: c# Stream buffer problem Pin
Heath Stewart12-Jun-04 4:49
protectorHeath Stewart12-Jun-04 4:49 
Generaljetaudio5, winamp5 and wmp9 Pin
Taha Elsayed11-Jun-04 16:29
Taha Elsayed11-Jun-04 16:29 
GeneralRe: jetaudio5, winamp5 and wmp9 Pin
Arjan Einbu11-Jun-04 23:22
Arjan Einbu11-Jun-04 23:22 
GeneralFinding and repeating a character Pin
Rostrox11-Jun-04 15:23
Rostrox11-Jun-04 15:23 
GeneralRe: Finding and repeating a character Pin
Rostrox12-Jun-04 3:40
Rostrox12-Jun-04 3:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.