Hi Kevin,
Have you found a solution to the prblem you described in the attached message? If so, could you please share it with me?
Thanks,
Yuriy
>I can probably re-state my question a little more clearly. Here are the steps I'm following:
>
>1) I create a label class with a font of Arial 8 bold. Basically, I'm doing the following:
>
>public SgiLabel()
>{
>// This call is required by the Windows.Forms Form Designer.
>InitializeComponent();
>this.Font = new Font("Arial",18,System.Drawing.FontStyle.Bold );
>}
>
>
>2) I drop the label class on a form, and set the text to "test"
>3) If I look in the form code [in the Windows Form Designer generated code], I see a reference to the following:
>
> this.sgiLabel1.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Bold);
>
>4) Now I'll go back to the label class and change the Arial 8 bold [maybe to Arial 10 bold],
>
>5) When I load the form again that had the label class on it, the font still reads Arial 8 bold...not the Arial 10 bold that I changed it to in step 4.
>
>6) The only way I can set it to what it 'should' be is to bring up the font property in the property sheet, right-click, and then select RESET.
>
>Maybe I'm missing something here. I could do this easily in VFP...so long as I never explictly tried to override the front on the form where the label was dropped, it would always inherit from my class. However, it seems that the inheritance gets 'broken' right away...but again, I might be doing something wrong.
>
>Any clues? I'm trying to subclass all the standard WinForm controls, and this isn't working the way I had expected. Help!
>
>Thanks,
>Kevin
Yuri Rudenko
MCSD, MCP