Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Public Sub RightAlignButtons(frm As Form, _
btns As Object, _
Right As Single)
Dim nLBound&, nUBound&, I&
If TypeName(btns) = "CommandButton" Then
btns.Left = frm.ScaleWidth - Right - btns.Width
Else
nLBound = btns.LBound
nUBound = btns.UBound
For I = nLBound To nUBound
btns(I).Left = frm.ScaleWidth - Right - btns(I).Width
Next
End If
End Sub
Public Sub RightAlignControl(frm As Form, _
ctrl As Object, _
Right As Single)
ctrl.Left = frm.ScaleWidth - Right - ctrl.Width
End Sub
Public Sub RightBottomAlignControl(frm As Form, _
ctrl As Object, _
Right As Single, _
Bottom As Single)
ctrl.Left = frm.ScaleWidth - Right - ctrl.Width
ctrl.Top = frm.ScaleHeight - Bottom - ctrl.Height
End Sub
Public Sub BottomAlignControl(frm As Form, _
ctrl As Object, _
Bottom As Single)
ctrl.Top = frm.ScaleHeight - Bottom - ctrl.Height
End Sub
Public Sub AlignGrid(frm As Form, _
grid As Object, _
Left As Single, _
Top As Single, _
Right As Single, _
Bottom As Single)
grid.Left = Left
grid.Top = Top
Dim W As Single
W = frm.ScaleWidth - grid.Left - Right
If W < 1000 Then W = 1000
grid.Width = W
Dim H As Single
H = frm.ScaleHeight - grid.Top - Bottom
If H < 1000 Then H = 1000
grid.Height = H
End Sub
Public Sub CheckFreeEdition(grid As Object)
If InStr(grid.Version, "Free") > 0 Then
MsgBox "You are using BeeGrid Free Edition." & vbCrLf & vbCrLf & _
"This sample uses features not available in Free Edition." & vbCrLf & _