Hi leppie, Thanks, leppie wrote: add another constructor That is a great Idea. It works. But, (in my project) this will require code modification in a lot of places. Actually, I have a base form and around 40 forms derived from this base form. It would be wonderful, if I could put some code in the Base Form constructor itself, instead of modifying the constructor of all derived forms. But I liked your Idea, and I will keep it as a last option. leppie wrote: check the DesignTime property I had tried this before, but this property always returns false. Can you put some more light into this (how to use the DesignTime property). Thanks, Firoz
Firoz
Posts
-
Identifying DesignTime Mode for Forms -
Identifying DesignTime Mode for FormsHi, Is there any way for differentiating whether a Forms Constructor is called at DesignTime (by the FormsDesigner) or at Runtime. I have some code in a Forms Constructor that should be executed only when the Application is Run, and not when the Form is opened by the Forms Designer. Thanks, Firoz
-
Identifying DesignTime Mode for FormsHi, Is there any way for differentiating whether a Forms Constructor is called at DesignTime (by the FormsDesigner) or at Runtime. I have some code in a Forms Constructor that should be executed only when the Application is Run, and not when the Form is opened by the Forms Designer. Thanks, Firoz
-
References HowTo:Hi Leppie, Thanks for your Reply. But, thats not the problem. I will explain it in Detail. I have created a simple UserControl. There are some limitations(or you can say Bugs) in this control. One such limitation is that the CopyLocal property of the Reference to this Control should always be FALSE. When this control is added to the References of any project, by default the IDE makes the CopyLocal property of the reference to TRUE. Now, this Control is used by some other developers also. and, I cannot ask or expect those guys to manually change the CopyLocal property from True to FALSE everytime they add my control to their Projects. So, I need a WAY by which the CopyLocal property should be FALSE automatically whenever my Control is added to any Project. Actually, I feel(or wish) there is some simple way to do this. Like some Assembly Arributes which will expose the Value for CopyLocal property and the IDE will read it from the Assembly when it is added to the Reference and set the CopyLocal property accordingly. But, I could not find any such Attribute... Thanks, Firoz
-
References HowTo:Hi, I have two Queries... First:
Is there any way by which I can Specify (In my Assembly itself) that
the CopyLocal Property of a Reference to my Assembly should be False?ie: Whenever my assembly is added into any Project (References), the CopyLocal property for that Reference should be False by default. Note: It should be possible without making the Assembly Strong Named. And,
Does the Framework/VisualStudio IDE raise any Event or send any kind of
Notification to the Assembly when a Reference to it is Added or Removed from a Project.ie: I want to execute some code from within my assembly when that Assembly is Added or Removed from the References collection of any Project. Thanks, Firoz
-
References HowTo:Hi, I have two Queries... First:
Is there any way by which I can Specify (In my Assembly itself) that
the CopyLocal Property of a Reference to my Assembly should be False?ie: Whenever my assembly is added into any Project (References), the CopyLocal property for that Reference should be False by default. Note: It should be possible without making the Assembly Strong Named. And,
Does the Framework/VisualStudio IDE raise any Event or send any kind of
Notification to the Assembly when a Reference to it is Added or Removed from a Project.ie: I want to execute some code from within my assembly when that Assembly is Added or Removed from the References collection of any Project. Thanks, Firoz
-
References QueriesHi, I have two Queries... First:
Is there any way by which I can Specify (In my Assembly itself) that
the CopyLocal Property of a Reference to my Assembly should be False?ie: Whenever my assembly is added into any Project (References), the CopyLocal property for that Reference should be False by default. Note: It should be possible without making the Assembly Strong Named. And,
Does the Framework/VisualStudio IDE raise any Event or send any kind of
Notification to the Assembly when a Reference to it is Added or Removed
from a Project.ie: I want to execute some code from within my assembly when that Assembly is Added or Removed from the References collection of any Project. Thanks, Firoz
-
how to convert intptr into hwndHi, Get the Integer from IntPtr and then get HWND from the Integer. eg:
hWnd = (HWND)((int)iPtr);
Thanks, Firoz -
ToolBoxBitMap AttributeHow to Use the ToolBoxBitMap Attribute for a control Created using ManC++. I tried the way it is done in C#, but I get an Error (Undeclared Identifier) for the Type parameter of ToolBoxBitMap Attribute .
namespace XYZ
{
[ToolboxBitmap(__typeof(MyControl))]
public __gc class MyControl : public UserControl
{
//
};
}The Project also have a bitmap(with the name MyControl.bmp) as a resource. Where am I going wrong ? Thanks, Firoz
-
CopyLocal Mystery in Man C++Hi, I had posted this earlier here, but got no response. I am trying my luck again (by changing the Subject Line...;)) I have a User Control (created using Man C++) When I try to place this Control on a form, the Form Designer throws an Exception( 0x80131019). And I am not allowed to place the control on the form. This happens when the CopyLocal Property of the Reference is True. But if I change the CopyLocal property to False, the Designer wholeheartedly accepts the Conrtrol. The Form Designer doesnt behave this way with controls made using C# or VB.Net. Can someone please tell me what difference does CopyLocal property make to the Form Designer ? Why does this happen only with Controls created in Managed Cpp? My control does nothing extraordinary, but just some Drawings in the OnPaint(). Please, somebody Help me..... Thanks, Firoz
-
Error code (0x80131019) ??Hi, I created a CustomConrol using ManagedC++. This Control is Used in a C# Application. When I Drop/Draw this Control to a Form, I get an error message "Exception from HRESULT : 0x80131019". But when I set the CopyLocal property of the Reference to False, the Control is properly Drawn. Why does this happen. Why it gives Error when CopyLocal is True? What does the Error code (0x80131019) mean ? (I was not able to find this HRESULT Code in WinError.h) Thanks, FiroZ
-
Custom control questionHi, Try the DrawBorder() or DrawBorder3D() Methods of the ControlPaint class. Thanks, FiroZ
-
Post Build Step in C#Hi, I was not able to find the option for PostBuild Action in the C# Project Properties. (Where I can Specify some Dos commands to run after the project is Compiled) Is there any alternative feature avaliable? Thanks, FiroZ
-
UserControl using Man C++Hi, Is it possible to create a UserControl in Managed C++? Can someone please tell me the Steps. Thanks, FiroZ
-
DirectX and .NetHi, How can I use DirectX objects in a .Net Application (vb or C#). Thanks, Firoz
-
(OLE) ToolBars of Embedded Object.hi, I have a Word document Embedded in a VB Application (OLE). I want to dispaly the ToolBars of Word in my VB Apllication. How can I do this. Please help... Thanks, FiroZ
-
Good looking OLEI have a Word document Embedded in a VB Application (OLE). How can I get rid of the dirty Border that comes around the OLE document ??? Please help... Thanks FiroZ
-
Scrolling the ScrollBarsHi, How can I scroll the standard ScrollBars of an MDI Form, programatically ?? (note: I am talking about the Standard/Default scrollbars and not the ScrollBar control) I tried using the Following APIs : SendMessage(...WM_VSCROLL...) and SetScrollPos(...) But it doesnt work...:( Please someone suggest me a way to do this... Thanks, FiroZ
-
URGENTWow...That really is a great idea... FiRoZ
-
Does the number of events affect Performance ??Hi, I have a DCOM application, where the component fires 8-10 events. But all the events are similar in structure. (ie. they doesnt have any data associated with them). The only difference is the event name. So, I can easily use a single event to Notify all my events to the client (And have some Parameter that distinguishes the event to the client). Now, my question is will this (using a single event in place of many events) provide any PERFORMANCE benefits in a DCOM application ?? if yes, How ?? (some technical description will be appreciated) anyway, the number of Network RoundTrips is going to be the same... if no, What will be a good COM programming practice in this situation. (using a Single event or using different events) Please somebody reply ...:( I had posted this earlier, but got no response... Thanks, Firoz.