Question:

Is it possible to put pictures in buttonmenus of toolbar control in visual basic 6?

by  |  earlier

0 LIKES UnLike

i need help with toolbar buttonmenus. i also dont know how to put codes on them. pls help me. i need a sample program pls..... visual basic

 Tags:

   Report

1 ANSWERS


  1. If you have not already added a Toolbar and a CommonDialog on the form then do it.

    If you do not know how then:

    1. Right Click on the Toolbox

    2. Select Components

    3. Under the Control Tab find Microsoft Common Dialog Control 6.0 and Microsoft Windows Common Controls 6.0 (SP6) and Check the checkboxes.

    4. Click Apply

    5. Add the CommonDialog control to your form

    6. Double Click on the Toolbar control in the toolbox. A wizard will pop-up.

    7. Click Next

    8. In the Left-hand column find the Disk Icon that means "Save"

    9. Double Click will put it in the Right-hand column or you can highlight the Icon and press the right-hand arrow to put it in the Right-hand column.

    10. Click Next

    11. Do Not save the profile...

    12. Click Finish

    13. If any dialogs pop-up just add a 1 to the textbox name like (ImageList1) and click OK.

    14. Answer No to the dialog about the code.

    15. The wizard will create most of the code but you are going to change it.

    The code you see will be a typical Select Case style. Delete all of it.

    In the Code Pane left hand textbox where you see (General) choose Toolbar. In the right textbox choose ButtonClick

    Cut and paste this code inside the Sub procedure:

    On Error Resume Next

    CommonDialog1.ShowSave

    --------------------------------------...

    Your code should look like this:

    --------------------------------------...

    Private Sub Toolbar_ButtonClick(ByVal Button As MSComctlLib.Button)

    On Error Resume Next

    CommonDialog1.ShowSave

    End Sub

    --------------------------------------...

    : )

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.