Szybkie szukanie
Słowo kluczowe:
sobota, 11 luty 2012
Start arrow Tips & Tricks arrow Flat button by marins
Flat button by marins Drukuj E-mail
Napisał Administrator   
wtorek, 24 styczeń 2006

Flat button

Private Declare Function GetWindowLong& Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long)
Private Declare Function SetWindowLong& Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long)
Const BS_FLAT = &H8000&
Const GWL_STYLE = (-16)


Public Sub Flat_Button(Frm As Form)
Dim InitBTStyle As Long
For I = 0 To (Frm.Controls.Count - 1)
Set ctrlTarget = Frm.Controls(I)
If TypeOf ctrlTarget Is CommandButton Then
InitBTStyle = GetWindowLong&(ctrlTarget.hwnd, GWL_STYLE)
SetWindowLong ctrlTarget.hwnd, GWL_STYLE, InitBTStyle Or BS_FLAT
ctrlTarget.Refresh
End If
Next I
End Sub

Teraz wystarczy tylko:
Flat_Button Me


Tips dostarczył: marins

Komentarze

Aby dodać komentarz zaloguj się. Jeśli nie masz konta, załóż je sobie.
Tylko zarejestrowani użytkownicy mogą pisać komentarze.

Powered by AkoComment 2.0!

< Poprzedni   Następny >

Menu główne
Start
Teoria
VB.NET
Api
Tips & Tricks
Warsztat
VBMagazine
Pliki
Forum
Literatura
Ankiety
Linki
Szukaj
Wyślij program
Napisz do nas
Redakcja
Logowanie
Login

Hasło

Zapamiętaj mnie
Nie pamiętasz hasła?
Nie masz konta? Załóż je sobie
Gościmy
Aktualnie jest 23 gości online
Statystyka
Użytkownicy: 11345
Newsy: 237
Odnośniki: 48
Odwiedzających: 4328147
Mambo is Free Software released under the GNU/GPL License.