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

C#

 
AnswerRe: Windows Form from windows service Pin
Nader Elshehabi14-Jan-07 22:41
Nader Elshehabi14-Jan-07 22:41 
QuestionSending Commands to ATM Pin
Ghous Ahmed14-Jan-07 20:51
Ghous Ahmed14-Jan-07 20:51 
AnswerRe: Sending Commands to ATM Pin
shutterbus15-Jul-09 20:40
shutterbus15-Jul-09 20:40 
QuestionHelp me: how to write into embedded xml file of assembly Pin
vishwa2514-Jan-07 20:32
vishwa2514-Jan-07 20:32 
QuestionGDI+ Regions in depth Pin
Mike Hankey14-Jan-07 20:08
mveMike Hankey14-Jan-07 20:08 
QuestionPlease Help....How to open a file in application? Pin
Lyfkcd14-Jan-07 19:58
Lyfkcd14-Jan-07 19:58 
AnswerRe: Please Help....How to open a file in application? Pin
Seishin#14-Jan-07 21:27
Seishin#14-Jan-07 21:27 
GeneralRe: Please Help....How to open a file in application? Pin
Lyfkcd15-Jan-07 4:34
Lyfkcd15-Jan-07 4:34 
"args is the parameter list. if you open app through file the first parameter is the file name.. then you can do whatever you want with it.. "

-what do you mean, i'm sorry i don't get it..in vs 2005 these lines are included in the Program.cs file, isn't it? These are my codes in my main form using the Form_Load Event.

