It would be grateful if someone tell me how to do it!
Edited by AndreyS, 05 March 2012 - 07:22 PM.
Posted 05 March 2012 - 07:17 PM
Edited by AndreyS, 05 March 2012 - 07:22 PM.
Posted 05 March 2012 - 11:27 PM
Things I've Made: AUHistory ◊ Deck of Cards ◊ HideIt ◊ ICU◊ IconFreezer◊ IpodEjector ◊ LinkDownloader ◊ MD5 Folder Enumerator ◊ PingTool ◊ QuickNIC ◊ ReadOCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam
Misc Code Snippets: ADODB Example ◊ Detect SafeMode ◊ Local Admins ◊ MakeChoice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ System UpTime ◊ Tickle Expired Password ◊ Transpose Array
Projects: Scan Engine Builder ◊ SpeeDBurner
Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ _Service_UDF
Posted 06 March 2012 - 12:51 AM
ToolTip ("MyMessage", Default, Default, "TitleMessage", 0, 5)
Edited by AndreyS, 06 March 2012 - 12:55 AM.
Posted 06 March 2012 - 05:38 PM
$mousepos = MouseGetPos() $pos = _CenterScreen($mousepos[0],$mousepos[1]) MouseMove($pos[0],$pos[1]) Func _CenterScreen($xTest=0, $yTest=0) Local $center[2] $displays = _DisplayKeySettings(_NumberAndNameMonitors()) $int = $displays[0][0] Do If $displays[$int][4] Then If $xTest >= $displays[$int][2] And Not $center[0] Then $center[0] = $int EndIf $int -= 1 Until $int<0 $int = $displays[0][0] Do If $displays[$int][4] Then if $yTest >= $displays[$int][3] And Not $center[1] Then $center[1] = $int EndIf $int -= 1 Until $int<0 $center[0] = Round($displays[$center[0]][2]+$displays[$center[0]][4]/2) $center[1] = Round($displays[$center[1]][3]+$displays[$center[1]][5]/2) Return $center EndFunc ;============================================================================================== _NumberAndNameMonitors ; Function Name: _NumberAndNameMonitors () ; Description: Provides the first key elements of a multimonitor system, included the Regedit Keys ; Parameter(s): None ; Return Value(s): $NumberAndName [][] ;~ [0][0] total number of video devices ;; [x][1] name of the device ;; [x][2] name of the adapter ;; [x][3] monitor flags (value is returned in Hex str -convert in DEC before use with Bitand) ;; [x][4] registry key of the device ; Remarks: the flag value [x][3] can be one of the following ;; DISPLAY_DEVICE_ATTACHED_TO_DESKTOP 0x00000001 ;; DISPLAY_DEVICE_MULTI_DRIVER 0x00000002 ;; DISPLAY_DEVICE_PRIMARY_DEVICE 0x00000004 ;; DISPLAY_DEVICE_VGA 0x00000010 ;; DISPLAY_MIRROR_DEVICE 0X00000008 ;; DISPLAY_REMOVABLE 0X00000020 ; ; Author(s): Hermano ;=========================================================================================================================== Func _NumberAndNameMonitors() Local $dev = -1, $id = 0, $msg_ = "", $EnumDisplays, $StateFlag Dim $NumberAndName[2][6] Local $DISPLAY_DEVICE = DllStructCreate("int;char[32];char[128];int;char[128];char[128]") DllStructSetData($DISPLAY_DEVICE, 1, DllStructGetSize($DISPLAY_DEVICE)) Dim $dll = "user32.dll" Do $dev += 1 $EnumDisplays = DllCall($dll, "int", "EnumDisplayDevices", "ptr", 0, "int", $dev, "ptr", DllStructGetPtr($DISPLAY_DEVICE), "int", 1) If $EnumDisplays[0] <> 0 Then ReDim $NumberAndName[$dev + 2][6] $NumberAndName[$dev + 1][1] = DllStructGetData($DISPLAY_DEVICE, 2) ;device Name $NumberAndName[$dev + 1][2] = DllStructGetData($DISPLAY_DEVICE, 3) ;device or display description $NumberAndName[$dev + 1][3] = Hex(DllStructGetData($DISPLAY_DEVICE, 4)) ;all flags (value in HEX) $NumberAndName[$dev + 1][4] = DllStructGetData($DISPLAY_DEVICE, 6) ;registry key of the device $NumberAndName[$dev + 1][5] = DllStructGetData($DISPLAY_DEVICE, 5) ;hardware interface name EndIf Until $EnumDisplays[0] = 0 $NumberAndName[0][0] += $dev Return $NumberAndName EndFunc ;==>_NumberAndNameMonitors ;============================================================================================== _DisplayKeySettings ; Function Name: _DisplayKeySettings($MonName,$Opt = -1) ; Description: all key information about each adapter needed to properly change the display setting ; Parameter(s): $MonName = return array from _NumberAndNameMonitors ;; $Opt = -1 $ENUM_CURRENT_SETTINGS [default] ;; = -2 $ENUM_REGISTRY_SETTINGS ; Return Value(s): $KeySettings[][] ;; $KeySettings[0][0] = Number of non virtual devices ;; $KeySettings[x][0] = Flags ;; $KeySettings[x][1] = Monitor Name ;; $KeySettings[x][2] = up left desktop position X ;; $KeySettings[x][3] = up left desktop position Y ;; $KeySettings[x][4] = Width (resolution) ;; $KeySettings[x][5] = Heigth (resolution) ;; $KeySettings[x][6] = Bpp color (resolution) ;; $KeySettings[x][7] = Screen Refresh(resolution) ;; $KeySettings[x][8] = Display Orientation ;; $KeySettings[x][9] = Display Fixed Output ; Remarks: ; ; Author(s): Hermano ;=========================================================================================================================== Func _DisplayKeySettings($MonName, $Opt = -1) Local Const $DISPLAY_DEVICE_MIRRORING_DRIVER = 0x00000008 Dim $KeySettings[1][10], $i, $Dn = 0, $res If Not IsArray($MonName) Then $MonName = _NumberAndNameMonitors() Local $DEVMODE = DllStructCreate("char[32];short[4];int[5];short[5];byte[32];short;int[6]") DllStructSetData($DEVMODE, 2, DllStructGetSize($DEVMODE), 3) For $i = 1 To $MonName[0][0] If ($MonName[$i][3] <> $DISPLAY_DEVICE_MIRRORING_DRIVER) Then $Dn += 1 $res = DllCall("user32.dll", "int", "EnumDisplaySettings", "str", $MonName[$i][1], "int", $Opt, "ptr", DllStructGetPtr($DEVMODE)) If $res[0] = 0 Then _ $res = DllCall("user32.dll", "int", "EnumDisplaySettings", "str", $MonName[$i][1], "int", Mod($Opt, 2) - 1, "ptr", DllStructGetPtr($DEVMODE)) ReDim $KeySettings[1 + $Dn][10] $KeySettings[$Dn][0] = $MonName[$i][3] ;flags $KeySettings[$Dn][1] = $MonName[$i][1] ;name $KeySettings[$Dn][2] = DllStructGetData($DEVMODE, 3, 2) ;up left desktop position coord X $KeySettings[$Dn][3] = DllStructGetData($DEVMODE, 3, 3) ;up left desktop position coord Y $KeySettings[$Dn][4] = DllStructGetData($DEVMODE, 7, 2) ;Width (resolution) $KeySettings[$Dn][5] = DllStructGetData($DEVMODE, 7, 3) ;Heigth (resolution) $KeySettings[$Dn][6] = DllStructGetData($DEVMODE, 7, 1) ;Bpp color (resolution) $KeySettings[$Dn][7] = DllStructGetData($DEVMODE, 7, 5) ;Screen Refresh(resolution) $KeySettings[$Dn][8] = DllStructGetData($DEVMODE, 3, 4) ;Display Orientation $KeySettings[$Dn][9] = DllStructGetData($DEVMODE, 3, 5) ;fixed output EndIf Next $KeySettings[0][0] = $Dn Return $KeySettings EndFunc
Edited by spudw2k, 06 March 2012 - 06:02 PM.
Things I've Made: AUHistory ◊ Deck of Cards ◊ HideIt ◊ ICU◊ IconFreezer◊ IpodEjector ◊ LinkDownloader ◊ MD5 Folder Enumerator ◊ PingTool ◊ QuickNIC ◊ ReadOCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam
Misc Code Snippets: ADODB Example ◊ Detect SafeMode ◊ Local Admins ◊ MakeChoice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ System UpTime ◊ Tickle Expired Password ◊ Transpose Array
Projects: Scan Engine Builder ◊ SpeeDBurner
Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ _Service_UDF
Posted 06 March 2012 - 10:35 PM
Posted 06 March 2012 - 10:58 PM
This sentence seems contradictory.I need to make sure that the program window, or some control was seen only on the first monitor, but on the second monitor was not visible!
Edited by spudw2k, 06 March 2012 - 10:59 PM.
Things I've Made: AUHistory ◊ Deck of Cards ◊ HideIt ◊ ICU◊ IconFreezer◊ IpodEjector ◊ LinkDownloader ◊ MD5 Folder Enumerator ◊ PingTool ◊ QuickNIC ◊ ReadOCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam
Misc Code Snippets: ADODB Example ◊ Detect SafeMode ◊ Local Admins ◊ MakeChoice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ System UpTime ◊ Tickle Expired Password ◊ Transpose Array
Projects: Scan Engine Builder ◊ SpeeDBurner
Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ _Service_UDF
Posted 07 March 2012 - 12:19 AM
0 members, 0 guests, 0 anonymous users