|
try to look at Janus Controls
www.janusys.com
let me know if this help
|
|
|
|
|
When I've created my own class derived from a Form or UserControl or the like, is there some way to filter (at least temporarily) the drop down list of methods/properties/events to just those I defined in my class, rather than the several billion that are inherited? More generally, this would be filtering to the child-most class.
Matt Gerrans
|
|
|
|
|
I'm afraid that there are no built in options for that. There's probably a tool with intellisense the way you want to have it. But, most of the tools that I've tried are not too professional and make the VS.net more complex and probably more annoying than helpful.
Anyone out there actually have a tool with better intellisense than VS.net?
|
|
|
|
|
Has anyone run into a problem where you would register a C# project for com interop, look at the .tlb file that gets generated, and have all the interfaces in your project be missing? This is exactly the problem I'm having and it's driving me nuts. All other projects I've ever done the interfaces showed up like they should. I even have all their ComVisible attributes set to true. Any ideas?
|
|
|
|
|
i have a listview set up as detail view, and would like the text to wrap to next line for each column. i have LabelWrap set to true, but it still appends the "..." after the text.
|
|
|
|
|
According to MSDN:
When the LabelWrap property is set to true, the item text is wrapped to the next line of text if needed. If the text is longer than two lines of text, the text is shortened.
Seems like you're limited to two lines. You can rewrite the painting code.
|
|
|
|
|
Hello,
I have a Form of a Smart Device Application with a constructor and a defined Form_Load event. When i the form is created which method is first executed - the constructor or the Form_Load??
regards
pat
|
|
|
|
|
You can quickly check this by putting breakpoint in both Constructor and Form_Load method and run it. See which one gets called first...
Sandeep Naik
|
|
|
|
|
Or with logic: does it make sense for any method to be called before a constructor?
By the way, if you have multiple constructors and you're using the debugger method suggested, may want to put breakpoints in all of them.
Matt Gerrans
|
|
|
|
|
Yes, static methods and type constructors.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Well, yes, if you want to pick nits.
If you insist, instead of "does it make sense for any method to be called before a constructor?" it should be "does it make sense for any instance method to be called before a constructor?" or perhaps "does it make sense for any static method to be called before a type constructor?" or maybe the two combined.
Matt Gerrans
|
|
|
|
|
When instantiating ANY class, the constructor is always the first thing that is called.
Do you want to know more?
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
|
|
|
|
|
Well, heck, if you were just going to blurt it out, couldn't you have done it in the form of a Vogon poem?
Matt Gerrans
|
|
|
|
|
Matt Gerrans wrote:
couldn't you have done it in the form of a Vogon poem?
I tried once, but I got these intestinal cramps and an inexplicable urge to gnaw off my right leg.
Do you want to know more?
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
|
|
|
|
|
Actually, the static initializer (.cctor) is the first thing ever called, but only the first time for a type within a given AppDomain. But as far as instances go, yes you're right.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Hi,
I am adding items to a listview and want to make some items bold depending on a condition and some left as normal. The items.Bold property in the ListViewitems collection is a read only property and so i cannot set it. Is there a way to achieve this?
Thanks for the help.
Stephen
|
|
|
|
|
Set the items Font property
Ex:
item.Font = new Font("Microsoft Sans Serif",8,System.Drawing.FontStyle.Bold);
Sandeep Naik
|
|
|
|
|
Hello,
I have a C# program that reads data from an Excel sheet, and creates an Xml file from it. The Excel sheets are not modified, and the Excel app is hidden from the user.
Everything works fine exept when I quit my program before it finishes. When I do this, Excel stays open. The only way to tell this is to look in the task bar; the first time I did this I was surprised to see 8 Excel processes running!
There must be a way to tell Excel to quit when the process that started it quits... anybody know how I can do this? Thanks!
Jeremy O
PM Logic
http://www.jeremyo.com
|
|
|
|
|
If you using Excel automation com library from MS then it should be very simple. If your running Excel in any other way then I guess you can just kill the process.
|
|
|
|
|
The ApplicationClass defines a Quit method.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
I have a question, that is probably really dumb to anyone who has any significant experience with C#, but I've searched for an answer and tried several different things (a few hours worth of trying different things!), so
I've elected to display my ignorance and ask for help from more experienced C# programmers:
To wit: I'm putting together two different services to run under XP/etc. To avoid any extra overhead and keep the resulting module small, I want to use just one executable w/o referencing any .dll(s) or other resources. To this end, though, I need to share one source file which will contain common code for both services. I have tried everything I can possibly think of to make C# (both .NET 2003 and C#Express 2005) use a single file in the construction of both 'projects'. If I do an 'add existing item', a copy gets moved in under the project. I can't do an 'add reference' to a .cs file. If I make it a 'miscellaneous' file, I can't get C# to find the namespace/class/etc.
There has to be a way to do this ... We used to do it routinely a hundred years ago when I started programming by the use of 'include' statements and the like ...
If someone could spare a few minutes, drop me an email and let me know how to do this.
Thanks,
toml@direcwayREMOVETHIS.com
|
|
|
|
|
You can't just reference a file. What you can do is create a shared assembly. Or just have a copy of your C# file like you mentioned.
If you don't want to have an assembly reference you can use "late binding". Then the C# term your looking for might be Reflections. Search MSDN if u have no experience with it.
|
|
|
|
|
Why not take care of this with a simple Visual Studio macro? Update to/from the file in the other project whenever it is changed.
Matt Gerrans
|
|
|
|
|
I guess many people coming from a C++ background try to do this thing. I wanted to do it myself, when I started with my first C# project.
After a few trials and errors and a little reading I found the following most logical way out:
(1) The code which you want to make common should either be a base class or a utility class.
(2) If not, make it so. Then you will have either BaseClass.cs or UtilityClass.cs file. Have a project for this class.
(3) Now I don’t know your case but typically, you have a single solution with multiple projects. Whichever projects require the BaseClass or UtilityClass functionality, do an ‘Add reference’ of the BaseClass or UtilityClass.
This works for me, do let me know your experience.
|
|
|
|
|
If you're using Sourcesafe, you can easily have files shared between multiple projects - that's probably the most straightforward way to do it (and means if you change the interface slightly in one project, it won't automatically break the other until you get the latest changes)
--
Help me! I'm turning into a grapefruit!
Phoenix Paint - back from DPaint's ashes!
|
|
|
|