Click here to Skip to main content
15,907,874 members
Home / Discussions / C#
   

C#

 
GeneralAny other ways to convert .net to vb 6.0 Pin
montu337720-Feb-05 22:11
montu337720-Feb-05 22:11 
GeneralRe: Any other ways to convert .net to vb 6.0 Pin
Judah Gabriel Himango21-Feb-05 6:11
sponsorJudah Gabriel Himango21-Feb-05 6:11 
GeneralRe: Any other ways to convert .net to vb 6.0 Pin
montu337721-Feb-05 6:16
montu337721-Feb-05 6:16 
GeneralRe: Any other ways to convert .net to vb 6.0 Pin
Heath Stewart21-Feb-05 6:51
protectorHeath Stewart21-Feb-05 6:51 
GeneralSMS Application Pin
A Khan20-Feb-05 22:06
sussA Khan20-Feb-05 22:06 
GeneralRe: SMS Application Pin
Heath Stewart21-Feb-05 6:45
protectorHeath Stewart21-Feb-05 6:45 
QuestionGood security project idea in C#? Pin
Mohammed Aijaz Mohiuddin20-Feb-05 20:22
Mohammed Aijaz Mohiuddin20-Feb-05 20:22 
AnswerRe: Good security project idea in C#? Pin
Mohammed Aijaz Mohiuddin20-Feb-05 20:23
Mohammed Aijaz Mohiuddin20-Feb-05 20:23 
QuestionPanel Layout problem? Pin
Tee+20-Feb-05 16:43
Tee+20-Feb-05 16:43 
GeneralOverride wait cursor Pin
eggie520-Feb-05 16:29
eggie520-Feb-05 16:29 
GeneralI'd like to use the column like the header column in DataGrid Pin
yu-yu20-Feb-05 14:41
yu-yu20-Feb-05 14:41 
GeneralDatasets and Web Services Pin
ronin177020-Feb-05 14:01
ronin177020-Feb-05 14:01 
GeneralRe: Datasets and Web Services Pin
Kodanda Pani20-Feb-05 18:24
Kodanda Pani20-Feb-05 18:24 
GeneralTimer on a new thread Pin
eggie520-Feb-05 12:15
eggie520-Feb-05 12:15 
GeneralRe: Timer on a new thread Pin
S. Senthil Kumar20-Feb-05 13:20
S. Senthil Kumar20-Feb-05 13:20 
GeneralRe: Timer on a new thread Pin
eggie520-Feb-05 14:35
eggie520-Feb-05 14:35 
GeneralRe: Timer on a new thread Pin
eggie520-Feb-05 15:08
eggie520-Feb-05 15:08 
GeneralRe: Timer on a new thread Pin
S. Senthil Kumar20-Feb-05 15:33
S. Senthil Kumar20-Feb-05 15:33 
GeneralRe: Timer on a new thread Pin
eggie520-Feb-05 16:25
eggie520-Feb-05 16:25 
QuestionChecking the attributes of a directory? Pin
Marlun20-Feb-05 11:40
Marlun20-Feb-05 11:40 
QuestionHow to arrange attribute of PropertyGrid Pin
lee meng20-Feb-05 9:44
lee meng20-Feb-05 9:44 
AnswerRe: How to arrange attribute of PropertyGrid Pin
Mathew Hall20-Feb-05 13:47
Mathew Hall20-Feb-05 13:47 
You need to create a TypeConverter for your object and override the GetProperties() method

[TypeConverter(typeof(MyClassConverter))]<br />
public class MyClass <br />
{<br />
  ...<br />
}<br />
<br />
public class MyClassConverter : TypeConverter<br />
{<br />
  public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)<br />
  {<br />
    // set the order in which the properties appear <br />
    // in the property window<br />
			<br />
    PropertyDescriptorCollection collection = TypeDescriptor.GetProperties(typeof(MyClass), attributes);<br />
<br />
    string[] s = new string[3];<br />
    s[0] = "XYZPropertyName";<br />
    s[1] = "ABCPropertyName";<br />
    s[2] = "IJKPropertyName";<br />
<br />
    return collection.Sort(s);<br />
  }<br />
}


So when you look at the properties of MyClass in the property grid, they appear in the specified order

"I think I speak on behalf of everyone here when I say huh?" - Buffy
GeneralRe: How to arrange attribute of PropertyGrid Pin
lee meng21-Feb-05 6:41
lee meng21-Feb-05 6:41 
GeneralRe: How to arrange attribute of PropertyGrid Pin
Mathew Hall21-Feb-05 15:12
Mathew Hall21-Feb-05 15:12 
GeneralRe: How to arrange attribute of PropertyGrid Pin
lee meng22-Feb-05 2:14
lee meng22-Feb-05 2:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.