Results 1 to 6 of 6

Thread: How to specify Application Icon?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    541

    How to specify Application Icon?

    I successfully imported a VB6 project! (Two others I tried to import previously failed but that's another topic.)

    I was also able to build the project successfully. All seems to work well which is pretty encouraging. The one thing I can't figure out is how to set the application icon? In VB6, I do it in the Project window, Make tab.

    Name:  set application icon in vb6.jpg
Views: 71
Size:  21.3 KB

    I can't find where I set this in tB. I believe I looked at all the available Project settings in tB.

  2. #2
    Addicted Member
    Join Date
    Dec 2020
    Posts
    217

    Re: How to specify Application Icon?

    The icon file inside the Resources\ICON folder (in PROJECT EXPLORER) is used for the app icon. By default it will be twinBASIC.ico, but you can delete that and import your own ICO.

    Note that when you next build the EXE, Windows Explorer won't necessarily notice the new icon immediately, as it caches a copy of it. In order to get Explorer to notice the change you may have to run `ie4uinit -show` from the command line.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    541

    Re: How to specify Application Icon?

    Thanks Wayne. There was no ICON folder in Resources (is there supposed to be one for VB6 projects opened in tB?). I created an ICON folder in Project Explorer and added the app icon and all is well now on the rebuild. Thanks!

  4. #4
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,999

    Re: How to specify Application Icon?

    One other thing to note: if you have multiple icons in that folder (the folder itself is the standard icon resources folder, like adding icons in the VB6 Resource Editor), the first one alphabetically will be used for the app icon.

    Not sure about whether not inserting one by default for imported projects is intended or not. Probably should add one unless the imported project has a resource file with icon group already (or an assigned icon from a form).


    Also, I know the documentation is still fairly sparse, but it's worth reading: https://github.com/twinbasic/documentation/wiki

    This topic was covered in the FAQ:

    https://github.com/twinbasic/documen...estions-(FAQs)

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    541

    Re: How to specify Application Icon?

    Thanks for pointing me to the FAQ. I've bookmarked it for future questions.

  6. #6
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,999

    Re: How to specify Application Icon?

    Also worthwhile is the New Features wiki entry; it gives a brief overview of all the syntax, language, and IDE features that are new to tB vs VB6.

    And one of the most underrated new features: Control anchoring and docking. tB can save you from having to write all the basic resizing code to keep controls synced with the form borders; like if you anchor a textbox to the top, left, bottom and right, it will keep the same top left corner position and resize vertically and horizontally along with the form. If you anchor a command button just to the right, it will stay the same width but keep the right edge a constant distance from the edge of the form, moving the control as you resize. It really saves a ton of math in the resize events. The link has lots of pictures to show what I mean.

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