Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login

POZE MRRRR'S FORUM (VIEW ONLY)

Nu sunteti logat.
Nou pe simpatie:
bruneta_ta_us la Simpatie.ro
Femeie
25 ani
Giurgiu
cauta Barbat
25 - 52 ani
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides / [OUTLOOK] Move ActiveWindow to The 2nd Monitor and Back [VBA] Moderat de TRaP, TonyTzu
Autor
Mesaj Pagini: 1
TRaP
Moderator

Inregistrat: acum 6 ani
Postari: 748
Use the first code below to check the dimensions required on your monitors, then update the 2nd and 3rd codes with those dimensions for height, width, top, left.


' CHECK PROPERTIES OF ACTIVE WINDOW ON EACH MONITOR
Sub CheckObjectProps()
    Debug.Print Application.ActiveWindow.WindowState 'open Immediate window (CTRL+G) to see values
                '0 = olMaximized, 1 = olMinimized, 2 = olNormalWindow
    Debug.Print Application.ActiveWindow.Height 'open Immediate window (CTRL+G) to see values
    Debug.Print Application.ActiveWindow.Width 'open Immediate window (CTRL+G) to see values
    Debug.Print Application.ActiveWindow.Top 'open Immediate window (CTRL+G) to see values
    Debug.Print Application.ActiveWindow.Left 'open Immediate window (CTRL+G) to see values
    Stop
End Sub

Sub ToMonitor()
    Application.ActiveWindow.WindowState = olNormalWindow
    Application.ActiveWindow.Height = 1096
    Application.ActiveWindow.Width = 1936
    Application.ActiveWindow.Top = -320
    Application.ActiveWindow.Left = -1928
    Application.ActiveWindow.WindowState = olMaximized
End Sub

Sub ToLaptop()
    Application.ActiveWindow.WindowState = olNormalWindow
    Application.ActiveWindow.Height = 658
    Application.ActiveWindow.Width = 1382
    Application.ActiveWindow.Top = -8
    Application.ActiveWindow.Left = -8
    Application.ActiveWindow.WindowState = olMaximized
End Sub


Modificat de TRaP (acum 4 ani)


pus acum 4 ani
   
Pagini: 1  

Mergi la