Szybkie szukanie
Słowo kluczowe:
sobota, 11 luty 2012
Start arrow Tips & Tricks arrow Toolbar ala Office97 i IExplorer 4.0 (VB 5).
Toolbar ala Office97 i IExplorer 4.0 (VB 5). Drukuj E-mail
Nadesłał mortar   
sobota, 21 styczeń 2006
'1. Utwórz nowy projekt i dodaj do niego Common Controls ActiveX.
'2. Narysuj TOOLBAR i dodaj przyciski.
'3. Dodaj dosekcji General Declarations .

Private Declare Function FindWindowEx Lib "user32" Alias
"FindWindowExA" (ByVal hWndParent As Long, ByVal hWndChildWindow As Long,
ByVal lpClassName As String, ByVal lpsWindowName As String) As Long

Const TB_SETSTYLE = WM_USER + 56
Const TB_GETSTYLE = WM_USER + 57

Const WM_USER = &H400

Const TBSTYLE_FLAT = &H800

'4. Dodaj procedurę do General Declarations :

Public Sub SetTBar97(TBar As Toolbar)
Dim lTBarStyle As Long, lTBarHwnd As Long
lTBarHwnd = FindWindowEx(TBar.hWnd, 0&, "ToolbarWindow32",
vbNullString)
lTBarStyle = SendMessage(lTBarHwnd, TB_GETSTYLE, 0&, 0&)
lTBarStyle = lTBarStyle Or TBSTYLE_FLAT
SendMessage lTBarHwnd, TB_SETSTYLE, 0, lTBarStyle
TBar.Refresh
End Sub

'5. Dodaj moduł kodu i wpisz :

Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal
hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As
Long

'6. Teraz wystarczy wpisać:

' SetTBar97 Toolbar1

'aby uzyskać wymarzony efekt (Toolbar1 to nazwa tojego toolbara)

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 33 gości online
Statystyka
Użytkownicy: 11345
Newsy: 237
Odnośniki: 48
Odwiedzających: 4327504
Mambo is Free Software released under the GNU/GPL License.