|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How do I make file types associated with my app?Hi All
Just a quickie. If I want certain bespoke file types (ie accompanying files) to show my app's icon or a derivative of it, do I do this in the VB app or is this done through my installer? I was going to use the Inno Setup one. Do you if this can do this? Thanks Ma You set the file association in code - here's the basics of this -
http://vbnet.mvps.org/code/reg/association.htm. Adding an icon reference is just a matter of one more call to CreateNewKey create a "DefaultIcon" key and one more call to SetKeyValue where you assign the "(default)" parameter (accessed by passing vbNullString as the key name. Here you point to your exe and the ordinal number of the icon in the file that Windows should use, eg "c:\program files\myapp.exe, 1". Poke through the registry under HKEY_CLASSES_ROOT and take a look at how popular apps have their files registered and the icon specified. -- Show quoteRandy Birch MS MVP Visual Basic http://vbnet.mvps.org/ ---------------------------------------------------------------------------- Read. Decide. Sign the petition to Microsoft. http://classicvb.org/petition/ ---------------------------------------------------------------------------- "Macsicarr" <nospam@nospam.com> wrote in message news:e7SDoFaVFHA.4028@TK2MSFTNGP10.phx.gbl... : Hi All : : Just a quickie. If I want certain bespoke file types (ie accompanying : files) to show my app's icon or a derivative of it, do I do this in the VB : app or is this done through my installer? : : I was going to use the Inno Setup one. Do you if this can do this? : : Thanks : : Ma : : : |
|||||||||||||||||||||||