为了便于观察，先在窗口上添加两个按钮，Command1和Command2。加上如下代码： 
    Private Sub Command1_Click() 
     Print "Hello" 
    End Sub 
     
    Private Sub Command2_Click() 
     End 
    End Sub 
    这两个按钮一个用于终止程序运行，一个用于显示文字。 
    然后，将Form的Border设为None。 
    最后，在Form的声明部分加上以下代码： 
    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 SetParent Lib "user32" (ByVal hWndChild _ 
    As Long, ByVal hWndNewParent As Long) As Long 
    Const WS_EX_TRANSPARENT = &H20& 
    Const GWL_EXSTYLE = (-20) 
    最后，在Form中加上如下代码。 
    Private Sub Form_Load() 
     SetWindowLong hwnd, GWL_EXSTYLE, WS_EX_TRANSPARENT 
    End Sub 
<END>