I’m in need of a little help.
I’m rather new to the C# Corner, in fact this is my first question I have posted here.
I write code that controls automated machinery in factories. I have all my control code written and working, and am in the process of developing the user interface. Admittedly GUI’s is probably what I am the weakest at, and normally they are done by another developer. Unfortunately, I have to do this project solo. Since this is a control interface that displays a graphic of the parts being made I have to lock the aspect ratio of the main form. I have tried to do this several ways, but with less than desirable results. If I read the width, and then calculate the height and set it, I get a lot screen flicker, and it even locks up some of the time. I’ve tried to scale the form using SizeF, and even tried to over write the base core. But have not been successful in creating a satisfactory result.
For some reason I have the feeling that I can’t see the forest for all the trees, so this may be much easier than I am making it out to be. If anyone has any suggestions, I’m all ears at this point.
Thanks for any help you can offer
Todd
Todd MessmannPosted Jul 1, 2008, 4:26 PM
That does work, Thanks
I was hoping for something a little smother, but at least this works.
I may come back to it later and see if I can override the form sizing itself, but for now I'll work with this.
Thanks again for your help, and if you come up with any other ideas, let me know
Take care
Guest UserPosted Jul 1, 2008, 3:51 PM
Guest UserPosted Jul 1, 2008, 3:48 PM
Todd MessmannPosted Jul 1, 2008, 3:21 PM
Can that be done in the app code? This machine and software will be sold world wide, so I will have no control over the configuration of the computers they use.
I do see what you are saying though. I used the resize end event, and other than a large snap to size at the end, it does work.
I was hoping to find a way to lock the aspect ratio much like you would for a picture box, but I can't seam to make that work with the main form.
Thanks for you help though. If you have any other ideas, please don't hesitate
Guest UserPosted Jul 1, 2008, 2:56 PM
Disabling that feature should eliminate the flickering.