2

I have a little bit confusing problem. I'm not a beginner but I don't know how to do it.. For example I've written a program like notepad from which you can open files, save and etc. But when I set any custom format like ".blabla" to be opened by my app it is not working, so how can I make it to be opened by my app? It is in WinForms

Guru Stron
  • 102,774
  • 10
  • 95
  • 132
r.mirzojonov
  • 1,209
  • 10
  • 18
  • 2
    Check out: http://stackoverflow.com/questions/3924753/where-does-windows-store-its-open-with-settings – Matthew Nov 27 '13 at 14:39
  • 2
    I've read it twice and still not sure where your problem is. Could you elaborate? – Adriano Carneiro Nov 27 '13 at 14:40
  • @AdrianCarneiro For example when ".fla" file is double clicked Adobe Flash automatically runs that file... – r.mirzojonov Nov 27 '13 at 14:43
  • @Ravshanjon So you want to programmatically associate your app to a file extension? – Adriano Carneiro Nov 27 '13 at 14:45
  • 1
    @Ravshanjon That's not possible to do from within the program, you would have to get the user to Install it via an Installer and modify the Registry as liquidsnake shows below. Or manually modify the registry if it is an app on a hand full of machines. – Nunners Nov 27 '13 at 14:46

1 Answers1

4

You need an entry in the registry for custom file extensions. You can try inserting a key in the registry as follows:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\
liquidsnake786
  • 449
  • 2
  • 8