Search Tools Links Login

PB XP Button Update Build 6 (10/1/2001)


Visual Basic 6, or VB Classic

A smart looking Office XP Button - You can change the border & background colors, add shadows, disable it, mouse over & mouse out support, set the icon size....
Upadated: build 2 -
Added MultiLine Caption Support,,
Added Caption Alignment,,
Plus some little bugs fixed,,
** Update: Build 3 Added focus rect show or hide,
Added Keydown, KeyUp & KeyPress support,
Added Set Font Color on MouseOver,
Added Set Font Color on MouseDown,
** Update: Build 4 - Added Checkbox type button
** Update: Build 5
Fixed Problem with double click
Improverd the looks on the checkbutton,
Option button support,
Improved the shadow on the icon.......
Build 6 - Memory leak fixed....
If you find any bugs or have any suggestions please let know..

Original Author: Paul B1

API Declarations

Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Declare Function SetCapture Lib "user32" (ByVal hWnd As Long) As Long
Private Declare Function DrawText Lib "user32" Alias "DrawTextA" (ByVal hDC As Long, ByVal lpStr As String, ByVal nCount As Long, lpRect As RECT, ByVal wFormat As Long) As Long
Private Declare Function DrawIcon Lib "user32" (ByVal hDC As Long, ByVal X As Long, ByVal Y As Long, ByVal hIcon As Long) As Long
Private Declare Function DrawIconEx Lib "user32" (ByVal hDC As Long, ByVal xLeft As Long, ByVal yTop As Long, ByVal hIcon As Long, ByVal cxWidth As Long, ByVal cyWidth As Long, ByVal istepIfAniCur As Long, ByVal hbrFlickerFreeDraw As Long, ByVal diFlags As Long) As Long
Private Declare Function DrawFocusRect Lib "user32" (ByVal hDC As Long, lpRect As RECT) As Long
Private Declare Function SetRect Lib "user32" (lpRect As RECT, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function SetRectEmpty Lib "user32" (lpRect As RECT) As Long
Private Declare Function CreateSolidBrush Lib "gdi32" (ByVal crColor As Long) As Long
Private Declare Function FillRect Lib "user32" (ByVal hDC As Long, lpRect As RECT, ByVal hBrush As Long) As Long
Private Declare Function FrameRect Lib "user32" (ByVal hDC As Long, lpRect As RECT, ByVal hBrush As Long) As Long
Private Declare Sub OleTranslateColor Lib "oleaut32.dll" (ByVal Clr As Long, ByVal hPal As Long, ByRef lpcolorref As Long)
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 133 times

Categories

Visual Basic 6

Attachments

PB XP Butt272831012001.zip
Posted: 9/3/2020 3:45:00 PM
Size: 32,214 bytes


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.