|
Thank you very much for your reply. You put me on the right track in the right direction. However I have some additional questions.
Using the code you supplied I got a lot of "network cards" that I didn't know I had. I guess I could narrow my search down with a WHERE clause in the SELECT statement.
Do you know where I can find additional information about the information contained in these tables and the names of these tables?
Sincerely,
Einar
|
|
|
|
|
|
I've been charged with working on the help system for an application; right now we can associate keywords with controls, and the help system is basically a wrapper around the HelpProvider class. This kind of help requires that I manually go through every control that needs help (usually our various dialogs and large forms).
What I was wondering, is whether there is some property in the designer for the help keyword? If not, can the MS people around here tell me whether this is planned for Whidbey?
Also, has anyone tried replacing this manual help keyword specification with a system based on reflection? I was thinking we might try something where there is a base "helpable control" where when it is initialized it automatically registers a keyword based on its name with the HelpProvider. If you have done something like this before, could you give any tips or hints? Thanks.
|
|
|
|
|
The HelpProvider is an IExtender interfaces that "adds" a property to your controls. This value is actually persisted along with the Control (if you write your own IExtender component, you're responsible for persisting this map). Work with the HelpProvider and you shouldn't have any problems.
If that doesn't work, the designer always writes a values to the Control.Name property, which you could use as a keyword. If you support nesting of container controls that contain the same names, do something similar to ASP.NET and built a delimited name that resolve the child, like "Parent1_Parent2_Control1" (this is what the INamingContainer marker interface for ASP.NET is for).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
if my application has been teminated form Windows task Manager or from debug. Can i do any clean up work for my application before really shut it down?
|
|
|
|
|
|
Hi I want to make a toolbar for internet explorer using C# but there doesnt seem to be any information on how its done....
I don't know what I'm talking about
|
|
|
|
|
|
Hi,
I need to limit the number of instances running of my C# .NET Windows Application to one. Unfortunatly I don't know of any proper ways of doing so at the moment. Have any of you had any experiences or ideas about instance control of Windows Applications in C#?!
Thank you very much for your help!
|
|
|
|
|
A search of CodeProject and/or Google will yield a good selection of results. For what its worth, I'm currently using a modified version of Michael Potter's Single Process Instance Object[^] article.
Hope that helps.
--Jesse
|
|
|
|
|
Hi,
I need to represent a table (rows and columns) of a "Cell" class. I would like to be able to do the following on an instance of my CustomTable class:
table.Rows[2][6] - and get a specific Cell
table.Cols[6][2] - and get that same Cell out
So - I need a two dimensional collection of Cell-objects. And a way of adding properties to the table class to look in that two dimensional collection. If we look at the Rows property, it could be made like this:
public RowCollection Rows<br />
{<br />
get { return m_rows;}<br />
}
- where the RowCollection e.g. inherits from System.Collections.CollectionBase and implements the index-operator [] in order to get Row class instances out. These, in turn, must either be a collection of cell objects or have a .Items property which is a cellcollection (this would change the notation from table.Rows[2][6] to table.Rows[2].Items[6]).
However - making this work with the table.Cols[6][2] indexing as well requires that the table class has a m_rows collection of rows and a m_cols collection of columns - that both look into the same datasource - some sort of a two dimensional collection to represent the cells. I can't really think of a "sleek" way to implement this - I keep ending up with loads of collections and I have this thought nagging in the back of my head... This must have been done around a thousand times before
The main argument for having this as collections is that I need dynamic resizing at some point in time. And I feel a need for having a Row and Column class to hold some specific information for rows and columns - but if the Row class is just a Cell collection, it isn't really obvious to add properties to that class that are specific for the Row (the column, respectively).
Does anybody have any ideas or thoughts on this ? Of course, I'm probably just missing something really obvious here...
Anyone ?
Do you know why it's important to make fast decisions? Because you give yourself more time to correct your mistakes, when you find out that you made the wrong one. Chris Meech on deciding whether to go to his daughters graduation or a Neil Young concert
|
|
|
|
|
Thinking off the top of my head here..
C# supports proper multi-dimensional arrays
Cell[,] mydata = new Cell[width,height]
or am I mis understanding your problem?
--
Help me! I'm turning into a grapefruit!
Phoenix Paint - back from DPaint's ashes!
|
|
|
|
|
No, you're completely right
The problem with arrays is that they cannot be dynamically re-sized - and I need that. Anyway, I've been working on a solution where the table holds data in a System.Data.DataTable, and .Rows and .Columns properties access this datastorage.
Actually - I think that I need a simpler version of a DataTable which is less database-oriented and strongly typed to my Cell class. Any great ideas ?
Do you know why it's important to make fast decisions? Because you give yourself more time to correct your mistakes, when you find out that you made the wrong one. Chris Meech on deciding whether to go to his daughters graduation or a Neil Young concert
|
|
|
|
|
Hmm.. still bouncing ideas at random, you could probably make an ArrayList of ArrayLists, to give you a two dimensional dynamically re-sizable array. (ArrayList can store anything as an Object, which should basically be any C# class)
--
Help me! I'm turning into a grapefruit!
Phoenix Paint - back from DPaint's ashes!
|
|
|
|
|
I have a form with three constructors each with a different signiture.
i.e.
public Form_1() ...
public Form_1(string Name) ...
public Form_1(string Name, int Number) ...
How can i call the first constructor from the second and call the second from the third?
At the minute I have to copy the common code into functions and call the functions but would prefer to call the constructors as i used to do in VB.Net.
Thanks
|
|
|
|
|
Use the 'this' keyword like this
<br />
public Form_1() : this(null)<br />
{<br />
}<br />
public Form_1(string Name) : this(Name, 0)<br />
{<br />
}<br />
public Form_1(string Name, int Number)<br />
{<br />
}<br />
|
|
|
|
|
You've generated an extra call for no good reason. A better example would be:
public Form1() : this(null, 0)
{
}
public Form1(string name) : this(name, 0)
{
}
public Form1(string name, int number)
{
} Why generate an extra call on the stack just to "redirect" to another method?
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Heath Stewart wrote:
Why generate an extra call on the stack just to "redirect" to another method?
To avoid duplicating defaults and/or code (which could lead to inconsistent behavior).
Actually, if you Google for it you'll notice that this is one of those religious things. Personally, I agree with you, with the added annoyance that single-stepping through code like this is really boring.
Yes, even I am blogging now!
|
|
|
|
|
Anynoe know how to keep the backColor of listview items (View=Details) when HideSelection is set to false?
The problem is when selectedItems.Count == 0, it seems to redraw the last selected item with a clear background after the selectedIndex changed event.
Any ideas how I can get around this?
Thanks
|
|
|
|
|
try to override paint function ...
Mhmoud Rawas
------------
Software Eng.
|
|
|
|
|
This is a question for Heath [^], I guess
I want to write a managed C# DLL and call functions/classes from a unmanaged C++ application.
I could write a COM component in C#, register it and then #import it in the unmanaged C++ application to generate wrappers.
But: I want to avoid having the need to register the C# COM component, since the C# DLL and the unmanaged C++ application both are located inside the same folder and there is no need for other applications to access the COM component.
What I already tried (results in error C1083 [^]) was to <a href="http://msdn.microsoft.com/library/en-us/vclang/html/_predir_The_.23.import_Directive.asp">#import</a> [<a href="http://msdn.microsoft.com/library/en-us/vclang/html/_predir_The_.23.import_Directive.asp" target="_blank" title="New Window">^</a>] the C# COM DLL by referencing the complete DLL via
#import "C:\Test\MyCSharpClassLib.dll" , but witthout success.
Also, I looked at the way this example does it: www.perfectxml.com/articles/msxml/TipsAugust02.asp [^], but that didn't help me either.
Question: Is it possible for me to call a C# COM-component from unmanaged C++, without registering it?
Thanks
Uwe
--
Affordable Windows-based CMS: www.zeta-producer.de/enu
|
|
|
|
|
Dear Sir,
as i have try it before i think that you don't have to register that com dll cuz it is self registration dll which can be generated from C# compiler using COM option, i have put them in the same foler with no-need to register it just you can call that dll from unmaneged c++ directlly with wout registration and you will have an error message just if you have used any crystal report objects in that C# dll
Mhmoud Rawas
------------
Software Eng.
|
|
|
|
|
Two options I can think of: first, to use side-by-side assemblies[^] to produce an isolated application. Second, to use the CLR Hosting[^] APIs to host the .NET Framework in your C++ application.
The second option looks like a lot of work, so I'd look into the first technique first. However, if you need it to work on Windows 2000 or earlier, I think it'll have to be the second.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Just tried your "CLR Hosting" suggestion: I looked at the "CLR Hosting Sample [^]" at the bottom of the link you suggested, slightly modified it and, it now works fantastic, without any additional registering.
Thank you!
--
Affordable Windows-based CMS: www.zeta-producer.com
|
|
|
|
|
Uwe, here's a thought, create an CCW a la my article[^], but you could control the registration from your application with the command line tool Regasm.exe[^], this way you could unregister it if you wanted (this idea seems brittle though). Also, CLR Hosting would be an interesting mechanism to consider as well. I've been wanting to write an article cover this topic, maybe I can sit down over the holiday weekend and put some notes together for it.
[EDIT]
You may also want to look into using the Tlbexp.exe[^] as it will generate the type library for you, however it won't register the assembly as regasm.exe will above.
[/EDIT]
- Nick Parker My Blog | My Articles
|
|
|
|