VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Transparent Bullet Label Control

AlT  (10 Submissions)   Custom Controls/Forms/Menus   VB Script   Intermediate   Wed 3rd February 2021

A small prototype of a much larger project I am working on which required the use of labels with a little more zest. Hence, my solution is tranparent bullet labels. This project demonstrates a simple way to draw text, shapes, etc., on a usercontrol when the backstyle is set to transparent and should be useful as a starting point for anyone wanting to roll their own transparent controls with the added flexibility of drawing it yourself.

API Declarations
Private Declare Function CreateBrushIndirect Lib "gdi32" (lpLogBrush As LOGBRUSH) As Long
Private Declare Function CreatePen Lib "gdi32" (ByVal nPenStyle As Long, _
ByVal nWidth As Long, ByVal crColor As Long) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Private Declare Function DrawTextEx Lib "user32" Alias "DrawTextExA" (ByVal hdc As Long, _
ByVal lpsz As String, ByVal n As Long, lpRect As RECT, ByVal un As Long, _
ByVal lpDrawTextParams As Any) As Long
Private Declare Function Ellipse Lib "gdi32" (ByVal hdc As Long, ByVal X1 As Long, _
ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function GetSysColor Lib "user32" (ByVal nIndex As Long) As Long
Private Declare Function Polygon Lib "gdi32" (ByVal hdc As Long, lpPoint As POINTAPI, _
ByVal nCount As Long) As Long
Private Declare Function Rectangle Lib "gdi32" (ByVal hdc As Long, ByVal X1 As Long, _
ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, _
ByVal hObject As Long) As Long

Rate Transparent Bullet Label Control (6(6 Vote))

Download Transparent Bullet Label Control

Transparent Bullet Label Control Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters