[AutoIt] Hộp thoại thông báo với hiệu ứng trượt - Lê Văn Hiếu

Mọi Bài Đăng Đều Được Viết Bởi Admin Nguyễn Tỉnh, Vui Lòng Ghi Nguồn Khi Copy Bài Đăng Từ Trang Này!



Chia sẻ mã nguồn AutoIt tham khảo - tạo hộp thoại thông báo với hiệu ứng trượt (từ dưới lên). Đây là hiệu ứng hiển thị thông báo thường gặp trong các trình diệt virus. Hiệu ứng này được tạo ra bằng cách kết hợp vòng lặp, tọa độ và hàm WinMove. Xem demo và tải mã nguồn tham khảo ở dưới nhé!
#region
#AutoIt3Wrapper_UseUpx=Y
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Icon=E:\wamp\www\favicon.ico
#AutoIt3Wrapper_Res_Comment=Coded by Juno_okyo
#AutoIt3Wrapper_Res_Description=Coded by Juno_okyo
#AutoIt3Wrapper_Res_Fileversion=1.0.0.0
#AutoIt3Wrapper_Res_ProductVersion=1.0.0.0
#AutoIt3Wrapper_Res_LegalCopyright=(c) 2014 by Juno_okyo's Blog
#AutoIt3Wrapper_Res_Field=ProductName|Juno_okyo's Production
#AutoIt3Wrapper_Res_Field=ProductVersion|1.0.0.0
#AutoIt3Wrapper_Res_Field=CompanyName|J2TeaM
#endregion
; Includes
#include <Misc.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
; Only One Instance
_Singleton(@ScriptName)
; Options
#NoTrayIcon
Opt('WinTitleMatchMode', 2)
Opt('GUIOnEventMode', 1)
Opt('GUICloseOnESC', 0)
; Script Start - Add your code below here
slideUp_Dialog('Tool Óc Chó', 'Hello, Mình Là Con Cặc!')
While 1
        Sleep(100)
WEnd
Func slideUp_Dialog($title, $message)
        Local $desktopH = @DesktopHeight, $desktopW = @DesktopWidth
        Local $width = 285, $height = 236
        Local $x = $desktopW - ($width + 12)
        #Region ### START Koda GUI section ### Form=
        Global $MainForm = GUICreate($title, $width, 165, $x, $desktopH, -1, BitOR($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE),WinGetHandle(AutoItWinGetTitle()))
        GUISetFont(12, 400, 0, "Arial")
        GUISetOnEvent($GUI_EVENT_CLOSE, "slideDown_Dialog")
        GUISetOnEvent($GUI_EVENT_MINIMIZE, "slideDown_Dialog")
        Local $Edit = GUICtrlCreateEdit($message, 0, 0, 284, 164, BitOR($GUI_SS_DEFAULT_EDIT,$ES_READONLY))
        GUICtrlSetState(-1, $GUI_FOCUS)
        GUISetState(@SW_SHOW)
        #EndRegion ### END Koda GUI section ###
        For $i = 0 To $height Step + 5
                WinMove($MainForm, '', $x, $desktopH - $i)
                Sleep(1)
        Next
EndFunc
Func slideDown_Dialog()
        For $i = 255 To 0 Step - 10
                WinSetTrans($MainForm, '', $i)
                Sleep(1)
        Next
        Exit

EndFunc
[AutoIt] Hộp thoại thông báo với hiệu ứng trượt - Lê Văn Hiếu Reviewed by Phan Quang Thái on July 15, 2017 Rating: 5
Bảng mã icon:
:)
:))
:D
=))
:(
:((
:o
^_^
^-^
/f
^.^
/g
;)
-_-
==
/r
-.-
:p
/o
/hi
/ok
/clap
(y)
(3)

THÊM NHẬN XÉT

Một số lưu ý khi bình luận

Mọi bình luận sai nội quy sẽ bị xóa mà không cần báo trước (xem nội quy)

Bấm Thông báo cho tôi bên dưới khung bình luận để nhận thông báo khi admin trả lời

Để bình luận một đoạn code, hãy mã hóa code trước nhé

Contact Form

Name

Email *

Message *

Powered by Blogger.