locked
Inserting Your Own Icon In Title Bar??? RRS feed

  • Question

  • Is it possible to insert your own Icon in the Title bar when using the Graphics.Window mode?  Any help is much appreciated.  Thank you.

     

    Thursday, July 21, 2011 6:59 PM

Answers

  • You may use russian extension "Rezoh.ru" (link for SmallBasic v1.0, link for SmallBasic v0.9)
    Try this code:
    RZGraphicsWindow.Icon = "path/to/icon"

    This extension hasn`t translated into english yet.
    Thursday, July 21, 2011 9:28 PM
  • This is in ResEdit where the resources of the SB created exe are being manually modified, do you not see these options.  However, probably easier to use the Russian Extension - this is easier and doesn't need to be redone each time you compile - the only downside is that you need the extension dll.
    Friday, July 22, 2011 5:14 PM

All replies

  • Not using SmallBasic directly, but once the program is compiled and you have an executable (*.exe) you can edit the resources of the exe which include the icon, using a resource editor (Google for one, I have used the free ResEdit).  You can then add a resource->add icon->Create a new resource icon for your GraphicsWindow applications.

     



    Thursday, July 21, 2011 8:13 PM
  • When trying to use ResEdit Version 1.5.4 I goto open a New Project and I select in this case test2.exe program to edit and I receive an error:  No Resource Found In PE File?  Is there another file I should be editing?  Like a *.bas or the code file?
    Thursday, July 21, 2011 8:52 PM
  • If this program test2.exe has a graphics window (textwindow doesn't work) then this is OK, there are no resources by default in the SB exe.

    Just do File->Add a Resource..->Icon then Create a new resource or Create from an existing file (*.ico)

    There are also free icon editors out there (e.g. iconedit32) - the one in ResEdit is pretty basic.  EDIT - this icon editor is now not free, but I bet there are some that are.



    Thursday, July 21, 2011 9:05 PM
  • You may use russian extension "Rezoh.ru" (link for SmallBasic v1.0, link for SmallBasic v0.9)
    Try this code:
    RZGraphicsWindow.Icon = "path/to/icon"

    This extension hasn`t translated into english yet.
    Thursday, July 21, 2011 9:28 PM
  • Ok, I will try that.  Thanks.  
    Thursday, July 21, 2011 9:28 PM
  • Extravert - cool, that works well.
    Thursday, July 21, 2011 9:39 PM
  • "Just do File->Add a Resource..->Icon then Create a new resource or Create from an existing file (*.ico)"

    Where am I doing this in?  SB or ResEdit?

    Friday, July 22, 2011 3:18 PM
  • This is in ResEdit where the resources of the SB created exe are being manually modified, do you not see these options.  However, probably easier to use the Russian Extension - this is easier and doesn't need to be redone each time you compile - the only downside is that you need the extension dll.
    Friday, July 22, 2011 5:14 PM
  • You could always 'Graduate' to VB and add your icon there.
    Saturday, July 23, 2011 5:57 PM
  • Extravert - cool, that works well.
    Yeah, it's my code!
    Sunday, July 31, 2011 9:14 PM
  • This is in ResEdit where the resources of the SB created exe are being manually modified, do you not see these options.  However, probably easier to use the Russian Extension - this is easier and doesn't need to be redone each time you compile - the only downside is that you need the extension dll.
    ILMerge - no problem with this
    Sunday, July 31, 2011 9:18 PM
  • To give your own SmallBasic programm Exe's a more professional look (by adding an icon ressource for GW or TW/Console apps; Icon will appear in all titlebars GW+TW),
    i guess the most simple way would be this little CmdLine app:

    Windows Vista Icons (Codeproject)   or  Compile Windows Vista icons (Homepage)

    which is as simple as:

    ReplaceVistaIcon.exe [path\to\]SBProgram.exe [path\to\]ResIcon.ico
       (to add/set/replace a (new) icon ressource)

    ReplaceVistaIcon.exe    (for usage help)

    After changing the Exe you can view the result in eg. ResHacker  etc.
    Warning: Only use it for your SmallBasic Exe's. Don't try or use it on other binaries (eg. system files you could damage)



    Friday, September 1, 2017 2:46 PM
    Answerer