DefaultIcon in a file asociated with my program


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: DefaultIcon in a file asociated with my program

  1. #1
    MaRiØ Guest

    DefaultIcon in a file asociated with my program


    Iīve created a file association to my app, when I click the file, my
    app launchs OK.But the file donīt show the ICON that I push in Registry
    Whatīs the problem??

    sKeyName = "CIMDFile"
    sKeyValue = "bla bla bla"
    ret& = RegCreateKey&(HKEY_CLASSES_ROOT, sKeyName, lphKey&)
    ret& = RegSetValue&(lphKey&, "", REG_SZ, sKeyValue, 0&)
    ' fILE extension sKeyName = ".cim"
    sKeyValue = "CIMDFile"
    ret& = RegCreateKey&(HKEY_CLASSES_ROOT, sKeyName, lphKey&)
    ret& = RegSetValue&(lphKey&, "", REG_SZ, sKeyValue, 0&)
    ' executable path
    sKeyName = "CIMDFile"
    sKeyValue = App.Path & "\" & "CIMDApp.EXE ""%1""" 'parametters
    ret& = RegCreateKey&(HKEY_CLASSES_ROOT, sKeyName, lphKey&)
    ret& = RegSetValue&(lphKey&, "shell\open\command", REG_SZ, _
    sKeyValue, MAX_PATH)
    ' icon
    sKeyValue = App.Path & "\Ani\CIMDFile.ICO"
    ret& = RegSetValue&(lphKey&, "DefaultIcon", REG_SZ, _
    sKeyValue, MAX_PATH)

  2. #2
    Dean Earley Guest

    Re: DefaultIcon in a file asociated with my program

    You have created a string value called DefaultIcon. You need to create a Key and set the default string value

    --
    Dean Earley (dean.earley@icode.co.uk)
    Assistant Developer

    iCode Systems
    "MaRiØ" <mgonzalez@grupocimd.com> wrote in message news:3bcfdd97$1@news.devx.com...
    >
    > Iīve created a file association to my app, when I click the file, my
    > app launchs OK.But the file donīt show the ICON that I push in Registry
    > Whatīs the problem??
    >
    > sKeyName = "CIMDFile"
    > sKeyValue = "bla bla bla"
    > ret& = RegCreateKey&(HKEY_CLASSES_ROOT, sKeyName, lphKey&)
    > ret& = RegSetValue&(lphKey&, "", REG_SZ, sKeyValue, 0&)
    > ' fILE extension sKeyName = ".cim"
    > sKeyValue = "CIMDFile"
    > ret& = RegCreateKey&(HKEY_CLASSES_ROOT, sKeyName, lphKey&)
    > ret& = RegSetValue&(lphKey&, "", REG_SZ, sKeyValue, 0&)
    > ' executable path
    > sKeyName = "CIMDFile"
    > sKeyValue = App.Path & "\" & "CIMDApp.EXE ""%1""" 'parametters
    > ret& = RegCreateKey&(HKEY_CLASSES_ROOT, sKeyName, lphKey&)
    > ret& = RegSetValue&(lphKey&, "shell\open\command", REG_SZ, _
    > sKeyValue, MAX_PATH)
    > ' icon
    > sKeyValue = App.Path & "\Ani\CIMDFile.ICO"
    > ret& = RegSetValue&(lphKey&, "DefaultIcon", REG_SZ, _
    > sKeyValue, MAX_PATH)




  3. #3
    Dean Earley Guest

    Re: DefaultIcon in a file asociated with my program

    You have created a string value called DefaultIcon. You need to create a Key and set the default string value

    --
    Dean Earley (dean.earley@icode.co.uk)
    Assistant Developer

    iCode Systems
    "MaRiØ" <mgonzalez@grupocimd.com> wrote in message news:3bcfdd97$1@news.devx.com...
    >
    > Iīve created a file association to my app, when I click the file, my
    > app launchs OK.But the file donīt show the ICON that I push in Registry
    > Whatīs the problem??
    >
    > sKeyName = "CIMDFile"
    > sKeyValue = "bla bla bla"
    > ret& = RegCreateKey&(HKEY_CLASSES_ROOT, sKeyName, lphKey&)
    > ret& = RegSetValue&(lphKey&, "", REG_SZ, sKeyValue, 0&)
    > ' fILE extension sKeyName = ".cim"
    > sKeyValue = "CIMDFile"
    > ret& = RegCreateKey&(HKEY_CLASSES_ROOT, sKeyName, lphKey&)
    > ret& = RegSetValue&(lphKey&, "", REG_SZ, sKeyValue, 0&)
    > ' executable path
    > sKeyName = "CIMDFile"
    > sKeyValue = App.Path & "\" & "CIMDApp.EXE ""%1""" 'parametters
    > ret& = RegCreateKey&(HKEY_CLASSES_ROOT, sKeyName, lphKey&)
    > ret& = RegSetValue&(lphKey&, "shell\open\command", REG_SZ, _
    > sKeyValue, MAX_PATH)
    > ' icon
    > sKeyValue = App.Path & "\Ani\CIMDFile.ICO"
    > ret& = RegSetValue&(lphKey&, "DefaultIcon", REG_SZ, _
    > sKeyValue, MAX_PATH)




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center