|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
XY coordinates on formI created a demo program with a status bar & status bar label on the form.
When the program runs, it's maximized. When I move the mouse over the form, I can see the X & Y coordinates changing on the status bar label. Here's the problem. I have a 19" LCD monitor with a resolution of 1280 by 1024. When the program runs & the mouse is in the upper-left corner, the X & Y coordinates are 0,0. When the mouse is in the lower-right corner, the X & Y coordinates are 1279,941. OK, if someone installs this program (I know that it really doesn't do anything.) on his computer & he has, say, a 17" CRT monitor with a resolution of 800 by 600, will the resolution on the form still be 1279 by 941 or will it be 800 by 600? I want to be able to do graphics programs like fractals & stuff & I want the resolution on the form to be independent of the monitor size. Is that possible? Thank you. pcnerd wrote:
>I created a demo program with a status bar & status bar label on the form. You can change your own resolution and test it.>When the program runs, it's maximized. When I move the mouse over the form, I >can see the X & Y coordinates changing on the status bar label. Here's the >problem. I have a 19" LCD monitor with a resolution of 1280 by 1024. When the >program runs & the mouse is in the upper-left corner, the X & Y coordinates >are 0,0. When the mouse is in the lower-right corner, the X & Y coordinates >are 1279,941. OK, if someone installs this program (I know that it really >doesn't do anything.) on his computer & he has, say, a 17" CRT monitor with a >resolution of 800 by 600, will the resolution on the form still be 1279 by >941 or will it be 800 by 600? I want to be able to do graphics programs like >fractals & stuff & I want the resolution on the form to be independent of the >monitor size. Is that possible? Thank you. > > T As I previously stated, I have an LCD monitor. If I changed the resolution,
everything would be fuzzy. Is there another way to test it? Show quoteHide quote "tomb" wrote: > pcnerd wrote: > > >I created a demo program with a status bar & status bar label on the form. > >When the program runs, it's maximized. When I move the mouse over the form, I > >can see the X & Y coordinates changing on the status bar label. Here's the > >problem. I have a 19" LCD monitor with a resolution of 1280 by 1024. When the > >program runs & the mouse is in the upper-left corner, the X & Y coordinates > >are 0,0. When the mouse is in the lower-right corner, the X & Y coordinates > >are 1279,941. OK, if someone installs this program (I know that it really > >doesn't do anything.) on his computer & he has, say, a 17" CRT monitor with a > >resolution of 800 by 600, will the resolution on the form still be 1279 by > >941 or will it be 800 by 600? I want to be able to do graphics programs like > >fractals & stuff & I want the resolution on the form to be independent of the > >monitor size. Is that possible? Thank you. > > > > > You can change your own resolution and test it. > > T > As I previously stated, I have an LCD monitor. If I change the resolution,
everything will be fuzzy. Is there another way to test it? Show quoteHide quote "tomb" wrote: > pcnerd wrote: > > >I created a demo program with a status bar & status bar label on the form. > >When the program runs, it's maximized. When I move the mouse over the form, I > >can see the X & Y coordinates changing on the status bar label. Here's the > >problem. I have a 19" LCD monitor with a resolution of 1280 by 1024. When the > >program runs & the mouse is in the upper-left corner, the X & Y coordinates > >are 0,0. When the mouse is in the lower-right corner, the X & Y coordinates > >are 1279,941. OK, if someone installs this program (I know that it really > >doesn't do anything.) on his computer & he has, say, a 17" CRT monitor with a > >resolution of 800 by 600, will the resolution on the form still be 1279 by > >941 or will it be 800 by 600? I want to be able to do graphics programs like > >fractals & stuff & I want the resolution on the form to be independent of the > >monitor size. Is that possible? Thank you. > > > > > You can change your own resolution and test it. > > T > As I previously stated, I have an LCD monitor. If I change the resolution,
everything will get fuzzy. Is there any other way to test it? Show quoteHide quote "tomb" wrote: > pcnerd wrote: > > >I created a demo program with a status bar & status bar label on the form. > >When the program runs, it's maximized. When I move the mouse over the form, I > >can see the X & Y coordinates changing on the status bar label. Here's the > >problem. I have a 19" LCD monitor with a resolution of 1280 by 1024. When the > >program runs & the mouse is in the upper-left corner, the X & Y coordinates > >are 0,0. When the mouse is in the lower-right corner, the X & Y coordinates > >are 1279,941. OK, if someone installs this program (I know that it really > >doesn't do anything.) on his computer & he has, say, a 17" CRT monitor with a > >resolution of 800 by 600, will the resolution on the form still be 1279 by > >941 or will it be 800 by 600? I want to be able to do graphics programs like > >fractals & stuff & I want the resolution on the form to be independent of the > >monitor size. Is that possible? Thank you. > > > > > You can change your own resolution and test it. > > T > pcnerd wrote:
> As I previously stated, I have an LCD monitor. If I change the resolution, If the program is maximized, it should be displayed as the resolution> everything will get fuzzy. Is there any other way to test it? of the system on which it is running. You can check the Screen.PrimaryScreen property to get the primary display screen. Or you can use Screen.AllScreens to get all the screens in an array. > If the program is maximized, it should be displayed as the resolution That's what I thought. I had a 17" CRT monitor & I played around with > of the system on which it is running. classic VB graphics. I figured that the XY coordinates on a form are independent of the resolution & you confirmed it. It doesn't matter what the screen size or resolution are. That's a good thing to know. Thank you. Show quoteHide quote "Chris Dunaway" wrote: > pcnerd wrote: > > As I previously stated, I have an LCD monitor. If I change the resolution, > > everything will get fuzzy. Is there any other way to test it? > > If the program is maximized, it should be displayed as the resolution > of the system on which it is running. > > You can check the Screen.PrimaryScreen property to get the primary > display screen. Or you can use Screen.AllScreens to get all the screens > in an array. > > JUst trying to understand you correctly. Do you mean that on your 17"
monitor that if you change the screen resolution to 800 x 600, the mouse X,Y in the lower right hand corner still shows 1279, 941? -- Show quoteHide quoteDennis in Houston "pcnerd" wrote: > > > If the program is maximized, it should be displayed as the resolution > > of the system on which it is running. > > That's what I thought. I had a 17" CRT monitor & I played around with > classic VB graphics. I figured that the XY coordinates on a form are > independent of the resolution & you confirmed it. It doesn't matter what the > screen size or resolution are. That's a good thing to know. Thank you. > > "Chris Dunaway" wrote: > > > pcnerd wrote: > > > As I previously stated, I have an LCD monitor. If I change the resolution, > > > everything will get fuzzy. Is there any other way to test it? > > > > If the program is maximized, it should be displayed as the resolution > > of the system on which it is running. > > > > You can check the Screen.PrimaryScreen property to get the primary > > display screen. Or you can use Screen.AllScreens to get all the screens > > in an array. > > > > No, I set my 17" CRT monitor to a resolution of 800 by 600.
Last year, I got a new PC & a new 19" LCD monitor. My 19" LCD monitor has a resolution of 1280 by 1024. When I run the program on my 19" monitor, the form is maximized. The X & Y coordinates at the upper-left are 0,0. At the lower-right, they are 1279,941. It makes sense that the resolution on the form is independent of the size of the monitor. I guess that VB adjusts the resolution of the form to correspond to the resolution of the monitor. If I had to create a different program to run on every conceivable monitor size & resolution, I'd go crazy. Thank you. Show quoteHide quote "Dennis" wrote: > Just trying to understand you correctly. Do you mean that on your 17" > monitor that if you change the screen resolution to 800 x 600, the mouse X,Y > in the lower right hand corner still shows 1279, 941? > -- > Dennis in Houston > > > "pcnerd" wrote: > > > > > > If the program is maximized, it should be displayed as the resolution > > > of the system on which it is running. > > > > That's what I thought. I had a 17" CRT monitor & I played around with > > classic VB graphics. I figured that the XY coordinates on a form are > > independent of the resolution & you confirmed it. It doesn't matter what the > > screen size or resolution are. That's a good thing to know. Thank you. > > > > "Chris Dunaway" wrote: > > > > > pcnerd wrote: > > > > As I previously stated, I have an LCD monitor. If I change the resolution, > > > > everything will get fuzzy. Is there any other way to test it? > > > > > > If the program is maximized, it should be displayed as the resolution > > > of the system on which it is running. > > > > > > You can check the Screen.PrimaryScreen property to get the primary > > > display screen. Or you can use Screen.AllScreens to get all the screens > > > in an array. > > > > > > pcnerd wrote:
Show quoteHide quote > No, I set my 17" CRT monitor to a resolution of 800 by 600. The size of a monitor doesn't really say much about the resolution your > > Last year, I got a new PC & a new 19" LCD monitor. My 19" LCD monitor has a > resolution of 1280 by 1024. > > When I run the program on my 19" monitor, the form is maximized. The X & Y > coordinates at the upper-left are 0,0. At the lower-right, they are 1279,941. > > It makes sense that the resolution on the form is independent of the size of > the monitor. I guess that VB adjusts the resolution of the form to correspond > to the resolution of the monitor. If I had to create a different program to > run on every conceivable monitor size & resolution, I'd go crazy. Thank you. > > "Dennis" wrote: > desktop is set to (i.e. my 19" is running in 1600x1200). also remember that the 1279,941 is variable even on a 1280x1024 resolution. If a user increases the size of his taskbar the 941 will change. If he sets it to autohide it will change. If he moves the taskbar to the side it will change as will the 1279 value. My point: detect how much space you have available at runtime and don't assume anything about an endusers resolution while programming. -- Rinze van Huizen C-Services Holland b.v
Adding row to table
Timer Component for VB 2005 .aspx page? Access database insert statement with an autonumber (identity) in vb.net Datagrid current row edits Exposing a .Net assembly to both VB6 and .Net (1 more time) Does file exist Attempted to read or write protected memory. dll vs vb 2005 Numeric / Currency control InvalidCastException in DataRow webbrowser control to submit form |
|||||||||||||||||||||||