Advertisement
4_2005-2006 Coding Standards #163404

Shadow for controls

i saw many people creating shadow by adding a label control it dosent matter if you have min no of controls but when you have large no of controls So here is the code to create shadow without using any other controls Just paste this code ***Have Fun***

AI

สรุปโดย AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

ซอร์สโค้ด
original-source
Public Sub SHADOW(Frm As Form, Ctrl As Control)
Const SC = vbBlack 'you can define your own color
Const SW = 3
Dim IOLDWIDTH As Integer
Dim IOLDSCALE As Integer
IOLDWIDTH = Frm.DrawWidth
IOLDSCALE = Frm.ScaleMode
Frm.ScaleMode = 3
Frm.DrawWidth = 1
Frm.Line (Ctrl.Left + SW, Ctrl.Top + SW)-Step(Ctrl.Width - 1, Ctrl.Height - 1), SC, BF
Frm.DrawWidth = IOLDWIDTH
Frm.ScaleMode = IOLDSCALE
End Sub
Private Sub Form_paint()
SHADOW Me, Command1
End Sub
ความคิดเห็นดั้งเดิม (3)
กู้คืนจาก Wayback Machine