Click here to Skip to main content
15,891,597 members
Home / Discussions / C#
   

C#

 
AnswerRe: Connect with Sqlserver! Pin
Sathesh Sakthivel12-Apr-07 17:35
Sathesh Sakthivel12-Apr-07 17:35 
QuestionWeb Service Authentication Pin
Cheng Dehua12-Apr-07 16:19
Cheng Dehua12-Apr-07 16:19 
AnswerRe: Web Service Authentication Pin
Sathesh Sakthivel12-Apr-07 16:34
Sathesh Sakthivel12-Apr-07 16:34 
GeneralRe: Web Service Authentication Pin
Jaiprakash M Bankolli12-Apr-07 19:53
Jaiprakash M Bankolli12-Apr-07 19:53 
QuestionAsk about displaying records in Crystal report Pin
phantanagu12-Apr-07 16:16
phantanagu12-Apr-07 16:16 
AnswerRe: Ask about displaying records in Crystal report Pin
Sathesh Sakthivel12-Apr-07 17:17
Sathesh Sakthivel12-Apr-07 17:17 
GeneralRe: Ask about displaying records in Crystal report Pin
phantanagu12-Apr-07 21:47
phantanagu12-Apr-07 21:47 
QuestionHiding unwanted properties [modified] Pin
Chris_McGrath12-Apr-07 14:45
Chris_McGrath12-Apr-07 14:45 
I have a Control and a Form. The Form is a member of the Control. I exposed the form on the Control using a get property...
class MyWindow : Form<br />
{<br />
....public int MyProp<br />
....{<br />
........get... set...<br />
....}<br />
}<br />
<br />
class MyControl : Control<br />
{<br />
....public MyWindow Window<br />
....{<br />
........get... set...<br />
....}<br />
}

This of course shows up in the property Window of the Control and has all the Form properties and my properties.

I however don't want to see any of the Form properties, only the Window ones. So I decided to write an interface...
<br />
interface Window : IComponent<br />
{<br />
....int MyProp<br />
....{<br />
........get; set;<br />
....}<br />
}<br />
<br />
class MyWindow : Form, Window<br />
{<br />
    ...<br />
}<br />
<br />
class MyControl : Control<br />
{<br />
....public Window Window<br />
....{<br />
........get... set...<br />
....}<br />
}<br />


I found out the interface will not show up in the designer if it doesn't inherit from IComponent.

However, even when I do this all of the Form properties are still shown.

Does anyone know how to fix this? At the moment I have settled for pass-through properties on my Control. (And I don't want to override evey method add the Browsable(false) attribute to each one

Thanks,
Chris McGrath


-- modified at 21:04 Thursday 12th April, 2007
AnswerRe: Hiding unwanted properties Pin
AlwiNus14-Apr-07 12:16
AlwiNus14-Apr-07 12:16 
AnswerRe: Hiding unwanted properties Pin
Tristan Rhodes16-Apr-07 3:31
Tristan Rhodes16-Apr-07 3:31 
Questionbarcode scanner Pin
SVb.net12-Apr-07 12:14
SVb.net12-Apr-07 12:14 
AnswerRe: barcode scanner Pin
Christian Graus12-Apr-07 12:21
protectorChristian Graus12-Apr-07 12:21 
AnswerRe: barcode scanner Pin
stancrm12-Apr-07 20:17
stancrm12-Apr-07 20:17 
GeneralRe: barcode scanner Pin
SVb.net15-Apr-07 2:29
SVb.net15-Apr-07 2:29 
QuestionConverting from byte[] to byte* Pin
Kim Ferrari12-Apr-07 10:15
Kim Ferrari12-Apr-07 10:15 
AnswerRe: Converting from byte[] to byte* Pin
George L. Jackson12-Apr-07 12:08
George L. Jackson12-Apr-07 12:08 
QuestionHow c# app connect to sql server on another pc in local network? Pin
sgeorgije12-Apr-07 9:28
sgeorgije12-Apr-07 9:28 
AnswerRe: How c# app connect to sql server on another pc in local network? Pin
Pete O'Hanlon12-Apr-07 10:10
mvePete O'Hanlon12-Apr-07 10:10 
QuestionRe: How c# app connect to sql server on another pc in local network? Pin
sgeorgije15-Apr-07 1:59
sgeorgije15-Apr-07 1:59 
AnswerRe: How c# app connect to sql server on another pc in local network? Pin
Pete O'Hanlon15-Apr-07 9:24
mvePete O'Hanlon15-Apr-07 9:24 
QuestionMargins on TabControl Tabs Pin
Tojiro12-Apr-07 9:21
Tojiro12-Apr-07 9:21 
Questionsave dialog Box Pin
EEmaan12-Apr-07 9:04
EEmaan12-Apr-07 9:04 
AnswerRe: save dialog Box Pin
Sathesh Sakthivel12-Apr-07 9:15
Sathesh Sakthivel12-Apr-07 9:15 
GeneralRe: save dialog Box Pin
EEmaan12-Apr-07 9:41
EEmaan12-Apr-07 9:41 
AnswerRe: save dialog Box Pin
J$12-Apr-07 10:55
J$12-Apr-07 10:55 

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.