Hey, I found this in the vb source site, it gives your programs buttons a flatten looks, kool some peopel ask me about this cause i being using it on my latest proggies here you go
First make a module with this code
- Code: Select all
Option Explicit
'to use the subroutine, you have to put a picturebox named picFlat
'on each form from where you will call this sub
'pictureboxe's properties should be: Index=0, Appearance = Flat,
'BorderStyle=fixed single, Visible=False
Public Sub MakeFlatButtons(frm As Form)
Dim ButtonCount As Integer
Dim c As Control
On Error Resume Next
For Each c In frm
If TypeOf c Is CommandButton Then
ButtonCount = ButtonCount + 1
Load frm.picFlat(ButtonCount)
With frm.picFlat(ButtonCount)
.Visible = True
.Left = c.Left
.Top = c.Top
.Width = c.Width
.Height = c.Height
End With
Set c.Container = frm.picFlat(ButtonCount)
c.Left = 0
c.Top = 0
End If
Next c
End Sub
Follow the steps that he tells on the top of the module then on your form put this
- Code: Select all
Private Sub Form_Load()
Call MakeFlatButtons(Me)
End Sub
Thas all folk,




