-
Ok, I've the background picture of a fom is 320*240 pixels exactly. I want the form's edges to fit around this perfectly...which they do on my machine... but as soon as I run it on a machine with a different screen resolution the form is now the wrong size for the picture.
How's the best way to resize the form to fit better? I though it would be something like:
scalewidth = twipsperpixelx * 320
scaleheight = twipsperpixely * 240
but it doesn't seem to work properly. Any bright ideas?
-
Hi,
I'm not saying that this will work but just give it a go anyway. Set the form's ScaleMode to '3 - Pixel' and then set the form's width to 320 or maybe just a little more if you take into account the form's border. Then simply do the same with the form's height but only this time set it to 240.
I hope it helps!
-
No :( tried that already, but it didn't work. Thanks for tryin anyway.
Any other ideas?
-
Hi again,
I have just one more idea. You could try placing your background image into an imagebox. Drag the top side of the imagebox up to the top of the form and drag the left side of the imagebox to the far left of the form. Now in the form load event enter this command:
Form1.Width = Image1.Width + 10 'may have to add a little extra if you take into account the border
Now do the same with the Height.
I hope you have more luck with this one!
-
I can see it all now!
Oh, yeah!! didn't think of that!! :) Silly me. Of course that'll work...but that's too simple! :)
Ta.