[Gambas-user] How to know Height and Width of screen?

abbat abbat.81 at ...787...
Fri Jan 27 11:13:20 CET 2012


This works, but it is WORKAREA.
If my resolutions is 1280 x 1024 and panel has 26 px and situated below, 
Then Desktop.Height = (1024-26)


Benoît Minisini wrote:
> 
> Le 23/01/2012 12:32, abbat a écrit :
>>
>>
>> in VB.NET I get it by this way:
>>
>> Dim yy As Integer =
>> System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height
>> Dim xx As Integer =
>> System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width
>>
>> How to do it in Gambas 3?
>>
>> Thanks
> 
> Desktop.Width / Desktop.Height or Desktop.AvailableWidth / 
> Desktop.AvailableHeight.
> 
> If you need a specific screen, you must use the Screens class.
> 
> Screens[<screen number].{Available}{X | Y | Width | Height}
> 
> So it's almost the same thing, with less characters to type. :-)
> 
> -- 
> Benoît Minisini
> 
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> 

-- 
View this message in context: http://old.nabble.com/How-to-know-Height-and-Width-of-screen--tp33187109p33213054.html
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list