I am looking for an example of how to add icons instead of option buttons in VB6. Any suggestions?
Printable View
I am looking for an example of how to add icons instead of option buttons in VB6. Any suggestions?
If you change the Option buttons Style to 1 - Graphical at DesignTime you can add an icon in the Picture property. It will act like a depressed command button then. ;)
Is there any way to make it so that it will not look like a command button? I want to see only icons without rectangles around them. I have seen such things in some programs, only thing is that I don't know how to achieve this. :(
plz attach a picture or screen-shot of such application!!Quote:
Originally Posted by Abhirama
You could create a control array of pictures and then do the following. I only put in the code for BorderStyle as in indicator of when the "option" is clicked.
VB Code:
Option Explicit Private Sub Form_Load() picOpt(0).BorderStyle = 0 picOpt(1).BorderStyle = 0 picOpt(2).BorderStyle = 0 End Sub Private Sub picOpt_Click(Index As Integer) picOpt(0).BorderStyle = 0 picOpt(1).BorderStyle = 0 picOpt(2).BorderStyle = 0 picOpt(Index).BorderStyle = 1 Select Case Index Case 0 ' Do stuff for 0 Case 1 ' Do stuff for 1 Case 2 ' Do stuff for 2 End Select End Sub