Skip to main content
Commonmark migration
Source Link

#PHP + GTK 2.0, 69 bytes

PHP + GTK 2.0, 69 bytes

This whole answer was written based on http://php-gtk.eu/en/code-hints/grabbing-a-screenshot-with-gdk

<?list($W,$H)=Gdk::get_default_root_window()->get_size();echo$W,x,$H;

Basically, fetches the "root" window (entire screen) and gets it's size.


Another way (based on http://www.kksou.com/php-gtk2/sample-codes/get-the-size-of-display-screen.php):

<?$w=(new GtkWindow())->get_screen();echo$w->get_width(),x,$w->get_height();

Gets the screen where the window was created, displaying it's dimentions.

#PHP + GTK 2.0, 69 bytes

This whole answer was written based on http://php-gtk.eu/en/code-hints/grabbing-a-screenshot-with-gdk

<?list($W,$H)=Gdk::get_default_root_window()->get_size();echo$W,x,$H;

Basically, fetches the "root" window (entire screen) and gets it's size.


Another way (based on http://www.kksou.com/php-gtk2/sample-codes/get-the-size-of-display-screen.php):

<?$w=(new GtkWindow())->get_screen();echo$w->get_width(),x,$w->get_height();

Gets the screen where the window was created, displaying it's dimentions.

PHP + GTK 2.0, 69 bytes

This whole answer was written based on http://php-gtk.eu/en/code-hints/grabbing-a-screenshot-with-gdk

<?list($W,$H)=Gdk::get_default_root_window()->get_size();echo$W,x,$H;

Basically, fetches the "root" window (entire screen) and gets it's size.


Another way (based on http://www.kksou.com/php-gtk2/sample-codes/get-the-size-of-display-screen.php):

<?$w=(new GtkWindow())->get_screen();echo$w->get_width(),x,$w->get_height();

Gets the screen where the window was created, displaying it's dimentions.

Source Link
Ismael Miguel
  • 7.9k
  • 2
  • 25
  • 38

#PHP + GTK 2.0, 69 bytes

This whole answer was written based on http://php-gtk.eu/en/code-hints/grabbing-a-screenshot-with-gdk

<?list($W,$H)=Gdk::get_default_root_window()->get_size();echo$W,x,$H;

Basically, fetches the "root" window (entire screen) and gets it's size.


Another way (based on http://www.kksou.com/php-gtk2/sample-codes/get-the-size-of-display-screen.php):

<?$w=(new GtkWindow())->get_screen();echo$w->get_width(),x,$w->get_height();

Gets the screen where the window was created, displaying it's dimentions.