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:
ubytzika_senzuala Profile
Femeie
22 ani
Vrancea
cauta Barbat
22 - 45 ani
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides / [EXCEL] 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
Source:



' CHECK PROPERTIES OF ACTIVE WINDOW ON EACH MONITOR
Sub CheckObjectProps()
Dim winActive As Window
Set winActive = ActiveWindow
    Debug.Print winActive.WindowState 'open Immediate window (CTRL+G) to see values
                '1 = wdWindowStateMaximize, 0 = wdWindowStateNormal, 2 = wdWindowStateMinimize
    Debug.Print winActive.Height 'open Immediate window (CTRL+G) to see values
    Debug.Print winActive.Width 'open Immediate window (CTRL+G) to see values
    Debug.Print winActive.Top 'open Immediate window (CTRL+G) to see values
    Debug.Print winActive.Left 'open Immediate window (CTRL+G) to see values
    Stop ' open Locals window to inspect more properties of winActive
Set winActive = Nothing
End Sub

Sub ToMonitor()
Dim winActive As Window
Set winActive = ActiveWindow
Application.ScreenUpdating = False

With winActive
    .WindowState = xlNormal
    .Height = 816 'laptop = 507
    .Width = 1446 'laptop = 1030,5
    .Top = -236 'laptop = -2
    .Left = -1442 'laptop = -2
    .WindowState = xlMaximized
End With
Application.ScreenUpdating = True
End Sub

Sub ToLaptop()
Dim winActive As Window
Set winActive = ActiveWindow
Application.ScreenUpdating = False

With winActive
    .WindowState = xlNormal
    .Height = 507 'monitor = 816
    .Width = 1030.5 'monitor = 1446
    .Top = -2 'monitor = -236
    .Left = -2 'monitor = -1442
    .WindowState = xlMaximized
End With

Application.ScreenUpdating = True
End Sub


pus acum 5 ani
   
Pagini: 1  

Mergi la