5. Запуск программы:
Code
Private Sub Form_Load()
'запустить калькулятор
Shell "Название Программы.exe"
End Sub
6. Как сделать Label с тенью?
Code
Private Sub Form_Load()
Label1.Caption = "ЫЫЫЫЫЫЫЫЫЫ"
Label2.Caption = "ЫЫЫЫЫЫЫЫЫЫ"
Label1.AutoSize = True
Label2.AutoSize = True
Label1.BackStyle = vbTransparent
Label2.BackStyle = vbTransparent
Label1.ForeColor = RGB(255, 0, 0)
Label2.ForeColor = RGB(0, 0, 255)
Label1.FontBold = True
Label2.FontBold = True
Label1.Left = 120: Label1.Top = 120
Label2.Left = 130: Label2.Top = 130
Label2.ZOrder (1)
End Sub
7. Как ограничить передвижение мыши?
Code
Private Sub Form_Load()
Command1.Caption = "'Запереть' мышь"
Command2.Caption = "Снять ограничение"
End Sub
Private Sub Command1_Click()
Dim rctCLS As RECT
Dim pntXY As POINTAPI
GetClientRect Me.hwnd, rctCLS
pntXY.x = rctCLS.Left
pntXY.y = rctCLS.Top
ClientToScreen Me.hwnd, pntXY
OffsetRect rctCLS, pntXY.x, pntXY.y
ClipCursor rctCLS
End Sub
Private Sub Command2_Click()
ClipCursor ByVal 0&
End Sub
Private Sub Form_Unload(Cancel As Integer)
ClipCursor ByVal 0&
End Sub