vb 显示实心圆

来源:百度知道 编辑:UC知道 时间:2024/05/31 13:09:08
vb 显示实心圆

=============================================

如何在屏幕中心显示一个实心圆?

请给出详细源码~~

不会请不要回复~

=====================================
=====================================================================================================

楼下的 a6essaw 同志

你看清楚问题了没有!是屏幕~不在窗体~

实心圆显示在屏幕上 不是在窗体上~~

===========================================================

Option Explicit
Const LWA_COLORKEY = &H1
Const LWA_ALPHA = &H2
Const GWL_EXSTYLE = (-20)
Const WS_EX_LAYERED = &H80000
Const WS_EX_TRANSPARENT As Long = &H20&
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long

Private Sub Form_Click()
End
End Sub

Private Sub Form_Load()
Me.Height = 6000
Me.Width = 6000
Dim Ret As Long
Ret = GetWindowLong(Me.hwnd, GWL_EXSTYLE)
Ret = Ret Or WS_EX_LAYERED Or WS_EX_TRANSPARENT
SetWindowLong Me.hwnd, GWL_EXSTYLE, Ret
Me.B