Results 1 to 8 of 8

Thread: How to add icons to a Tool bar?

  1. #1

    Thread Starter
    Addicted Member samkud's Avatar
    Join Date
    Oct 2001
    Location
    India
    Posts
    171

    How to add icons to a Tool bar?

    Hi everybody,

    I add a toolbar control to my form using the microsoft windows common control. Now i am not able to add buttons or icons to the toolbar. Can anyone please tell me how to add the buttons to the tool bar.

    Thanx.

    Regards.

    Samir

  2. #2
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205
    You just dbl-click the toolbar or something to bring up it's special properties window.
    To get pics on your buttons, you need to use an Image List Control, or something, I forget its name, and then you link the toolbar to that ImageList.
    -----------------------------------------
    -RJ
    [email protected]
    -----------------------------------------

  3. #3

    Thread Starter
    Addicted Member samkud's Avatar
    Join Date
    Oct 2001
    Location
    India
    Posts
    171
    Hi rjlohan

    Thanx for ur reply.


    Regards

    Samir

  4. #4
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205
    No worries.
    -----------------------------------------
    -RJ
    [email protected]
    -----------------------------------------

  5. #5
    Fanatic Member laserman's Avatar
    Join Date
    Jan 2002
    Location
    Wales U.K
    Posts
    775

    TOOLBAR ICONS

    After you place the toolbar on your form:-
    right click the toolbar and goto properties.
    go to add buttons etc and use the imagelist 1 to assign icons etc.

    Place an imagelist1 on your form and goto the properties and then add icons to the imagelist1 etc.

    After you have place icons in your imagelist you goback to toolbar properties and reference the button to the icon you nrequire on that button.

    HOPE THIS HELPS AND IS CLEAR ENOUGH

  6. #6

    Thread Starter
    Addicted Member samkud's Avatar
    Join Date
    Oct 2001
    Location
    India
    Posts
    171

    Thanx laserman,

    Thank u very much buddy.

  7. #7
    Fanatic Member laserman's Avatar
    Join Date
    Jan 2002
    Location
    Wales U.K
    Posts
    775

    Wink toolbar

    No problem.
    Hope i dident waffle too much

  8. #8
    Fanatic Member laserman's Avatar
    Join Date
    Jan 2002
    Location
    Wales U.K
    Posts
    775

    toolbar

    I forgot to mention.

    Once you have placed the buttons on the bar to use them when you run the program use some code like this.

    Click on the toolbar and add some code like this:

    Select case Button.index
    case"1"
    msgbox"You pressed the first button",vbinfomation
    case"2"
    msgbox"you hit number 2 button",vbcritical
    end select


    'Keep adding case statement for the number of buttons on your toolbar e.g I have 2 so there are 2 cases.

    Ok

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