|
Hi,
Excuse me for my english please.
1.My class has a readOnly property wich could be initialized by the constructor. I have MyClassConverter to customize property of this type at design-time. Evrything works ok.
But when my class becomes a component all of it properties are not accessible at design-time they are readOnly.
2.My class has a delegate type property and I need to customize it at design time too. It is possible to do it using event. But I think that there sre some methods to init it directly as delegste.
I found a lot of articles here about runTime component readOnly properties customization but didn't find anything about design time.
|
|
|
|
|
Hi!
i have c sourcecode like this
int r = 125;
if (!r) {
...
}
in c# r is a integer and not a boolean value. would it be correct to replace
if (!r) {
}
by
if (r<1) {
...
}
|
|
|
|
|
|
Hi,
if r remains always greater than 1,then this may yield u a temporary solution.
if not the above mentioned case......then in C# ,,,the expression inside if ..must be a boolean value..
if( bool )
{
}
With regards
Vinayaka shenoy
|
|
|
|
|
I create a registry key when i run at the first time my application (not during the installation).
I would set some parameter to the unistallation process that allow to delete that key or another key created by another software.
How?
Tnx.
|
|
|
|
|
Hi,
I came across an open source site quite sometime ago that was developing a zip compression util for packaging your application in. The idea was to have all but one of your binary files in the zipped up package and the exe that started the application would unzip the package before starting the main app...
I've tried googling it and searching on some old stuff on the PC but ca't for the life of me remember who, where or what the system was called!
Has anyone heard of such a thing?
Cheers,
John'o
|
|
|
|
|
7zip?
InnoSetup is a good open source installer too.
|
|
|
|
|
Are the Xceed and Nevron charts for .NET the same thing?
|
|
|
|
|
Hi,
I have the following code,
Form MDIChild = new Form1();
mdiChild.MdiParent = this; not sure what this does
MDIChild.Show();
When i run the code with line 2 it gives me the error message "namespace mdichild can not be found"
However if i comment out line 2,it works fine. I am not sure what line 2 does. Please can someone explain,and also explain how i should fix this.
Thanks
|
|
|
|
|
Anonymous wrote:
mdiChild.MdiParent = this;
try changing this to MDIChild.MdiParent = this;
HTH, cheers
Maqsood Ahmed [MCP,C#]
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
what it should do (if you change the mdiChild to it's correct name MDIChild) is assign the current form as mdiparrent to the MDIChild form.
maybe the names confuse you. here is a better example:
<br />
Form P = new Form();<br />
Form C = new Form();<br />
P.IsMdiContainer = true;
C.MdiParent = P;
P.Show();<br />
C.Show();<br />
bare in mind that once a from is a mdiChild it cannot be a MdiParent as well(as in you can't have a mdi form inside an mdiform). In the above example if you set C.IsMdiContainer = true; an exception will be raised.
|
|
|
|
|
|
hi,
i included a mainmenu with a few menuitems into my project.
when i now drag the mouse over the menuitems in the mainmenu their background changes to a dark blue. what event is called to do this? i want to paint my own background when the user moves the mouse over the items. all i found was the select event, but this one is only fired when the user clicks on one of the menuitems. there should be another one, e.g. like mouseover. can't find it anywhere.
does anyone knows what event is fired when the user drags the mouse over a regular menu?
thanks for help
pikebu
|
|
|
|
|
Try using the Popup event which is fired before a menu item's list of menu items is displayed. Use it for the "parent" menu-item.
|
|
|
|
|
Hi Pikebu,
The MenuItem.Select event IS raised when the user hovers their mouse over a menu item. However, I don't think this will help you.
You need to set the MenuItem.OwnerDraw property to true , and then handle the DrawItem event (which is only raised when if OwnerDraw == true ). In the DrawItem handler, you can draw your own rectangle, change the colour and font of the text, etc.
see MSDN here... MenuItem.DrawItem event[^]
Hope this helps,
Gary Perkin.
|
|
|
|
|
the problem is, that the select event is only raised, when i click on the mainmenu and then move the mouse over the menuitems. only dragging the mouse over the menuitems in my mainmenu doesn't raise the select event.
i set ownerdraw to true and implemented my own code to draw all items. it's working fine for all items, which are in a submenu. the problem is only with the menuitems on the mainmenu.
|
|
|
|
|
Hi,
You're right! Sorry, I misread your original post
It's an interesting question...
Gary.
|
|
|
|
|
ha, figured it out!
you have to check for the state in the overwritten OnDrawItem method.
the state which is true when the user moves the mouse over the menuItem without clicking is called HotLight. with a mouse click the state changes to Selected.
|
|
|
|
|
Hi,
That's a bit freaky! I just posted the same solution!
Does this count as Pair Programming???
Glad you sorted it.
Gary.
|
|
|
|
|
Hello again,
Just did a bit of experimenting...
I set OwnerDraw = true on a MainMenu MenuItem, and in the DrawItem handler I output e.State to a listbox. When the mouse entered the menuitem, the state was "HotLight, NoAccelerator", but when it left, it was "NoAccelerator" This will let you determine if the mouse is entering or leaving, and nobody needs to click anything.
Not sure if this helps or not - you'll have to draw your own MainMenu items (you may already be doing this).
Good luck!
Gary.
|
|
|
|
|
|
Hi,
How to hide modal dialog box when I call function InternetDial from WinInit.dll?
Thanks!
|
|
|
|
|
Hi all,
How do I know what language (VB, C#, J#, etc.) a web Project is?
Also, how do I know what type of project (Class Library, Console Aplication,
Web Project) it is?
Regards,
Rathish P S
|
|
|
|
|
If you are using visual studio ,then you will find the project file contains the language in it's extention like *.csproj , and *.vbproj.
|
|
|
|
|
I am using VS 2005 and for web projects, there is no .vbproj or .csproj in 2005. We can't use this method. Only way is some how findout the language used from the web.config file, since now all are maintaining in web.config file. Also I want to know it programmatically using EnvDTE or some objects like that. Can you help me?
Regards,
Rathish P S
|
|
|
|