Find all our projects in development below.
All source code is GNU General Public License (GPL)
Browsing CButtonMod.bas (726 B)
Attribute VB_Name = "CButtonMod"
Option Explicit
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const BM_SETSTYLE = &HF4
Private Const BS_SOLID = 0
Sub CButtonAll(frmObject As Form)
Dim Control As Control
Dim CmdButton As CommandButton
For Each Control In frmObject.Controls
If TypeOf Control Is CommandButton Then
Set CmdButton = Control
CButton CmdButton
Set CmdButton = Nothing
End If
Next Control
End Sub
Public Sub CButton(CmdButton As CommandButton)
SendMessage CmdButton.hWnd, BM_SETSTYLE, BS_SOLID, 1
End Sub