Click here to Skip to main content
15,920,111 members
Home / Discussions / C#
   

C#

 
GeneralRe: in c#. how to serilialize and deserialize object with object of other classes inside it??? Pin
Dave Kreskowiak12-Nov-15 4:10
mveDave Kreskowiak12-Nov-15 4:10 
GeneralRe: in c#. how to serilialize and deserialize object with object of other classes inside it??? Pin
Member 1212766512-Nov-15 2:58
Member 1212766512-Nov-15 2:58 
AnswerRe: in c#. how to serilialize and deserialize object with object of other classes inside it??? Pin
Richard Andrew x6412-Nov-15 3:08
professionalRichard Andrew x6412-Nov-15 3:08 
AnswerRe: in c#. how to serilialize and deserialize object with object of other classes inside it??? Pin
Bernhard Hiller12-Nov-15 4:12
Bernhard Hiller12-Nov-15 4:12 
GeneralRe: in c#. how to serilialize and deserialize object with object of other classes inside it??? Pin
BillWoodruff12-Nov-15 5:45
professionalBillWoodruff12-Nov-15 5:45 
AnswerRe: in c#. how to serilialize and deserialize object with object of other classes inside it??? Pin
BillWoodruff12-Nov-15 6:03
professionalBillWoodruff12-Nov-15 6:03 
AnswerRe: in c#. how to serilialize and deserialize object with object of other classes inside it??? Pin
Member 1212766512-Nov-15 21:26
Member 1212766512-Nov-15 21:26 
Questionrun file with associated extension in current instance (ddeexec?) Pin
robinsc10-Nov-15 9:51
robinsc10-Nov-15 9:51 
Hi,
I have a little method which registeres an extension (edit: like .ext) into the Windows registry. Does anyone have an idea how I can tell Windows to open a file with the respective extension only in a new program instance, if currently none is running? If the program is already running, a new tab in my program should be created (I have a event void opentab(object sender, EventArgs e) to open a new tab). But how can I tell windows not to open a new instance but to call the running program and let it run the event?
I think one can somehow do it with a subnode "ddeexec" in the subnode "open", but I'm not sure and it didn't work for me.
Best wishes
robin

C#
void DefineAssociations(string extension, string IconFile)
{
string keyName = extension;
RegistryKey key = Registry.ClassesRoot.OpenSubKey(keyName);
if (key != null)
{
string apppath = "";
apppath = Application.ExecutablePath.ToLower() + " \"%1\"";
key.SetValue("", "MyProg");
 
RegistryKey iconkey;
iconkey = key.CreateSubKey("DefaultIcon");
iconkey.SetValue("", Environment.CurrentDirectory + "\\resources\\" + IconFile);
key = key.CreateSubKey("shell");
key = key.CreateSubKey("open");
key = key.CreateSubKey("command");
key.SetValue("", apppath);
}
}

AnswerRe: run file with associated extension in current instance (ddeexec?) Pin
John Torjo10-Nov-15 10:21
professionalJohn Torjo10-Nov-15 10:21 
GeneralRe: run file with associated extension in current instance (ddeexec?) Pin
robinsc10-Nov-15 11:10
robinsc10-Nov-15 11:10 
GeneralRe: run file with associated extension in current instance (ddeexec?) Pin
John Torjo10-Nov-15 11:31
professionalJohn Torjo10-Nov-15 11:31 
GeneralRe: run file with associated extension in current instance (ddeexec?) Pin
Eddy Vluggen10-Nov-15 14:22
professionalEddy Vluggen10-Nov-15 14:22 
GeneralRe: run file with associated extension in current instance (ddeexec?) Pin
John Torjo11-Nov-15 4:15
professionalJohn Torjo11-Nov-15 4:15 
AnswerRe: run file with associated extension in current instance (ddeexec?) Pin
Bernhard Hiller12-Nov-15 4:16
Bernhard Hiller12-Nov-15 4:16 
QuestionWindows App for NGO Pin
COder87610-Nov-15 7:01
COder87610-Nov-15 7:01 
AnswerRe: Windows App for NGO Pin
Gerry Schmitz10-Nov-15 8:00
mveGerry Schmitz10-Nov-15 8:00 
AnswerRe: Windows App for NGO Pin
Richard MacCutchan10-Nov-15 8:39
mveRichard MacCutchan10-Nov-15 8:39 
AnswerRe: Windows App for NGO Pin
BillWoodruff10-Nov-15 14:32
professionalBillWoodruff10-Nov-15 14:32 
QuestionMissingManifestResourceException Pin
Rob Shields10-Nov-15 2:58
Rob Shields10-Nov-15 2:58 
AnswerRe: MissingManifestResourceException Pin
OriginalGriff10-Nov-15 3:32
mveOriginalGriff10-Nov-15 3:32 
AnswerRe: MissingManifestResourceException Pin
phil.o10-Nov-15 4:54
professionalphil.o10-Nov-15 4:54 
Questionhow to get Image from DataSet Pin
goldsoft10-Nov-15 0:29
goldsoft10-Nov-15 0:29 
AnswerRe: how to get Image from DataSet Pin
John Torjo10-Nov-15 0:40
professionalJohn Torjo10-Nov-15 0:40 
GeneralRe: how to get Image from DataSet Pin
goldsoft10-Nov-15 1:02
goldsoft10-Nov-15 1:02 
GeneralRe: how to get Image from DataSet Pin
John Torjo10-Nov-15 4:07
professionalJohn Torjo10-Nov-15 4:07 

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.