Click here to Skip to main content
15,904,416 members
Home / Discussions / C#
   

C#

 
GeneralC# vs Sound compression Pin
paladin20031-Dec-03 0:25
paladin20031-Dec-03 0:25 
GeneralRe: C# vs Sound compression Pin
Heath Stewart1-Dec-03 2:44
protectorHeath Stewart1-Dec-03 2:44 
GeneralRe: C# vs Sound compression Pin
paladin20031-Dec-03 4:57
paladin20031-Dec-03 4:57 
GeneralRe: C# vs Sound compression Pin
Heath Stewart1-Dec-03 6:23
protectorHeath Stewart1-Dec-03 6:23 
QuestionSerialize a button? Pin
thomasa30-Nov-03 22:24
thomasa30-Nov-03 22:24 
AnswerRe: Serialize a button? Pin
unitrunker30-Nov-03 22:44
unitrunker30-Nov-03 22:44 
GeneralRe: Serialize a button? Pin
thomasa30-Nov-03 22:56
thomasa30-Nov-03 22:56 
GeneralRe: Serialize a button? Pin
Corinna John1-Dec-03 1:23
Corinna John1-Dec-03 1:23 
The Windows.Forms-Controls are not serializable, but you can export all properties of the Button and serialize the Hashtable. After deserializing the Hashtable, you can set all properties "by name".

Hashtable hashtable = new Hashtable();
ListFields(button, hashtable);
//...
private void ListFields(object obj, Hashtable ht){
BindingFlags flags = BindingFlags.Instance | BindingFlags.Public;
FieldInfo[] arrInfo = obj.GetType().GetFields(flags);

foreach(FieldInfo info in arrInfo) {
ht.Add(info.Name, info.GetValue(obj));
object fieldValue = info.GetValue(obj);
if(fieldValue != null){ ListFields(fieldValue); }
}
}
GeneralRe: Serialize a button? Pin
Heath Stewart1-Dec-03 2:35
protectorHeath Stewart1-Dec-03 2:35 
QuestionHow to change next page of our choice in tabcontrol Pin
Inam30-Nov-03 21:51
Inam30-Nov-03 21:51 
AnswerRe: How to change next page of our choice in tabcontrol Pin
Corinna John1-Dec-03 1:26
Corinna John1-Dec-03 1:26 
GeneralClear screen from a C# console Application Pin
okoji Cyril30-Nov-03 21:35
okoji Cyril30-Nov-03 21:35 
GeneralRe: Clear screen from a C# console Application Pin
Alex Korchemniy1-Dec-03 11:02
Alex Korchemniy1-Dec-03 11:02 
Questiondatagrid problem? Pin
isarfraz30-Nov-03 18:13
isarfraz30-Nov-03 18:13 
AnswerRe: datagrid problem? Pin
Heath Stewart1-Dec-03 2:27
protectorHeath Stewart1-Dec-03 2:27 
GeneralPrintTemplate.orientation bug Pin
Alex Korchemniy30-Nov-03 17:25
Alex Korchemniy30-Nov-03 17:25 
GeneralMaking an exe file from c# code Pin
kaisy30-Nov-03 16:15
kaisy30-Nov-03 16:15 
GeneralRe: Making an exe file from c# code Pin
Christian Graus30-Nov-03 17:02
protectorChristian Graus30-Nov-03 17:02 
GeneralRe: Making an exe file from c# code Pin
Alex Korchemniy30-Nov-03 17:31
Alex Korchemniy30-Nov-03 17:31 
GeneralAbout Hook Pin
lajiyo30-Nov-03 15:06
lajiyo30-Nov-03 15:06 
GeneralCore DLL Documentation Pin
Tristan Rhodes30-Nov-03 12:04
Tristan Rhodes30-Nov-03 12:04 
GeneralRe: Core DLL Documentation Pin
Alex Korchemniy30-Nov-03 14:13
Alex Korchemniy30-Nov-03 14:13 
GeneralClickety Pin
J. Dunlap30-Nov-03 16:26
J. Dunlap30-Nov-03 16:26 
GeneralRe: Clickety Pin
Tristan Rhodes1-Dec-03 3:33
Tristan Rhodes1-Dec-03 3:33 
Generalsource code Pin
Amirjalaly30-Nov-03 5:00
Amirjalaly30-Nov-03 5:00 

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.