RegistryKey rk = Registry.ClassesRoot.CreateSubKey(".sis",RegistryKeyPermissionCheck.ReadWriteSubTree);
rk.SetValue("Content Type", "application/x-sis");
rk.SetValue("PerceivedType", "file collections");
rk.SetValue("", "SIS");
rk.CreateSubKey("OpenWithList");
RegistryKey rk2 = Registry.ClassesRoot.CreateSubKey("SIS", RegistryKeyPermissionCheck.ReadWriteSubTree);
rk2.SetValue("", "SIS File");
rk2.CreateSubKey("DefaultIcon",RegistryKeyPermissionCheck.ReadWriteSubTree);
try
{
RegistryKey rk3 = Registry.ClassesRoot.OpenSubKey("SIS", true).OpenSubKey("DefaultIcon", true);
rk3.SetValue("", "C:/sis.ico");
RegistryKey rk4 = Registry.ClassesRoot.OpenSubKey("SIS", true);
rk4.CreateSubKey("shell", RegistryKeyPermissionCheck.ReadWriteSubTree);
RegistryKey rk5 = Registry.ClassesRoot.OpenSubKey("SIS", true).OpenSubKey("shell", true);
rk5.CreateSubKey("open", RegistryKeyPermissionCheck.ReadWriteSubTree);
RegistryKey rk51 = Registry.ClassesRoot.OpenSubKey("SIS", true).OpenSubKey("shell", true).OpenSubKey("open", true);
rk51.SetValue("", "Open with &SIS");
RegistryKey rk6 = Registry.ClassesRoot.OpenSubKey("SIS", true).OpenSubKey("shell", true).OpenSubKey("open",true);
rk6.CreateSubKey("command", RegistryKeyPermissionCheck.ReadWriteSubTree);
RegistryKey rk66 = Registry.ClassesRoot.OpenSubKey("SIS", true).OpenSubKey("shell", true).OpenSubKey("open", true).OpenSubKey("command", true);
rk66.SetValue("", "C:/SIS.exe");
RegistryKey rkapp = Registry.ClassesRoot.OpenSubKey("Applications", true);
rkapp.CreateSubKey("SIS.exe", RegistryKeyPermissionCheck.ReadWriteSubTree);
RegistryKey rkapp2 = Registry.ClassesRoot.OpenSubKey("Applications", true).OpenSubKey("SIS.exe", true);
rkapp2.CreateSubKey("shell", RegistryKeyPermissionCheck.ReadWriteSubTree);
RegistryKey rkapp3 = Registry.ClassesRoot.OpenSubKey("Applications", true).OpenSubKey("SIS.exe", true).OpenSubKey("shell",true);
rkapp3.CreateSubKey("open", RegistryKeyPermissionCheck.ReadWriteSubTree);
RegistryKey rkapp31 = Registry.ClassesRoot.OpenSubKey("Applications", true).OpenSubKey("SIS.exe", true).OpenSubKey("shell", true).OpenSubKey("open", true);
rkapp31.SetValue("", "Open with &SIS");
RegistryKey rkapp4 = Registry.ClassesRoot.OpenSubKey("Applications", true).OpenSubKey("SIS.exe", true).OpenSubKey("shell", true).OpenSubKey("open",true);
rkapp4.CreateSubKey("command", RegistryKeyPermissionCheck.ReadWriteSubTree);
RegistryKey rkapp41 = Registry.ClassesRoot.OpenSubKey("Applications", true).OpenSubKey("SIS.exe", true).OpenSubKey("shell", true).OpenSubKey("open", true).OpenSubKey("command",true);
rkapp41.SetValue("", "C:/SIS.exe");


-what these lines of code do are adding entries in the Windows Registry such as default icons, type of file, etc. I can't seem to connect them to be default to run on my application as it prompts access denied message and worst, i don't know how i would activate my application and loading the clicked or double-clicked file onto it.... PLEASE HELP ME, WHAT WOULD I DO???


GeneralRe: Please Help....How to open a file in application? Pin
Lyfkcd19-Jan-07 13:40
Lyfkcd19-Jan-07 13:40 
AnswerRe: Please Help....How to open a file in application? Pin
Abisodun15-Jan-07 2:11
Abisodun15-Jan-07 2:11 
GeneralRe: Please Help....How to open a file in application? Pin
Lyfkcd15-Jan-07 4:44
Lyfkcd15-Jan-07 4:44 
GeneralRe: Please Help....How to open a file in application? Pin
Abisodun15-Jan-07 5:41
Abisodun15-Jan-07 5:41 
GeneralRe: Please Help....How to open a file in application? Pin
Lyfkcd15-Jan-07 7:12
Lyfkcd15-Jan-07 7:12 
GeneralRe: Please Help....How to open a file in application? Pin
Abisodun15-Jan-07 10:09
Abisodun15-Jan-07 10:09 
GeneralRe: Please Help....How to open a file in application? Pin
Lyfkcd19-Jan-07 13:37
Lyfkcd19-Jan-07 13:37 
QuestionAccess Denied on Process Pin
lucluv14-Jan-07 18:57
lucluv14-Jan-07 18:57 
QuestionImage Format Conversion Pin
bradpin14-Jan-07 18:55
bradpin14-Jan-07 18:55 
AnswerRe: Image Format Conversion Pin
Christian Graus14-Jan-07 19:18
protectorChristian Graus14-Jan-07 19:18 
GeneralRe: Image Format Conversion Pin
bradpin14-Jan-07 19:35
bradpin14-Jan-07 19:35 
GeneralRe: Image Format Conversion Pin
Russell Jones14-Jan-07 21:43
Russell Jones14-Jan-07 21:43 
GeneralRe: Image Format Conversion Pin
Christian Graus14-Jan-07 22:18
protectorChristian Graus14-Jan-07 22:18 
QuestionMatching an expression in a text file Pin
rachellim14-Jan-07 18:44
rachellim14-Jan-07 18:44 
AnswerRe: Matching an expression in a text file Pin
Christian Graus14-Jan-07 19:19
protectorChristian Graus14-Jan-07 19:19 
QuestionNeed a Multi-CheckBox CheckListBox control Pin
help13714-Jan-07 16:19
help13714-Jan-07 16:19 
QuestionImages loading and preview Pin
Werfu14-Jan-07 11:25
Werfu14-Jan-07 11:25 

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.