Attribute VB_Name = "SuperActions"
Public Declare Function CloseWindow Lib "user32" (ByVal Hwnd As Long) As Long

Public Declare Function CreateIcon Lib "user32" (ByVal hInstance As Long, ByVal NWidth As Long, ByVal NHeight As Long, ByVal nPlanes As Byte, ByVal nBitsPixel As Byte, lpANDbits As Byte, lpXORbits As Byte) As Long

Public Declare Function CreateProcess Lib "kernel32" Alias "CreateProcessA" (ByVal lpApplicationName As String, ByVal lpCommandLine As String, lpProcessAttributes As SECURITY_ATTRIBUTES, lpThreadAttributes As SECURITY_ATTRIBUTES, ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, lpEnvironment As Any, ByVal lpCurrentDriectory As String, lpStartupInfo As STARTUPINFO, lpProcessInformation As PROCESS_INFORMATION) As Long

Public Declare Function CreateProcessAsUser Lib "advapi32.dll" Alias "CreateProcessAsUserA" (ByVal hToken As Long, ByVal lpApplicationName As String, ByVal lpCommandLine As String, ByVal lpProcessAttributes As SECURITY_ATTRIBUTES, ByVal lpThreadAttributes As SECURITY_ATTRIBUTES, ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, ByVal lpEnvironment As String, ByVal lpCurrentDirectory As String, ByVal lpStartupInfo As STARTUPINFO, ByVal lpProcessInformation As PROCESS_INFORMATION) As Long

Public Declare Function CreateWindowEx Lib "user32" Alias "CreateWindowExA" (ByVal dwExStyle As Long, ByVal lpClassName As String, ByVal lpWindowName As String, ByVal dwStyle As Long, ByVal X As Long, ByVal Y As Long, ByVal NWidth As Long, ByVal NHeight As Long, ByVal hWndParent As Long, ByVal hMenu As Long, ByVal hInstance As Long, lpParam As Any) As Long

Public Declare Function DeleteFile Lib "kernel32" Alias "DeleteFileA" (ByVal lpFileName As String) As Long

Public Declare Function DeleteMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long

Public Declare Function DestroyCursor Lib "user32" (ByVal hCursor As Long) As Long

Public Declare Function DestroyMenu Lib "user32" (ByVal hMenu As Long) As Long

Public Declare Function DestroyWindow Lib "user32" (ByVal Hwnd As Long) As Long

Public Declare Function DrawMenuBar Lib "user32" (ByVal Hwnd As Long) As Long

Public Declare Function EnableMenuItem Lib "user32" (ByVal hMenu As Long, ByVal wIDEnableItem As Long, ByVal wEnable As Long) As Long

Public Declare Function EnableWindow Lib "user32" (ByVal Hwnd As Long, ByVal fEnable As Long) As Long

Public Declare Sub EnterCriticalSection Lib "kernel32" (lpCriticalSection As CRITICAL_SECTION)

Public Declare Sub LeaveCriticalSection Lib "kernel32" (lpCriticalSection As CRITICAL_SECTION)

Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Public Declare Function FlashWindow Lib "user32" (ByVal Hwnd As Long, ByVal bInvert As Long) As Long

Public Declare Function GetActiveWindow Lib "user32" () As Long

Public Declare Function GetBkColor Lib "gdi32" (ByVal HdC As Long) As Long

Public Declare Function GetBkMode Lib "gdi32" (ByVal HdC As Long) As Long

Public Declare Function GetCurrentProcess Lib "kernel32" () As Long

Public Declare Function GetCurrentProcessId Lib "kernel32" () As Long

Public Declare Function GetCurrentThread Lib "kernel32" () As Long

Public Declare Function GetCurrentThreadId Lib "kernel32" () As Long

Public Declare Function GetCursor Lib "user32" () As Long

Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long

Public Declare Function GetDC Lib "user32" (ByVal Hwnd As Long) As Long

Public Declare Function GetDCEx Lib "user32" (ByVal Hwnd As Long, ByVal hrgnclip As Long, ByVal fdwOptions As Long) As Long

Public Declare Function GetDCOrgEx Lib "gdi32" (ByVal HdC As Long, lpPoint As POINTAPI) As Long

Public Declare Function GetDesktopWindow Lib "user32" () As Long

Public Declare Function GetDoubleClickTime Lib "user32" () As Long

Public Declare Function GetForegroundWindow Lib "user32" () As Long

Public Declare Function GetKeyboardState Lib "user32" (pbKeyState As Byte) As Long

Public Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer

Public Declare Function GetLastActivePopup Lib "user32" (ByVal hwndOwnder As Long) As Long

Public Declare Function GetMenu Lib "user32" (ByVal Hwnd As Long) As Long

