Код:
; вызов меню о программе HotKeySet("{F1}", "_CallAbout_Proc") ;функция о программе Func _CallAbout_Proc() HotKeySet("{F1}") $title = "О программе" $MainLabel = "BiletCreator" & @LF & "Программа для формирования" & @LF & "экзаменационных билетов" $CopyRLabel = "Copyright © " & @YEAR & " DaMaNic. Все права защищены." $NameURL1 = "" $URL1 = "" $NameURL2 = "DaMaNic2005@mail.ru" $URL2 = "mailto:DaMaNic2005@mail.ru" $NameURL3 = "" $URL3 = "" $LinkColor = 0x0000FF $BkColor = 0xFFFFFF _AboutGUI($title, $MainLabel, "Версия: " & @LF & $Version, $CopyRLabel, _ $NameURL1, $URL1, $NameURL2, $URL2, $NameURL3, $URL3, $mainwindow, @AutoItExe, $LinkColor, $BkColor, 500, 200) HotKeySet("{F1}", "_CallAbout_Proc") EndFunc ;==>_CallAbout_Proc Func _AboutGUI($title, $MainLabel, $TextLabel, $CopyRLabel, $NameURL1, $URL1, $NameURL2, $URL2, $NameURL3, $URL3, $Parent = 0, $IconFile = "", $LinkColor = 0x0000FF, $BkColor = 0xFFFFFF, $Width = 300, $Height = 120, $Left = -1, $Top = -1, $style = -1, $ExStyle = -1) Local $OldEventOpt = Opt("GUIOnEventMode", 0) ; Local $OldRunErrOpt = Opt("RunErrorsFatal", 0) Local $About_GUI, $LinkTop = 120, $About_Msg, $CurInfo Local $CurIsOnCtrlArr[1] Local $LinkVisitedColor[4] = [3, $LinkColor, $LinkColor, $LinkColor] Local $LinkLabel[4] WinSetState($Parent, "", @SW_DISABLE) If $ExStyle = -1 Then $ExStyle = "" $About_GUI = GUICreate($title, $Width, $Height, $Left, $Top, $style, 0x00000080 + $ExStyle, $Parent) GUISetBkColor($BkColor) GUICtrlCreateLabel($MainLabel, 0, 20, $Width, 75, 1) GUICtrlSetFont(-1, 14) GUICtrlCreateIcon($IconFile, 0, 10, 20, 64, 64) GUICtrlSetState(-1, 128) GUICtrlCreateGraphic(5, 105, $Width - 10, 3, $SS_ETCHEDFRAME) For $i = 1 To 3 $LinkLabel[$i] = GUICtrlCreateLabel(Eval("NameURL" & $i), $Width - 150, $LinkTop, 145, 15, 1) GUICtrlSetCursor(-1, 0) GUICtrlSetColor(-1, $LinkColor) GUICtrlSetFont(-1, 9, 400, 0) GUICtrlSetTip(-1, Eval("URL" & $i)) $LinkTop += 30 Next GUICtrlCreateLabel($TextLabel, 10, 110, $Width - 155, 35) GUICtrlSetFont(-1, 10, 600, 0, "Tahoma") GUICtrlCreateLabel($CopyRLabel, 0, $Height - 20, $Width, -1, 1) GUICtrlSetColor(-1, 0x969696) GUICtrlSetState(-1, 128) GUISetState(@SW_SHOW, $About_GUI) While 1 $About_Msg = GUIGetMsg() Switch $About_Msg Case -3 ExitLoop Case $LinkLabel[1], $LinkLabel[2], $LinkLabel[3] GUISetCursor(0, 1, $About_GUI) $CurInfo = GUIGetCursorInfo($About_GUI) If $About_Msg = $LinkLabel[1] Then $i = 1 If $About_Msg = $LinkLabel[2] Then $i = 2 If $About_Msg = $LinkLabel[3] Then $i = 3 While $CurInfo[2] = 1 $CurInfo = GUIGetCursorInfo($About_GUI) Sleep(10) WEnd If $CurInfo[4] = $About_Msg Then GUISetCursor(-1, 0, $About_GUI) $LinkVisitedColor[$i] = 0xAC00A9 GUICtrlSetColor($About_Msg, $LinkVisitedColor[$i]) ShellExecute(Eval("URL" & $i)) EndIf GUISetCursor(-1, 0, $About_GUI) EndSwitch Sleep(10) ControlHover($About_GUI, $LinkLabel[1], 1, $CurIsOnCtrlArr, 0xFF0000, $LinkVisitedColor[1]) ControlHover($About_GUI, $LinkLabel[2], 2, $CurIsOnCtrlArr, 0xFF0000, $LinkVisitedColor[2]) ControlHover($About_GUI, $LinkLabel[3], 3, $CurIsOnCtrlArr, 0xFF0000, $LinkVisitedColor[3]) WEnd WinSetState($Parent, "", @SW_ENABLE) GUIDelete($About_GUI) GUISwitch($Parent) Opt("GUIOnEventMode", $OldEventOpt) ; Opt("RunErrorsFatal", $OldRunErrOpt) EndFunc ;==>_AboutGUI