Click here to Skip to main content
15,897,371 members
Home / Discussions / C#
   

C#

 
AnswerRe: How does a Component get its parent form Pin
Pete Bassett8-Jan-03 22:28
Pete Bassett8-Jan-03 22:28 
GeneralRe: How does a Component get its parent form Pin
charliedurrant9-Jan-03 6:07
charliedurrant9-Jan-03 6:07 
GeneralRe: How does a Component get its parent form Pin
leppie9-Jan-03 6:17
leppie9-Jan-03 6:17 
GeneralRe: How does a Component get its parent form Pin
James T. Johnson11-Jan-03 0:03
James T. Johnson11-Jan-03 0:03 
GeneralRe: How does a Component get its parent form Pin
James T. Johnson11-Jan-03 0:05
James T. Johnson11-Jan-03 0:05 
AnswerRe: How does a Component get its parent form Pin
James T. Johnson11-Jan-03 0:01
James T. Johnson11-Jan-03 0:01 
GeneralRe: How does a Component get its parent form Pin
leppie11-Jan-03 0:31
leppie11-Jan-03 0:31 
GeneralRe: How does a Component get its parent form Pin
James T. Johnson11-Jan-03 0:42
James T. Johnson11-Jan-03 0:42 
leppie wrote:
is all good and well for desugntime, but at runtime I still need a reference to the form's handle.

Which is where the link comes in; what you wind up doing is tricking the designer into persisting a reference to the hosting form. So at runtime you can get the handle to it from the reference you got during the InitializeComponent phase of the form loading process.

leppie wrote:
Is it even a good idea to make something like nBASS a component?

I would think so; especially if you implement something like the above to automatically get the handle.

James

"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation

GeneralRe: How does a Component get its parent form Pin
leppie11-Jan-03 1:39
leppie11-Jan-03 1:39 
GeneralRe: How does a Component get its parent form Pin
Anonymous12-Jan-03 3:15
Anonymous12-Jan-03 3:15 
GeneralRe: How does a Component get its parent form Pin
leppie12-Jan-03 6:06
leppie12-Jan-03 6:06 
GeneralRe: How does a Component get its parent form Pin
James T. Johnson12-Jan-03 11:34
James T. Johnson12-Jan-03 11:34 
GeneralRe: How does a Component get its parent form Pin
leppie13-Jan-03 6:18
leppie13-Jan-03 6:18 
QuestionToolbar Button Groups? Pin
Jamie Nordmeyer8-Jan-03 8:27
Jamie Nordmeyer8-Jan-03 8:27 
GeneralSpawn a commandline window with environment Pin
kman8-Jan-03 7:05
kman8-Jan-03 7:05 
GeneralRe: Spawn a commandline window with environment Pin
leppie8-Jan-03 7:36
leppie8-Jan-03 7:36 
GeneralRe: Spawn a commandline window with environment Pin
kman8-Jan-03 17:27
kman8-Jan-03 17:27 
GeneralRe: Spawn a commandline window with environment Pin
Daniel Turini8-Jan-03 8:02
Daniel Turini8-Jan-03 8:02 
GeneralCombobox: leaving on enter-key Pin
Nachte8-Jan-03 2:41
Nachte8-Jan-03 2:41 
GeneralRe: Combobox: leaving on enter-key Pin
mikasa8-Jan-03 2:57
mikasa8-Jan-03 2:57 
GeneralBrowser Helper Object Pin
Boris Yankov7-Jan-03 16:12
Boris Yankov7-Jan-03 16:12 
GeneralWindows XP fast user switching Pin
Alex Korchemniy7-Jan-03 13:51
Alex Korchemniy7-Jan-03 13:51 
GeneralString formatting Pin
Le centriste7-Jan-03 9:38
Le centriste7-Jan-03 9:38 
GeneralRe: String formatting Pin
leppie7-Jan-03 9:51
leppie7-Jan-03 9:51 
GeneralRe: String formatting Pin
Le centriste7-Jan-03 11:14
Le centriste7-Jan-03 11:14 

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.