can i work with resolution by form instead by screen using API?
(i have 1 code that works fiine, but it's by screen instead by form:()
Printable View
can i work with resolution by form instead by screen using API?
(i have 1 code that works fiine, but it's by screen instead by form:()
Not sure what you are asking.
The resolution is related to the screen the form is displayed on the screen.
You can change the size of the form but that has no effect on the screen resolution nor should it.
You really should not try to change the resolution within your program anyway as it could lead to problems on various monitors.
If you are writing a game or such that runs in full screen mode then it may be acceptable to have options within for different screen sizes but in a form based application this should not be the case.
There are tools that we used to buy that automatically re-sized the screen for you based on the desktop resolution. I needed it when my program was released to people that had 1024x768 when I wrote it in 800x600. Rather than re-write, I added a control to the form and BINGO. Don't think you can find them anymore, though.
Like I said the resolution is related to the screen, not the form. If you want to resize objects on a form or a form itself based on resolution then the first thing is to check the screen size and then adjust the size of the form/controls as needed. I have saw controls to handle this in the past and I think there are some samples with code on the net for free download but I have never checked into them.
As for calculating the sizes that is simple math you just have to take into account the screen size and from there the relation you want your form to be to the size of the screen and then the controls on the form.
Your questions do not provide enough info to go any deeper into it.
Hence my post. This is old, when VB6 was king of the road! Re-size all controls on all forms for every screen isn't in VB6.
sorry... what i mean is:
1 -in window mode, i can't change the resolution. because i must change the windows. that's why we use the the program in fullscreen and then we change the resolution screen;)
2 - but instead resolution screen we use just the form size?
we change the form size, then we change controls positions, dimensions, fonts and images. what i don't know is calculate the new position,dimensions and fonts.
any advice?
(sorry my english)