Results 1 to 8 of 8

Thread: [RESOLVED] Is it possible to create file with Application Icon

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2017
    Posts
    79

    Resolved [RESOLVED] Is it possible to create file with Application Icon

    Hi,
    Is it possible to crate file or a text file but with icon of the Application Icon.

    Thanks in advance for the help.

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Is it possible to create file with Application Icon

    Are you asking how to extract the application icon to an .ico file? Not 100% sure what you mean exactly by: Application Icon. I am reading it as the icon shown in Explorer for an exe file. But that may be misinterpreted on my part?

    Edited: If you are looking to save the icon to disk as an icon, you can play with a project I just uploaded today. In my signature below, click the "Resource Image Viewer/Extractor" link. There are other options too. You can always get the icon via APIs like ExtractAssociatedIcon to retrieve an icon handle and then save the icon handle to disk using code similar to this one in our codebank.
    Last edited by LaVolpe; Nov 18th, 2017 at 12:47 PM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2017
    Posts
    79

    Re: Is it possible to create file with Application Icon

    Thanks Lavolpe,
    I want to know exactly that say for example i am using a .ico file for the Icon of my application. In the application i am giving some inputs and i want to save that input data to a text file. Here i want to know, how to save that text file but it should be .exe file showing the icon that used in application.

  4. #4
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Is it possible to create file with Application Icon

    I think I got you now, but maybe not

    Look at examples of how to "associate files" to your application, within this forum. Lots of examples exist.

    But in doing this, a couple things should be considered.

    1) Use a unique file extension for your data files; something no one else uses (i..e, not .dat, .txt, etc)

    2) After associating that file extension with your application (so the file is displayed with your app's icon), anyone double clicking on that file will activate your application.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Sep 2017
    Posts
    79

    Re: Is it possible to create file with Application Icon

    Thank you very much Lavolpe. Now my search has a right direction.

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Sep 2017
    Posts
    79

    Re: Is it possible to create file with Application Icon

    Ok, on search the two webpage as bellow i gone through.
    1#
    http://www.vbforums.com/showthread.p...e-Association)
    2#
    https://www.codeguru.com/vb/gen/vb_s...sociations.htm

    How to check in Registry whether the .xxx file extension is used by some other application ?

    If the file association has added to registry, when it is no more required how to remove it from registry?

  7. #7
    PowerPoster
    Join Date
    Sep 2006
    Location
    Egypt
    Posts
    2,579

    Re: Is it possible to create file with Application Icon

    Quote Originally Posted by Urgentbody View Post
    How to check in Registry whether the .xxx file extension is used by some other application ?
    Check if the key HKEY_CLASSES_ROOT\.xxx exist or not!


    Quote Originally Posted by Urgentbody View Post
    If the file association has added to registry, when it is no more required how to remove it from registry?
    Delete the key HKEY_CLASSES_ROOT\.xxx and the other key specify the shell command. e.g. to delete association of .txt
    1- delete HKEY_CLASSES_ROOT\.txt
    2- delete HKEY_CLASSES_ROOT\txtfile
    Last edited by 4x2y; Nov 18th, 2017 at 10:56 PM.



  8. #8

    Thread Starter
    Lively Member
    Join Date
    Sep 2017
    Posts
    79

    Re: Is it possible to create file with Application Icon

    One more link that describes how >> to add / check / Remove file type i.e. '.xxx'
    3#
    https://www.daniweb.com/programming/...ciation-in-vb6

    the following line not defined in routine need to be defined

    Dim lphKey&
    Last edited by Urgentbody; Nov 19th, 2017 at 02:31 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width