Windows taskbar height/width

mastaH :

I can't figure out how to get the windows taskbar height dynamicaly to set my application fullscreen.
As you know, taskbar can be in four positions: bottom, top, left or right, so I'm wondering if it's possible to also know the current position to set the window bounds.

EDIT: Using Lukas link I tryied this:

GraphicsDevice myDevice;
Window myWindow;

try {
    myDevice.setFullScreenWindow(myWindow);
    ...
} finally {
    myDevice.setFullScreenWindow(null);
}

But I'm gettin a NullPointerException

Hunter McMillen :

When you create your JFrame. Make a call to the setExtendedState() method in the JFrame API

jFrame = new JFrame("TESTER");
jFrame.setExtendedState(JFrame.MAXIMIZED_BOTH);

The MAXIMIZED_BOTH setting will set your window to fullscreen and automatically take into account the position of the Taskbar.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Windows 10 Taskbar Issue with Open Windows Mapping to Wrong Taskbar

分類Dev

AutoIt code to enable and disable windows taskbar

分類Dev

Find properties of taskbar item in Windows 7?

分類Dev

Change behavior of windows taskbar when switching programs

分類Dev

Windows 10 virtual desktops - preserve taskbar order

分類Dev

Hide programs (such as Skype) from Windows 7 taskbar

分類Dev

How to make taskbar more transparent in Windows 10

分類Dev

Windows 10 Taskbar preview stopped working

分類Dev

How to create toolbar tool on taskbar in windows 10 using c#

分類Dev

Windows 7 taskbar groups to use vertical menus only, not thumbnails?

分類Dev

How can I pin Eclipse Luna to the Windows-7 taskbar?

分類Dev

How can I hide the clock from Windows 10 taskbar

分類Dev

How do I get the icons back on the taskbar in windows 8.1?

分類Dev

Can't right-click Taskbar Icons on Windows 10

分類Dev

Windows Server 2012 R2 Standard broken taskbar

分類Dev

Remove Microsoft Edge and Store taskbar shortcuts for all new users - Windows 10

分類Dev

How to hide or remove (not disable) the Show Desktop button at the end of the taskbar in Windows 10?

分類Dev

How do you change the hover text on a pinned taskbar item in Windows 10?

分類Dev

RadWindow icon not shown in taskbar

分類Dev

WxPython Phoenix TaskBar Icon

分類Dev

Launching taskbar apps with AutoHotKey

分類Dev

VBA - Get Taskbar Applications

分類Dev

Ungroup items in taskbar

分類Dev

Animation on screen without a taskbar item

分類Dev

How to disable Winamp agent in the taskbar?

分類Dev

Restarting explorer does not restore taskbar

分類Dev

Group window tabs on taskbar/panel

分類Dev

C# Showing Buttons on taskbar thumbnails

分類Dev

How to NOT hide taskbar item during using hide()

Related 関連記事

  1. 1

    Windows 10 Taskbar Issue with Open Windows Mapping to Wrong Taskbar

  2. 2

    AutoIt code to enable and disable windows taskbar

  3. 3

    Find properties of taskbar item in Windows 7?

  4. 4

    Change behavior of windows taskbar when switching programs

  5. 5

    Windows 10 virtual desktops - preserve taskbar order

  6. 6

    Hide programs (such as Skype) from Windows 7 taskbar

  7. 7

    How to make taskbar more transparent in Windows 10

  8. 8

    Windows 10 Taskbar preview stopped working

  9. 9

    How to create toolbar tool on taskbar in windows 10 using c#

  10. 10

    Windows 7 taskbar groups to use vertical menus only, not thumbnails?

  11. 11

    How can I pin Eclipse Luna to the Windows-7 taskbar?

  12. 12

    How can I hide the clock from Windows 10 taskbar

  13. 13

    How do I get the icons back on the taskbar in windows 8.1?

  14. 14

    Can't right-click Taskbar Icons on Windows 10

  15. 15

    Windows Server 2012 R2 Standard broken taskbar

  16. 16

    Remove Microsoft Edge and Store taskbar shortcuts for all new users - Windows 10

  17. 17

    How to hide or remove (not disable) the Show Desktop button at the end of the taskbar in Windows 10?

  18. 18

    How do you change the hover text on a pinned taskbar item in Windows 10?

  19. 19

    RadWindow icon not shown in taskbar

  20. 20

    WxPython Phoenix TaskBar Icon

  21. 21

    Launching taskbar apps with AutoHotKey

  22. 22

    VBA - Get Taskbar Applications

  23. 23

    Ungroup items in taskbar

  24. 24

    Animation on screen without a taskbar item

  25. 25

    How to disable Winamp agent in the taskbar?

  26. 26

    Restarting explorer does not restore taskbar

  27. 27

    Group window tabs on taskbar/panel

  28. 28

    C# Showing Buttons on taskbar thumbnails

  29. 29

    How to NOT hide taskbar item during using hide()

ホットタグ

アーカイブ