Dont know Winforms but this could potentially be handled with CSS:
@media (min-width: 221px) {
#button1 {
width: 200px;
height: 200px;
}
}
@media (min-width: 280px) {
#button1 {
width: 240px;
height: 240px;
}
}
repeat for different screen sizes, and for button2. Can smaller and larger screen sizes than what I have defined.
Or could be handled using jQuery:
jQuery(document).ready(function ($) {
window.onresize = function () {
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
$("#button1").width(($(window).width()) / (3));
$("#button1").height(($(window).height()) / (3));
$("#button2").width(($(window).width()) / (3));
$("#button2").height(($(window).height()) / (3));
}
else {
$("#button1").width(($(window).width()) / (1.5));
$("#button1").height(($(window).height()) / (1.5));
$("#button2").width(($(window).width()) / (1.5));
$("#button2").height(($(window).height()) / (1.5));
}
});
something like that anyway. Included the phone stuff in case that's what your looking for...