I'm doing something similar right now actually... Working on creating a GUI library and engine using DirectX that is designable.
You have to implement IComponent in your class (deriving from Component is a quick way to do this) because the DesignerHost (service provided and used by VS.NET) utilizes sites (ISite), which are the basis of components. Then you have to specify an IRootDesigner-implementing class in a DesignerAttribute for you IComponent class. You can try using ComponentDocumentDesigner for that if you don't need any custom designer stuff.
Also check out an article/sample named ShapeLibrary that gives a nice easy example of utilizing design-time services in .NET. You can find it here:
I inherited a MS Access database. One of the columns in a table happened to name with a SPACE in the middle, "FrameMaker Location". I know, it's not a smart way to name a column.
I was trying to insert some new records into the table. It only worked when I removed the SPACE from the column name (from my code and DB), like "FrameMakerLocation". Otherwise, I got an error like this "Syntax error in INSERT INTO statement".
Do you know any tricks so that I don't have to rename the column name???
Thanks so much in advance
Have a great Thur.
I am not sure but try enclosing the name in square brackets [ ].
Paul Watson wrote: "At the end of the day it is what you produce that counts, not how many doctorates you have on the wall." George Carlin wrote: "Don't sweat the petty things, and don't pet the sweaty things." Jörgen Sigvardsson wrote: If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
How can I make it so that the vertical pointing icons appear in my ListView after the user has clicked on a header to sort it????? I have been trying to figure this out for a bit now and I dont have a clue.
Hi. I created a dataAdapter and a typed dataset, which refers to a stored procedure that takes an input value. How would I use this dataSet, or fill the dataAdapter, as I dont know how to tell it what the input value must be (which happens to be an int).
i created a table with 9 columns using datatable and tablestyles.
Also i got a DataRelation.
How can i tell my childcolumn to change if the parentcolumn changes?
e.g. in column "number" is 10 the value,
if I change the value to 17 in parenttable,the value in childttable should also change
Hey i am using a hashtable, and i am adding my fields collection to it.
when i iterate through them they found to be not in the order in which i added them. how do i maintain the sequence in which the elements are added.
Bangalore - India
"Being Excellent is not a skill, it is an attitude"
Reality is an illusion caused by caffeine deficiency(one Microsoft Research scholor)
If you want your data to be always sorted, ArrayList is probably better than Hashtable.
If you use Hashtable because most of the times you don't care about sorted data, but
you'd rather have a near-O(1) access time, then Hashtable is better.
Note, however, that you can use an Hashtable and, when needed, sort the values as needed and live happily ever-after.
You might consider the System.Collections.Specialized.ListDictionary. It implements the IDictionary interface with a linked list. It would be my guess (just a guess) that the order of addition is maintained. Be aware, according to the documentation, ListDictionary is superior to hashtable performance-wise up to about ten items. If your list is longer, consider another strategy.