?
Solved

A VERY easy question

Posted on 1999-12-08
8
Medium Priority
?
146 Views
Last Modified: 2010-05-02
Hello, I've aquestion:

How do I create a tool-bar ? when I'm adding buttons, the picture is 3D, and I won't it to be flat.Do I need to add an imange and then create an event of draging ?  and if so, how do I do that.

0
Comment
Question by:lirong
  • 3
  • 3
  • 2
8 Comments
 
LVL 4

Expert Comment

by:Jeremy_D
ID: 2265571
If you are using the Toolbar from the Microsoft Windows Common Controls ocx, you can set the Style property to 1 (tbrFlat). If you are using some other Toolbar, let us know which one.
0
 
LVL 1

Expert Comment

by:HunterKiller
ID: 2265600
You want a tool bar with 3D buttons or you want it flat and when the mouse passes over it gets 3D ??
0
 

Author Comment

by:lirong
ID: 2265652
I didn't know on the tool bar OCX possibility. How do I assign the buttons to that tool bar ??
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
LVL 4

Expert Comment

by:Jeremy_D
ID: 2265698
Drag one on your form, right click on it and choose 'Properties'.
You can bind it to an imagelist control (from the same ocx) and assign a picture to each button.
0
 

Author Comment

by:lirong
ID: 2265849
How can I tell, which button was pressed ???
0
 
LVL 1

Expert Comment

by:HunterKiller
ID: 2266121
Step by Step then:
1- Add the Microsoft Windows Common Controls 5.0 (for VB5) or 6.0 (for VB6)

2- Double Click the ToolBar Icon on the ToolBox, it will add a toolbar on the top of your form;

3- insert a Image list control by the same way above.

4- ask the image list properties,click on images and on insertpicture button to choose your picture. you can add more pics;

5- bind the  toolbar to your imagelist selecting the toolbar properties and in the imagelist field select your imagelist;

6- add the buttons clicking on the buttons tab, Insert button; the KEY field is your identifier for this button. I use btn1, btn2 as values. To choose what picture will be on this button, on the image field, put the index of the pic of the image list;

7- to know what button was pressed:

Private Sub toolbar1_ButtonClick(ByVal Button As Button)
Select Case Button.Key
   Case Is = "btn1" :  MsgBox "You pressed btn1"
   Case Is = "btn2"  :  MsgBox "You pressed btn2"
End Select
End Sub

I think thats what you need....

0
 

Author Comment

by:lirong
ID: 2266247
Thank you very much
0
 
LVL 1

Accepted Solution

by:
HunterKiller earned 60 total points
ID: 2268227
I wouldnt mind to get the points added to my account then...
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

589 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question