AdvancedHMI Software
General Category => Support Questions => Topic started by: Rookie 2017 on May 03, 2017, 01:35:31 PM
-
Hey all,
I want to have a second form that defaults to maximum (fill frame) - that's easy
Secondly, I want an image that defaults to the right top hand corner and fills roughly 3/4 of the screen so my buttons can be beside it - again easy
Lastly, I want 4 buttons in the corners of that image
it works great on the screen I'm working great on, how can I set this up so it will default to maximize and look good on any screen being used as it may be a larger or smaller screen
-
Winforms is not really ideal for running an application on different screen resolutions. The best tools you have to work with is the TableLayoutPanel and the FlowLayoutPanel. Using the TableLayout panel, you can add objects to the cells and set them to fill.
-
if i may
am a noop
http://www.dreamincode.net/forums/topic/228259-adjust-controls-sizeposition-with-screen-resolution/
this post i found may be helpful for you
the only problem that u might face is that you need to change the font size
advice : build your project in the lowest form size you need it to work on
and this code will maximize it to any monitor resolution
i hope it works with u
-
The table layout works well except I cant place my buttons on top of my centre image,
Ill try option 2 tomorrow!
-
The TableLayoutPanel only lets you place one component in a cell, but you can place a Panel in a cell, dock it to fill. Then make the background image of the panel your picture. You can now add multiple buttons in the cell with the panel. Then use anchors to tie them to the corners.
-
yes, had that in the works this morning and it worked great!
Thanks
-
I'm sorry, i add this link here because i think the tricks on the table layout panel are very useful
Insert table in table layout cell: [url]https://youtu.be/FWd6HF6vhcc[url]
Resize setting:[url]https://youtu.be/GbEtexBWdxg[url]