當前位置:編程學習大全網 - 編程語言 - 寫壹個關於(控件編程)程序

寫壹個關於(控件編程)程序

'方法壹:調用系統API函數

Private Declare Function ShellAbout Lib "shell32.dll" Alias "ShellAboutA" (ByVal hWnd As Long, ByVal szApp As String, ByVal szOtherStuff As String, ByVal hIcon As Long) As Long

'這是API函數,調用windows 關於窗口,可以改成自己的

Private Sub Command1_Click()

ShellAbout Me.hWnd, "這裏寫標題", "這裏寫作者的信息,例如(作者:劉典武 遊龍軟件工作室)", Me.Icon '三個參數,最後壹個顯示關於窗體的ico

End Sub

'方法二:滾動顯示作者的信息

Private Sub Form_Load()

Label1.Top = Picture1.ScaleHeight

hh0$ = Chr$(13) + Chr$(10)

SM$ = SM$ + "作者:劉典武" + hh0$

SM$ = SM$ + " " + hh0$

SM$ = SM$ + "遊龍軟件工作室" + hh0$

SM$ = SM$ + " " + hh0$

SM$ = SM$ + "謝謝使用" + hh0$

Label1.Caption = SM$

End Sub

Private Sub Timer1_Timer()

iStep = 20

Label1.Top = Label1.Top - iStep

If Label1.Top + Label1.Height < Picture1.Top + Picture1.Height Then

If Label1.Top + Label1.Height < 20 Then

Label1.Top = Picture1.Height + Label1.Height - 3200

End If

End If

End Sub

'方法三:超級鏈接和郵件

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

Label4.ForeColor = RGB(0, 0, 0)

Label4.FontUnderline = False

Label4.MousePointer = 0

Label5.ForeColor = RGB(0, 0, 0)

Label5.FontUnderline = False

Label5.MousePointer = 0

End Sub

Private Sub Label4_Click()

Shell "c:\program files\internet explorer\IExplore.exe ", vbMaximizedFocus

End Sub

Private Sub Label4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

Label4.ForeColor = RGB(255, 0, 0)

Label4.FontUnderline = True

Label4.MousePointer = 10

End Sub

Private Sub Label5_Click()

Shell "c:\program files\internet explorer\IExplore.exe mailto:feiyangqingyun@163.com", vbHide

End Sub

  • 上一篇:魚龍是如何繁殖的?
  • 下一篇:紅外遙控器原理 遙控器原理圖
  • copyright 2024編程學習大全網