CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 1999
    Location
    California
    Posts
    264

    How can I make my own icon for VB application?

    Can somebody tell me where to change the VB application and system menu icon? Thank you!

    Best Regards,

    Kevin Shen
    Best Regards,

    Kevin Shen

  2. #2
    Join Date
    Dec 2000
    Location
    Los Angeles, CA
    Posts
    34

    Re: How can I make my own icon for VB application?

    Create a 16x16 or 32x32 BMP image [you can use MS PaintBrush for this]. And then save as a .ICO file. The trick is, the upper lefthand pixel will be the transparent color. So tansparent area just needs to be the same color as that pixel.

    I've done this several times and never really had much problem..

    Other than that I'd suggest getting a commercial product like Microangelo [there is an evaluation version], specifically designed for creating/editing icon files.

    Nathan


  3. #3
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: How can I make my own icon for VB application?

    If you are talking about changing the Icon in the upper left corner of your Form, your form has a Icon Property. Click it and select the Icon of your choice.

    John G

  4. #4
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: How can I make my own icon for VB application?

    And to set an icon for your project (This will appear as the icon of your .EXE file), go to Project | Properties and in the Make tab, choose the form whose icon you want to be the icon of the application.


  5. #5
    Join Date
    Sep 2000
    Posts
    23

    Re: How can I make my own icon for VB application?

    Yes, i agree. Microangelo is what i use, very good.
    It's a pity VB dosen't have it's own resource editor, hopefully MicroSoft will do something about this in the next version.

    It can cost a bit to licence it to get the full working version if your outside the country where it was made, once you add all the fees and postage, ect.



  6. #6
    Join Date
    Aug 1999
    Location
    California
    Posts
    264

    Re: How can I make my own icon for VB application?

    I use MSPaint to creat an icon save as bmp file. The save as type, I choose "All file" or "16, 256 color bitmap". File name is "logo.ico".
    I want to change the icon at Form icon property. But it always show "invalid Property Value". I don't know why.

    Best Regards,

    Kevin Shen
    Best Regards,

    Kevin Shen

  7. #7
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: How can I make my own icon for VB application?

    An Icon (.ico) file is different then a Bitmap (.bmp) file. You can change the file extension or save a bitmap with .ico file extension but this does not make it a Icon file which is why VB says Invalid picture when you try to load it as the Forms Icon. You should be able to load MSPaints output into the Picture property of the Form but I am sure this is not what you want.
    You need to find a program that will convert your .bmp file into a .ico file
    Look on Http://www.Planet-Source.Code.com/vb for a BMP2ICO file converter program.

    John G

  8. #8
    Join Date
    Aug 1999
    Location
    California
    Posts
    264

    Re: How can I make my own icon for VB application?

    I can not use .bmp as an icon, the VB does not accept it. Do you have other method? Thanks!

    Best Regards,

    Kevin Shen
    Best Regards,

    Kevin Shen

  9. #9
    Join Date
    Apr 2001
    Posts
    1

    Re: How can I make my own icon for VB application?

    make a bitmap with paint
    put a picturebox on a vb form
    extract the bitmap with this api
    Declare Function ExtractIcon Lib "shell32.dll" Alias "ExtractIconA" (byval hInst as Long, byval lpszExeFileName as string, byval nIconIndex as Long) as Long

    then simply save the file to your Hd.



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

Featured