Memorize the screen behavior of the old program, its logical branching, etc. Make a list of what you liked as is, what you want to improve.
Study the code, correlate the code to the screen behavior.
Comment the code with changes, wish lists, etc.
Open up VB, and draw your forms. Don't think about the program, your attitude should be "Demo", not "Program".
You will need to understand when to 'jump' to another form (not many variables need to be passed) and when to run-time-modify the displayed form (Too many variables, easier to change form).
When you get your screen behaviors finalized, add the background code.
I needed this for a QB2.5 prog to VB6 - talk about a culture shock. BEEP and SOUND are gone or somewhat obscure and the recommended file opening and usage is so confusing I rely on the older methods which are nearer to QB but still different. Sadly the best advice I have starts with the "learning curve" and it is steep. The object browser is less useful than the wheeze of putting object names in the watch window and clicking the + you may get too much info but it don't need much savvy to guess yer way to something useful, the concept of properties being no different from variables takes a while to sink-in but is Sooooo logical. Events are a minefield I have routines calling themselves because it is timing/sequence anarchy out there - so I use many flags like
isunloading = True (in a Form_Unload routine)
and test at critical stages with
If isunloading then Exit Sub
because routines might still be active and accessing (say) files that were closed by the unload routine. Or worse routines continue to run with little evidence - and that is mighty confusing.
But isn't all programming?
In my experience converting engineering, estimating and inventory QB to VB, I finally settled on the following:
Define the input and output screens by either (1) duplicating old or (2) survey users and find out what input and output would be desireable. I encourage them to give me "wish list" type things, and then I choose the easy ones.
Build the screens (forms) with buttons for actions and text boxes for output.
Copy and paste QB code into the button_click sub routines where possible, converting as much as possible to stand-alone subroutines.
Test and compare to old I/O.
Improve when time allows.
I have found that all users are much happier with VB forms and the new I/O. They also asked for many new input fields and output options, many of which were pretty easy to add in VB.
In a nutshell, what I did was to keep the code, use new I/O and make improvements where possible and timeley.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.