Form Loading
-
I have a VB6 application I upgraded to .net. The upgrade wizzard added a bunch of code to my forms that I am not sure I fully understand. I am having a heck of a time trying to get my forms to load properly. Can anyone give some advise how best to do it? I have a lot of code that aranges things on the forms and then sizes them but it does not seem to work consistently, the code appears to execute but then the form appears to ignore sizing and such. Any advise or articles that may enlighten me would be appreciated...
-
I have a VB6 application I upgraded to .net. The upgrade wizzard added a bunch of code to my forms that I am not sure I fully understand. I am having a heck of a time trying to get my forms to load properly. Can anyone give some advise how best to do it? I have a lot of code that aranges things on the forms and then sizes them but it does not seem to work consistently, the code appears to execute but then the form appears to ignore sizing and such. Any advise or articles that may enlighten me would be appreciated...
My best advise is to skip the upgrade wizard and rewrite the project. The wizard introduced a bunch of code that, besides amounting to a pile of spaghetti, makes your code very difficult to discuss with other people because pieces of code wind up everywhere. If your code is moving and resizing controls on load, you're more than likely conflicting with the code in your Form's "Windows Forms Designer Generated code" section. As for how to fix that, only stepping through the code and doing a line by line review is going to tell you what you have to do. I don't know of any articles anywhere that will tell you what you have to do to fix the wizard converted code. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
I have a VB6 application I upgraded to .net. The upgrade wizzard added a bunch of code to my forms that I am not sure I fully understand. I am having a heck of a time trying to get my forms to load properly. Can anyone give some advise how best to do it? I have a lot of code that aranges things on the forms and then sizes them but it does not seem to work consistently, the code appears to execute but then the form appears to ignore sizing and such. Any advise or articles that may enlighten me would be appreciated...
hi, if you want to reset some of you form properties or change them you can go to windows form desirner generated code and in InitializedComponent you will see the properties of each component on your form(they are seperated with comments) then you can chenge them. If you delete a line of code it means that you have reset it! If you like to have a better performance you can use property windows(View>property windows or F4) if you want to reset a property right click on it and then select reset. thats all! have a nice programming day!