Taking advantage of the Templates folder for VB
Article to show those who do not know about the Templates folder for VB how to save templates to it for future use.
Original Author: Clint LaFever
Code
Taking advantage of the Templates In newsgroups I have seen the question asked a So, how many times have you started a new project Now the smart ones out there who never saw this Now you should see that project as an option of a Your new template of a form is now an option of Why settle for the default when you can have it -Clint LaFever
folder for VB
lot about how to change the default properties of the form when you add new
forms to a project. With how much this question is asked I figured if they
just did a search in the newsgroup they would find the answer without having to
ask again (but that is a different story). Anyhow, I decided to post this
here to help all the newbies out there and so I can use this link in my
responses to the newsgroups questions.
and found yourself putting in the same old common code you always use in every
project. Some people will just point to a common location that they saved
this code to, others will use an Add-In that stores reusable code to insert it,
and so forth. For the most part all of us have some set of code that we
always want and need in every project. So others always work with
databases and always need to reference ADO, DAO etc. Others have a preferred
font setting for all forms. Well, the simple way to deal with this is to
take advantage of the Templates folder found in where you installed VB.
For me that is D:Program FilesMicrosoft Visual StudioVB98Template. If
you go to your folder location you will see this folder contains sub folders for
templates like:
before may be catching on already. Ok, now let me show you how to use this
for making a Project Template.
standard exe project.
forms, references, components, etc that you need
some project properties like Copyright etc.
modules and forms good meaningful names as to not overwrite any other files
later (you will see). As for the Project Name, save it with a nice English
like file name.
(note to use your path not mine)
template for starting a new project. Choose it to start your new project
and presto, you have ALL your code, and property settings all in place.
Easy huh.
standard EXE project.
set it up with all the properties you like using for all your forms.
Now save JUST THAT FORM
to D:Program FilesMicrosoft Visual StudioVB98TemplateForms (remember,
use meaningful names and not to overwrite existing templates.)
nice new template.
new form.
one to add.
your way. I think you can see what you can do now, if not, think about
another profession. Just kidding. I hope this helps everyone who did
not know about this. I just find it so easy to be able to start a new
project and have all the references, components, and code I always use and need
already there.
lafeverc@hotmail.com
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.