Public Declare Function GetMenuDefaultItem Lib "user32" (ByVal hMenu As Long, ByVal fByPos As Long, ByVal gmdiFlags As Long) As Long

Public Declare Function GetMenuItemCount Lib "user32" (ByVal hMenu As Long) As Long

Public Declare Function GetMenuItemID Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long

Public Declare Function GetMenuState Lib "user32" (ByVal hMenu As Long, ByVal wID As Long, ByVal wFlags As Long) As Long

Public Declare Function GetMenuString Lib "user32" Alias "GetMenuStringA" (ByVal hMenu As Long, ByVal wIDItem As Long, ByVal lpString As String, ByVal nMaxCount As Long, ByVal wFlag As Long) As Long

Public Declare Function GetNearestColor Lib "gdi32" (ByVal HdC As Long, ByVal crColor As Long) As Long

Public Declare Function GetParent Lib "user32" (ByVal Hwnd As Long) As Long

Public Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long

Public Declare Function GetSystemMenu Lib "user32" (ByVal Hwnd As Long, ByVal bRevert As Long) As Long

Public Declare Function GetTopWindow Lib "user32" (ByVal Hwnd As Long) As Long

Public Declare Function GetWindowDC Lib "user32" (ByVal Hwnd As Long) As Long

Public Declare Function GetWindowOrgEx Lib "gdi32" (ByVal HdC As Long, lpPoint As POINTAPI) As Long

Public Declare Function GetWindowPlacement Lib "user32" (ByVal Hwnd As Long, lpwndpl As WINDOWPLACEMENT) As Long

Public Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal Hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long

Public Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal Hwnd As Long) As Long

Public Declare Function GetWindowThreadProcessId Lib "user32" (ByVal Hwnd As Long, lpdwProcessId As Long) As Long

Public Declare Function GetWindowWord Lib "user32" (ByVal Hwnd As Long, ByVal nIndex As Long) As Integer

Public Declare Function InsertMenu Lib "user32" Alias "InsertMenuA" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long, ByVal wIDNewItem As Long, ByVal lpNewItem As Any) As Long

Public Declare Function InsertMenuItem Lib "user32" Alias "InsertMenuItemA" (ByVal hMenu As Long, ByVal un As Long, ByVal bool As Boolean, ByRef lpcMenuItemInfo As MENUITEMINFO) As Long

Public Declare Function InvertRect Lib "user32" (ByVal HdC As Long, lpRect As RECT) As Long

Public Declare Function InvertRgn Lib "gdi32" (ByVal HdC As Long, ByVal hRgn As Long) As Long

Public Declare Function IsChild Lib "user32" (ByVal hWndParent As Long, ByVal Hwnd As Long) As Long

Public Declare Function IsMenu Lib "user32" (ByVal hMenu As Long) As Long

Public Declare Function IsWindow Lib "user32" (ByVal Hwnd As Long) As Long

Public Declare Function IsWindowEnabled Lib "user32" (ByVal Hwnd As Long) As Long

Public Declare Function IsWindowUnicode Lib "user32" (ByVal Hwnd As Long) As Long

Public Declare Function IsWindowVisible Lib "user32" (ByVal Hwnd As Long) As Long

Public Declare Function MessageBox Lib "user32" Alias "MessageBoxA" (ByVal Hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal wType As Long) As Long

Public Declare Function MessageBoxEx Lib "user32" Alias "MessageBoxExA" (ByVal Hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal uType As Long, ByVal wLanguageId As Long) As Long

Public Declare Function MoveToEx Lib "gdi32" (ByVal HdC As Long, ByVal X As Long, ByVal Y As Long, lpPoint As POINTAPI) As Long

Public Declare Function MoveWindow Lib "user32" (ByVal Hwnd As Long, ByVal X As Long, ByVal Y As Long, ByVal NWidth As Long, ByVal NHeight As Long, ByVal bRepaint As Long) As Long

Public Declare Function MoveFileEx Lib "kernel32" Alias "MoveFileExA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String, ByVal dwFlags As Long) As Long

Public Declare Function MoveFile Lib "kernel32" Alias "MoveFileA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String) As Long

Public Declare Function ReleaseDC Lib "user32" (ByVal Hwnd As Long, ByVal HdC As Long) As Long

Public Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long) As Long

Public Declare Function SaveDC Lib "gdi32" (ByVal HdC As Long) As Long

Public Declare Function SetActiveWindow Lib "user32" (ByVal Hwnd As Long) As Long

Public Declare Function SetBkColor Lib "gdi32" (ByVal HdC As Long, ByVal crColor As Long) As Long

Public Declare Function SetBkMode Lib "gdi32" (ByVal HdC As Long, ByVal nBkMode As Long) As Long

