Click here to Skip to main content
15,924,581 members
Home / Discussions / C#
   

C#

 
GeneralRe: File Path's question Pin
Heath Stewart23-Jun-04 5:12
protectorHeath Stewart23-Jun-04 5:12 
GeneralMenu and FormBorderStyle = None Pin
23-Jun-04 0:32
suss23-Jun-04 0:32 
QuestionCan we define constructor with arguments in web service. Pin
agarwalv23-Jun-04 0:23
agarwalv23-Jun-04 0:23 
AnswerRe: Can we define constructor with arguments in web service. Pin
Heath Stewart23-Jun-04 4:47
protectorHeath Stewart23-Jun-04 4:47 
GeneralRe: Can we define constructor with arguments in web service. Pin
Anonymous24-Jun-04 18:54
Anonymous24-Jun-04 18:54 
GeneralTrouble getting designer for a component Pin
Simon_uk23-Jun-04 0:17
Simon_uk23-Jun-04 0:17 
GeneralRe: Trouble getting designer for a component Pin
Heath Stewart23-Jun-04 4:36
protectorHeath Stewart23-Jun-04 4:36 
GeneralRe: Trouble getting designer for a component Pin
Simon_uk23-Jun-04 5:33
Simon_uk23-Jun-04 5:33 
Hi,

Thanks for your information.

Yes, the designer is in the same assembly as the control it is designing. This assembly is seperate to the assembly containing the designer host, but as the designer host can 'see' the control, I'm sure it must have access to the designer as well. Both assemblies have full trust (they will only be used on intranet, and security protocols are already in use in other parts of the app, so it's not really a security risk).

I have now resolved this problem. I used Reflector to see what TypeDescriptor.CreateDesigner(IComponent comp, Type designerBaseType) was doing, and copied the code to a local method so I could debug it. If you are interested, the problem appeared to be that Type.GetType(designerBaseType) was returning null. (the designerBaseType parameter was hard-coded to IDesigner).

I got around this problem by changing all the controls (no, users will never add their own controls to this designer!) to use the constructor of the DesignerAttribute that accepts two parameters, and set the second one to the same type as the first. When the component is then added to the design form, I get the DesignerAttribute for that type, and call TypeDescriptor.CreateDesigner with the type specified in the second parameter of the attribute.

OMG OMG | :OMG: I don't really understand what I just wrote! Smile | :) - it you are really interested, feel free to email me and I'll try to explain in more detail!!!

Thanks for your reply.
Simon.

PS: Is Reflector the most AMAZING tool for .NET development?!?!
Generald Pin
Anonymous22-Jun-04 23:52
Anonymous22-Jun-04 23:52 
GeneralRe: d Pin
eggie523-Jun-04 9:58
eggie523-Jun-04 9:58 
GeneralDiscussion forum Pin
Member 94217022-Jun-04 23:51
Member 94217022-Jun-04 23:51 
GeneralRe: Discussion forum Pin
Colin Angus Mackay23-Jun-04 0:31
Colin Angus Mackay23-Jun-04 0:31 
GeneralIEndPoint Object Pin
dabuskol22-Jun-04 23:49
dabuskol22-Jun-04 23:49 
GeneralRe: IEndPoint Object Pin
Colin Angus Mackay23-Jun-04 0:33
Colin Angus Mackay23-Jun-04 0:33 
GeneralRe: IEndPoint Object Pin
dabuskol23-Jun-04 0:59
dabuskol23-Jun-04 0:59 
GeneralRe: IEndPoint Object Pin
Colin Angus Mackay23-Jun-04 1:19
Colin Angus Mackay23-Jun-04 1:19 
GeneralRe: IEndPoint Object Pin
dabuskol23-Jun-04 1:26
dabuskol23-Jun-04 1:26 
GeneralRe: IEndPoint Object Pin
Heath Stewart23-Jun-04 4:24
protectorHeath Stewart23-Jun-04 4:24 
GeneralHighlight a line that contains a string Pin
clatten22-Jun-04 23:49
clatten22-Jun-04 23:49 
GeneralRe: Highlight a line that contains a string Pin
LongRange.Shooter23-Jun-04 3:20
LongRange.Shooter23-Jun-04 3:20 
GeneralRe: Highlight a line that contains a string Pin
clatten23-Jun-04 11:44
clatten23-Jun-04 11:44 
GeneralRe: Highlight a line that contains a string Pin
clatten23-Jun-04 21:57
clatten23-Jun-04 21:57 
GeneralRequired permissions cannot be acquired Pin
Daniel Zaharia22-Jun-04 23:25
Daniel Zaharia22-Jun-04 23:25 
GeneralRe: Required permissions cannot be acquired Pin
Jochen Kalmbach [MVP VC++]23-Jun-04 0:44
Jochen Kalmbach [MVP VC++]23-Jun-04 0:44 
GeneralRe: Required permissions cannot be acquired Pin
Daniel Zaharia23-Jun-04 1:37
Daniel Zaharia23-Jun-04 1:37 

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.