Question:

About visual basic 6.0......hw to change form icon at the top on runtime..?

by Guest58679  |  earlier

0 LIKES UnLike

i jst want to know how to change form icon at runtime....i mean when i run a vb project thers an icon on the top right of the form...i jst want to change it acording to my conviniene i mean i want to put my company icon..........plz help as soon as possible?

 Tags:

   Report

4 ANSWERS


  1. u can change the icon by changing the icon in the properties of form.

    There is a option called icon in properties followed by a small box click that and browse the icon which you need and give ok.  


  2. Dear ,

    USE this Code

    Private Sub Form_Load()

    Form1.Icon = LoadPicture("C:\Program Files\Yahoo!\Common\Icons\services.ICO")

    End Sub


  3. There has to be a properties field in the designer window for the main

    window form.

    Select browse and choose appropiate icon ...  

  4. Are you sure that the icon is in the Top Right part of the form? The control toolbox (maximize, minimize, close buttons) is on that part. Anyway, to change the icon of the program/form, just put the path and filename of the icon in the Icon attribute. Or you can include the following code to the form's Form_Load( ):

       FormName.Icon = LoadPicture("Insert Complete Path to Icon File Here")

    I suggest having the icon file in the same directory as the application and then you can just include the following to Form_Load( ):

       FormName.Icon = LoadPicture(App.Path & "Icon's Filename")

    Unfortunately, one disadvantage of using Version 6.0 of Visual Basic is that only low resolution icons can be used (Those that you commonly see in Windows 95 or 98). So it is not a good idea to use your company's logo as icon.

    Hope it helps! :)

Question Stats

Latest activity: earlier.
This question has 4 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.