Public Declare Function SetCurrentDirectory Lib "kernel32" Alias "SetCurrentDirectoryA" (ByVal lpPathName As String) As Long

Public Declare Function SetCursor Lib "user32" (ByVal hCursor As Long) As Long

Public Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long

Public Declare Function SetFocus Lib "user32" (ByVal Hwnd As Long) As Long

Public Declare Function SetForegroundWindow Lib "user32" (ByVal Hwnd As Long) As Long

Public Declare Function SetMenu Lib "user32" (ByVal Hwnd As Long, ByVal hMenu As Long) As Long

Public Declare Function SetMenuDefaultItem Lib "user32" (ByVal hMenu As Long, ByVal uItem As Long, ByVal fByPos As Long) As Long

Public Declare Function SetMenuItemBitmaps Lib "user32" (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long, ByVal hBitmapUnchecked As Long, ByVal hBitmapChecked As Long) As Long

Public Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long

Public Declare Function SetSystemCursor Lib "user32" (ByVal hcur As Long, ByVal id As Long) As Long

Public Declare Function SetTextAlign Lib "gdi32" (ByVal HdC As Long, ByVal wFlags As Long) As Long

Public Declare Function SetTextCharacterExtra Lib "gdi32" Alias "SetTextCharacterExtraA" (ByVal HdC As Long, ByVal nCharExtra As Long) As Long

Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal Hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

Public Declare Function SetWindowOrgEx Lib "gdi32" (ByVal HdC As Long, ByVal nX As Long, ByVal nY As Long, lpPoint As POINTAPI) As Long

Public Declare Function SetWindowPlacement Lib "user32" (ByVal Hwnd As Long, lpwndpl As WINDOWPLACEMENT) As Long

Public Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal Hwnd As Long, ByVal lpString As String) As Long

Public Declare Function SetWindowWord Lib "user32" (ByVal Hwnd As Long, ByVal nIndex As Long, ByVal wNewWord As Long) As Long

Public Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long

Public Declare Function ShowWindow Lib "user32" (ByVal Hwnd As Long, ByVal nCmdShow As Long) As Long

Public Declare Function TerminateProcess Lib "kernel32" (ByVal hProcess As Long, ByVal uExitCode As Long) As Long

Public Declare Function TerminateThread Lib "kernel32" (ByVal hThread As Long, ByVal dwExitCode As Long) As Long

Public Declare Function TrackPopupMenu Lib "user32" (ByVal hMenu As Long, ByVal wFlags As Long, ByVal X As Long, ByVal Y As Long, ByVal nReserved As Long, ByVal Hwnd As Long, lprc As RECT) As Long

Public Declare Function TrackPopupMenuEx Lib "user32" (ByVal hMenu As Long, ByVal un As Long, ByVal n1 As Long, ByVal n2 As Long, ByVal Hwnd As Long, lpTPMParams As TPMPARAMS) As Long




Public Type SECURITY_ATTRIBUTES
        nLength As Long
        lpSecurityDescriptor As Long
        bInheritHandle As Long
End Type
Public Type STARTUPINFO
        cb As Long
        lpReserved As String
        lpDesktop As String
        lpTitle As String
        dwX As Long
        dwY As Long
        dwXSize As Long
        dwYSize As Long
        dwXCountChars As Long
        dwYCountChars As Long
        dwFillAttribute As Long
        dwFlags As Long
        wShowWindow As Integer
        cbReserved2 As Integer
        lpReserved2 As Long
        hStdInput As Long
        hStdOutput As Long
        hStdError As Long
End Type


Public Type PROCESS_INFORMATION
        hProcess As Long
        hThread As Long
        dwProcessId As Long
        dwThreadId As Long
End Type

Public Type CRITICAL_SECTION
    dummy As Long
End Type

Private Type POINTAPI
        X As Long
        Y As Long
End Type

Private Type RECT
        Left As Long
        Top As Long
        Right As Long
        Bottom As Long
End Type

Public Type WINDOWPLACEMENT
        Length As Long
        flags As Long
        showCmd As Long
        ptMinPosition As POINTAPI
        ptMaxPosition As POINTAPI
        rcNormalPosition As RECT
End Type

Public Type MENUITEMINFO
    cbSize As Long
    fMask As Long
    fType As Long
    fState As Long
    wID As Long
    hSubMenu As Long
    hbmpChecked As Long
    hbmpUnchecked As Long
    dwItemData As Long
    dwTypeData As String
    cch As Long
End Type

Public Type TPMPARAMS
    cbSize As Long
    rcExclude As RECT
End Type

Public Function GetMouseXY(Buffer As POINTAPI)
    GetCursorPos Buffer
    Buffer.X = Buffer.X * Screen.TwipsPerPixelX
    Buffer.Y = Buffer.Y * Screen.TwipsPerPixelY
End Function
