Skip to content

How To make Flat Buttons in your programs

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #190128
    Admin
    Administrator

    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

    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

    Private Sub Form_Load()
    Call MakeFlatButtons(Me)
    End Sub

    Thas all folk, 😈

    #190133
    Project SP
    Member

    OK LOCO THE CODE WONT WORK UNTI U PUT SOME EXTRA IN IT..
    WICH IS GONNA MAKE THE FORM TO APPEAR….
    TRY THIS AND ULL SEE IT WORKIN…… 🙂


    Private Sub Form_Load()
    Call MakeFlatButtons(Me)
    Me.Show ' SHOWS THE FORM WINDOW... TO SEE THE RESULTZ
    End Sub
    #190132
    UDG Clan
    Member

    it does not do anytihng all it does is put the button on the top lol

    #190131
    Admin
    Administrator

    😆 jeje Did you change the properties in the picturebox 🙂 it works for me, check this is the original code

    I still wanna use sp buttons, jeje 😉

    #190130
    Admin
    Administrator

    Just get like KewlBottonz.ocx and put it in your system32 and then load the KewlBottonz.ocx to your Components for vb6 that you should be able to figure the rest out thats what my anti-ban uses is a ocx kinda like KewlBottonz 😉

    #190129
    Admin
    Administrator

    Yo Syxx where u downlod that oxc at 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.