If it's online, ITSBITS®

Catapult Garage Home
Getting Started
Main Workshop
Emergency Workshop
Tech Support
Alarm/Timer Tool
Image Tool
Icon Extraction Tool
Color Picker

Make Project
View Files In A Project
Mass Changes In A Project
Copy/Move Project
Change Images Format In Project

Build A Budget
Car Cost
Save vs. Borrow To Buy
Library Management Tool
Personal Inventory

Folder Management
Folder Permissions
View Files In A Folder

Contacts Manager
Build/Test Connection String
Code To Code(VB)
File Dump
Font/Test Viewer
SQL DB Code Builder Tool

VB Code Gen w/Stepper
Configure Sharing And Backup (Multiple Shops and Tools)
List Builder Forms (Multiple Shops and Tools)

ITSBITS Catapult Garage Software
VB Code Gen With Stepper

Purpose Of The Tool

If you've been a developer for long, you've experienced the boredom of typing something like this:

Example 1
TextBox10.text = Array(nj,10)
TextBox11.text = Array(nj,11)
TextBox12.text = Array(nj,12)
TextBox49.text = Array(nj,49)
TextBox50.text = Array(nj,50)

And, if you were really, really lucky, you got to turn around and do it all again in reverse:

Example 2
Array(nj,10) = TextBox10.text
Array(nj,11) = TextBox11.text
Array(nj,12) = TextBox12.text
Array(nj,50) = TextBox50.text

Or, your boss may have given you some other fun stuff to do, e.g., make each line in this block of code start (or end) with "  'turned off 12-1-2010" or whatever. Just boring typing.

Or, less frequently but still a pain you know where, you may need to change a group like this:

Example 3
Array(nj,10) = TextBox1.text
Array(nj,11) =TextBox1.text
Array(nj,12) =TextBox1.text
            . Array(nj,50) =TextBox1.text

to something like this:

Example 4
Array(nj,10) = TextBox13.text
Array(nj,11) =TextBox14.text
Array(nj,12) =TextBox15.text
Array(nj,50) =TextBox63.text

Fun stuff! Right!

Of course, not. That's what this tool is for--in a few mouse clicks you can take care of these things and get on with your life.

-- Back to top of this page --

Start The Tool

On the opening screen or "WELCOME" tab, go to the "Tools" menu, then select the option "VB Code Gen w/Stepper." When this option is selected, you will see an image something like the one shown here:

ITSBITS Catapult Garage Software VB Code Generator with Stepper Tool

-- Back to top of this page --

Using The Tool

Let's start with our first example under the discussion on the "Purpose of the Tool" (above). You can either type your first line into the large gray text-box area or, if you have it in your VB dev. environment already, just copy it there and paste it in using the "Paste Basis Below" button. Now enter your start value. Let's say you want "TextBox1.text = Array(nj,1)" through "TextBox12.text = Array(nj,12)." The "start value" is one and the "final value" is twelve. Enter these two values into the two text boxes to the right of the "Paste Basis Below" button. Now you need a "Flag Value/Start" entry. In our example, you can use "ox1.t" or "nj,1)" as your value...either will work because they surround the "1" you want to step-change. Now you can click the "Process Gen" button to change one side of the equation and generate the stepped (on one side) statements. Hence, you'll have values from one through 12 on one side but the other side will remain unchanged. (Notice that if you're only going to use this step, then decide to redo it, you'll need to click the "Again" button to avoid a "screw up."

ITSBITS Catapult Garage Software VB Code Generator with Stepper Tool Now, your start value and your finish value won't change, but the "Flag Value/Start" must change to be the one you did not use before--in our example, either "ox1.t" or "nj,1)" will work. (Note that you must use at least one character after the numeric value for this part of the operation and it must be a non-blank, printable characer--the ".t" or the ")" exemplify this.) When you've changed the "Flag Value/Start" click the "Secondary" button. Voila! Your code is generated for you.

Now, we recommend that you make it a habit to click the "Copy to Clipboard" button, paste the code into your developer environment, and think about whether you need the reverse equalities or not. We've found that about 90% of the time you will even if you don't know it yet. Hence, we recommend that you now click the "Copy to Clipboard" button and then click the button in the middle of the controls section to "Gen Reverse Equalities." If you don't think you need it yet, just copy it to the clipboard, paste it into your code, highlight it, and comment it out until you need it...betcha it's sooner than you expected!

When you're finished, you can just hit the light-green button and go about your business.

The button to "Process Edit" will let you make the stepped changes shown in examples 3 and 4. You'll need to enter your start value, your finish value, and your Flag Value/Start value, then click the button. ITSBITS Catapult Garage Software VB Code Generator with Stepper Tool Prepend or Append

Notice the "Prepend" and "Append" buttons. These will let you add stuff to the code in the large gray text box area--either at the start of each line or at the end of each line. As before, just paste the code into the box, enter what you want to prepend or append, then click the appropriate button to do it. Notice that the tool does not care whether this is VB code, C# Code, or just plain old text. That makes it handy for a number of different things.

-- Back to top of this page --

Gen-Text-To Menu

ITSBITS Catapult Garage Software VB Code Generator with Stepper Tool Gen-Text-To Menu

This little menu is designed, again, to relieve your typing woes--and help your memory as you age. These are options that will generate small bits of code we wind up doing often and facing the, "I don't want to go through figuring that out again, but I can't quite remember which program I did it in." We'll be adding others to it as they come up or are suggested by our user audience. The code generated will be in the large gray text box so you can copy it to the clipboard and then paste it into your Dev. environment for immediate usage.

-- Back to top of this page --

ITSBITS® is registered in the United States Patent and Trade mark office. Microsoft, Windows, Excel, Outlook, Exchange, and Word are registered trademarks of the Microsoft Corporation.
©2012 by ITSBITS, Incorporated...This applies to all information, graphics, and software on this site. All rights under all applicable copyright laws in all jurisdictions are reserved.