Click here to Skip to main content
15,900,108 members
Home / Discussions / C#
   

C#

 
AnswerRe: GDI+ Pin
Christian Graus23-Mar-06 16:39
protectorChristian Graus23-Mar-06 16:39 
QuestionPeeping Tom Pin
IceWater4223-Mar-06 13:58
IceWater4223-Mar-06 13:58 
AnswerRe: Peeping Tom Pin
Luis Alonso Ramos23-Mar-06 15:21
Luis Alonso Ramos23-Mar-06 15:21 
GeneralRe: Peeping Tom Pin
IceWater4224-Mar-06 22:53
IceWater4224-Mar-06 22:53 
GeneralRe: Peeping Tom Pin
Luis Alonso Ramos25-Mar-06 6:56
Luis Alonso Ramos25-Mar-06 6:56 
QuestionHow to associate files with programs? Pin
nogola23-Mar-06 11:39
nogola23-Mar-06 11:39 
AnswerRe: How to associate files with programs? Pin
Ed.Poore23-Mar-06 12:21
Ed.Poore23-Mar-06 12:21 
AnswerRe: How to associate files with programs? Pin
kasik23-Mar-06 13:17
kasik23-Mar-06 13:17 
If you open your registry using regedit, and select HKEY_CLASSES_ROOT, you will see an enormous list of, amongst others, file extensions. Like...
*
._sln
.txt
.rar
and so on. Each of these registry keys has their default string value set to the name of another key in HKEY_CLASSES_ROOT, like .rar has its default value set to WinRAR.

If you go to the WinRAR key in HKEY_CLASSES_ROOT, it will have various properties to it. Its default value is set to the what the file is for - "WinRAR Archive" in this case. A sub key of the WinRAR key is shell which in turn has a sub key open. The default value of the open key is what you want to appear as the default menu item in the context menu that is shown when a user right-clicks on a file of this type in Windows Explorer. Inside this key is another sub key called command. The default value of this is where you can set the program you want to launch when someone opens the file. You can use "%1" to represent the file path - so if you wanted to load the file in notepad, you could set the default to
"notepad.exe" "%1"

So an example hierarchy for a new file type of extension .fil, if you wanted to launch it with say "MyApp" could be...
HKEY_CLASSES_ROOT
    ->  .fil
        * (Default) = filfile
    ->  filfile
        * (Default) = fil File
        ->  shell
            ->  open
                * (Default) = Open this fil file with MyApp
                ->  command
                    * (Default) = "C:\Path To MyApp\MyApp.exe" "%1"
(where '->' represents a key, and '*' represents a value)

Hope that helps (and makes sense) Smile | :)

Cheers,
Will H
AnswerRe: How to associate files with programs? Pin
IceWater4223-Mar-06 17:55
IceWater4223-Mar-06 17:55 
Question.NET 2003 queues Pin
spin vector23-Mar-06 10:40
spin vector23-Mar-06 10:40 
QuestionRemote Registry editing? Pin
Joshua Lunsford23-Mar-06 10:13
Joshua Lunsford23-Mar-06 10:13 
AnswerRe: Remote Registry editing? Pin
oykica23-Mar-06 21:21
oykica23-Mar-06 21:21 
GeneralRe: Remote Registry editing? Pin
Joshua Lunsford24-Mar-06 8:37
Joshua Lunsford24-Mar-06 8:37 
Questionargs in main Pin
nogola23-Mar-06 10:04
nogola23-Mar-06 10:04 
AnswerRe: args in main Pin
Dan Neely23-Mar-06 10:38
Dan Neely23-Mar-06 10:38 
GeneralRe: args in main Pin
nogola23-Mar-06 10:46
nogola23-Mar-06 10:46 
GeneralRe: args in main Pin
Sean8923-Mar-06 10:51
Sean8923-Mar-06 10:51 
GeneralRe: args in main Pin
Igor Velikorossov23-Mar-06 10:54
Igor Velikorossov23-Mar-06 10:54 
GeneralRe: args in main Pin
Igor Velikorossov23-Mar-06 10:53
Igor Velikorossov23-Mar-06 10:53 
GeneralRe: args in main Pin
nogola23-Mar-06 10:58
nogola23-Mar-06 10:58 
GeneralRe: args in main Pin
Igor Velikorossov23-Mar-06 11:03
Igor Velikorossov23-Mar-06 11:03 
GeneralRe: args in main Pin
nogola23-Mar-06 11:13
nogola23-Mar-06 11:13 
GeneralRe: args in main Pin
nogola23-Mar-06 11:16
nogola23-Mar-06 11:16 
GeneralRe: args in main Pin
Igor Velikorossov23-Mar-06 11:19
Igor Velikorossov23-Mar-06 11:19 
QuestionCasting a value to an enum type Pin
TeamWild23-Mar-06 9:17
TeamWild23-Mar-06 9:17 

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.