Screen sizes
-
Experts, I have an application which takes up the whole screen (15 inches) is there any way that if i take the app on to say a smaller screen can i get the program to find out the size and basically zoom out so the application fits nicely onto the screen? (Ihaven't yet tested the app on another screen yet but am guessing that it won't fit) Thus the same with a 17+ screen i would want the app to zoom in slightly. Can this be done or is there any surgestions? Many thanks Dan
-
Experts, I have an application which takes up the whole screen (15 inches) is there any way that if i take the app on to say a smaller screen can i get the program to find out the size and basically zoom out so the application fits nicely onto the screen? (Ihaven't yet tested the app on another screen yet but am guessing that it won't fit) Thus the same with a 17+ screen i would want the app to zoom in slightly. Can this be done or is there any surgestions? Many thanks Dan
It is nothing to do with screen size in inches. It has all to do with the resolution e.g. 1024x768, 1280x1024, 2560x1600 etc.etc. In vb.net, you can obtain the current screen resolution from the
My.Computer.Screen
, it has various things under this depending on what exactly you want to know about the display properties. Also, if you using Anchoring and Docking of your controls in your form, when you resize the form, they will stay relative to each other in terms of size and positioning.Dave Don't forget to rate messages!
Find Me On: Web|Facebook|Twitter|LinkedIn
Waving? dave.m.auld[at]googlewave.commodified on Sunday, March 21, 2010 9:34 AM
-
It is nothing to do with screen size in inches. It has all to do with the resolution e.g. 1024x768, 1280x1024, 2560x1600 etc.etc. In vb.net, you can obtain the current screen resolution from the
My.Computer.Screen
, it has various things under this depending on what exactly you want to know about the display properties. Also, if you using Anchoring and Docking of your controls in your form, when you resize the form, they will stay relative to each other in terms of size and positioning.Dave Don't forget to rate messages!
Find Me On: Web|Facebook|Twitter|LinkedIn
Waving? dave.m.auld[at]googlewave.commodified on Sunday, March 21, 2010 9:34 AM
Is there any way that i can get the current screen size and alter it automatically, e.g the screen size i am currently working on is 1280 by 800 pixels. If for example someone uses this program has a reolution of 1024 by 768 pixels can i alter the screen size for my program and whe they exit the program the pixels are returned to what they were at the start?? How would i go about doing this?
-
Is there any way that i can get the current screen size and alter it automatically, e.g the screen size i am currently working on is 1280 by 800 pixels. If for example someone uses this program has a reolution of 1024 by 768 pixels can i alter the screen size for my program and whe they exit the program the pixels are returned to what they were at the start?? How would i go about doing this?
Try this...
Public Function ScreenResolution() As String
Dim iWidth as integer, iHeight as Integer
iWidth = Screen.Width \ Screen.TwipsPerPixelX
iHeight = Screen.Height \ Screen.TwipsPerPixelY
ScreenResolution = iWidth & " X " & iHeightEnd Function
or
Public Function ScreenResolution() As String
Dim intX As Integer = Screen.PrimaryScreen.Bounds.Width
Dim intY As Integer = Screen.PrimaryScreen.Bounds.Height
Return intX & " X " & intY
End Function------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
-
Is there any way that i can get the current screen size and alter it automatically, e.g the screen size i am currently working on is 1280 by 800 pixels. If for example someone uses this program has a reolution of 1024 by 768 pixels can i alter the screen size for my program and whe they exit the program the pixels are returned to what they were at the start?? How would i go about doing this?
Did you make a response and then edit it completely? My email notifications tell me so! Do not think about changing the users resolution to fit your application, that is bad practice, and you would soon alienate your user base. a) The users hardware may be restricted to a given resolution, e.g. on a laptop/netbook etc. b) The user may have disabilities that require them to use a particular resolution. So, don't think about it. Design you application at a 'general' resolution, and as i say use docking/anchoring to keep the layout proportional regardless of the true resolution.
Dave Don't forget to rate messages!
Find Me On: Web|Facebook|Twitter|LinkedIn
Waving? dave.m.auld[at]googlewave.com -
Did you make a response and then edit it completely? My email notifications tell me so! Do not think about changing the users resolution to fit your application, that is bad practice, and you would soon alienate your user base. a) The users hardware may be restricted to a given resolution, e.g. on a laptop/netbook etc. b) The user may have disabilities that require them to use a particular resolution. So, don't think about it. Design you application at a 'general' resolution, and as i say use docking/anchoring to keep the layout proportional regardless of the true resolution.
Dave Don't forget to rate messages!
Find Me On: Web|Facebook|Twitter|LinkedIn
Waving? dave.m.auld[at]googlewave.comdaveauld wrote:
Did you make a response and then edit it completely?
Yes i think i did by accident. I was looking at this and posted a message through my phone. I then checked it out when i got home on my computer. I am now going to test the app on a bigger screen that i managed to borrow and think that what you said about the disabilites and hardware is a good point. I was just concerned that because my form in vb.net covers most of the 15 inch screen i didn't want it to look horrible on a 13 inch screen, thus the screen resolution option. Thanks for the suggestions and sorry for the email notification.
-
daveauld wrote:
Did you make a response and then edit it completely?
Yes i think i did by accident. I was looking at this and posted a message through my phone. I then checked it out when i got home on my computer. I am now going to test the app on a bigger screen that i managed to borrow and think that what you said about the disabilites and hardware is a good point. I was just concerned that because my form in vb.net covers most of the 15 inch screen i didn't want it to look horrible on a 13 inch screen, thus the screen resolution option. Thanks for the suggestions and sorry for the email notification.
I find the problem the other way round. I design on my laptop (1920x1200) primarily and my home pc (2560x1600). As you can see these resolutions are are bigger than the average joe's. They look fine on these, but when i run them on things with smaller resolution, i always find they look terrible. Nobody said it would be easy! I tend to start at an 800x600 or 1024x768 window size, depending on what i am doing, and see how they look.
Dave Don't forget to rate messages!
Find Me On: Web|Facebook|Twitter|LinkedIn
Waving? dave.m.auld[at]googlewave.com -
daveauld wrote:
Did you make a response and then edit it completely?
Yes i think i did by accident. I was looking at this and posted a message through my phone. I then checked it out when i got home on my computer. I am now going to test the app on a bigger screen that i managed to borrow and think that what you said about the disabilites and hardware is a good point. I was just concerned that because my form in vb.net covers most of the 15 inch screen i didn't want it to look horrible on a 13 inch screen, thus the screen resolution option. Thanks for the suggestions and sorry for the email notification.
I just tried the program on the 17 inch and it has done what i thought it would and it is basically to far "zoomed in" I just tried to dock the items however it messes up the order i have them in. What is the best way to dock items?
-
Try this...
Public Function ScreenResolution() As String
Dim iWidth as integer, iHeight as Integer
iWidth = Screen.Width \ Screen.TwipsPerPixelX
iHeight = Screen.Height \ Screen.TwipsPerPixelY
ScreenResolution = iWidth & " X " & iHeightEnd Function
or
Public Function ScreenResolution() As String
Dim intX As Integer = Screen.PrimaryScreen.Bounds.Width
Dim intY As Integer = Screen.PrimaryScreen.Bounds.Height
Return intX & " X " & intY
End Function------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
Don't see why I deserved a 1 for that, it is just a way of determining the screen res. Useful if you are trying to implement on different monitors. Hey ho, can't please some people.
------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
-
I just tried the program on the 17 inch and it has done what i thought it would and it is basically to far "zoomed in" I just tried to dock the items however it messes up the order i have them in. What is the best way to dock items?
Getting a form to behave reasonably at different screen resolutions can be tricky, I use a combination of docked panels and anchored controls. Pick the control to dock as fill, usually a list control. You also need to be aware of the z order of the controls when docking (bring to front and send to back) as these will seriously screw with your layout. Design for the smallest reasonable screens resolution, don't force full screen, let the user do that.
Never underestimate the power of human stupidity RAH
-
Don't see why I deserved a 1 for that, it is just a way of determining the screen res. Useful if you are trying to implement on different monitors. Hey ho, can't please some people.
------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
I'm guessing it's because you didn't answer the question that he asked. He didn't ask how to determine the screen size, he asked how to set the screen size.
-
I'm guessing it's because you didn't answer the question that he asked. He didn't ask how to determine the screen size, he asked how to set the screen size.
This is what happens when you try to help on a sunday afternoon with the footy on the telly. :) Still, he shouldn't try to set the resolution.
------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave