Results 1 to 8 of 8

Thread: VB6 App's ICON in the Program Files(x86) folder

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2011
    Posts
    56

    VB6 App's ICON in the Program Files(x86) folder

    Hi,

    I have a VB6 Application that has an icon assigned to it in the Make Tab of the VB6 IDE.
    The (embeded?) icon seemingly follows the .exe wherever it is dragged to except to it's real install folder
    on a Windows 7 X64 boxthat is \Program Files (x86)\ProductName\

    When it is dragged to this folder the icon reverts to the ugly default one.

    Most perplexing and I can't seem to find the solution by googling it.

    Thanks in advance,

    :Ron

  2. #2
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,060

    Re: VB6 App's ICON in the Program Files(x86) folder

    VB can be forced to use any kind of icon for the exe, title bar, Alt-Tab or Applications tab of Task Manager. See Re: Why dose some icos you download do not work?
    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 2011
    Posts
    56

    Re: VB6 App's ICON in the Program Files(x86) folder

    Thanks for that link Bonnie but I'm afraid that it didn't work for this problem.
    Perhaps I was not clear.

    My .exe has an icon.
    It always does no matter what.
    Except when dragged into c:\program files(x86)\ProductFolder. of a x64 windows box

    If it is dragged from that folder to say the x64 windows desktop, then the icon for the .exe appears as it should.
    If it is dragged or copied from that folder to say the c:\ or virtually any other folder, then the icon for the .exe appears as it should.
    If I drag it from where it looks good to that (x86) folder it changes back to the ugly vb6 default for .exe files

    :Ron

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: VB6 App's ICON in the Program Files(x86) folder

    I would tend to suspect that file virtualization is biting you here.

    Was the subfolder created and the EXE copied by a proper installation package (or at least via a command prompt or Explorer windows running with elevated rights)?

  5. #5
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: VB6 App's ICON in the Program Files(x86) folder

    And actually, forget about doing it via Explorer drag-n-drop at all, it no longer works after Windows Vista:

    Unable to open an elevated Windows Explorer window

    For completeness, this described how it worked under Vista (the last OS officially supporting VB6 development and the best OS for VB6 development by far in my opinion):

    UAC: Elevate Windows Explorer

    If you are not using installers then you should probably use elevated command prompts.
    Last edited by dilettante; Dec 14th, 2012 at 01:19 PM.

  6. #6

    Thread Starter
    Member
    Join Date
    Sep 2011
    Posts
    56

    Re: VB6 App's ICON in the Program Files(x86) folder

    Yes the folder and .exe file were created by an elevated installer
    I made a flashback movie of the problem.

    As I was playing back the movie for approval the .exe I was having trouble with's icon changed to the correct one before my eyes.
    Not in the video, but in the folder proper that was behind the video preview window.

    That doesn't seem fair.

    Thanks for all the help anyway.

    :Ron

  7. #7
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: VB6 App's ICON in the Program Files(x86) folder

    Time to call in the Ghostbusters.

    It sounds like you were wrestling with the Explorer icon cache then. When you do something to change the icon of a file in a given folder it can take a while for the image to be updated in the cache. A reboot handles it immediately, but what a pain.

  8. #8

    Thread Starter
    Member
    Join Date
    Sep 2011
    Posts
    56

    Re: VB6 App's ICON in the Program Files(x86) folder

    Thanks Everyone!

    :Ron
    Last edited by bitman; Dec 14th, 2012 at 04:45 PM.

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