Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB Files 1

Status
Not open for further replies.

Smokey

Programmer
Oct 9, 2000
13
0
0
US
Can anyone tell me what the .frx, .vbw, .ctx, etc files created by VB when saving a project, form, usercontrol, etc are used for, what info they contain and how to read that info?
 
those are the files vb uses when you open the progevt in design view
so vb can remember dimensions of the form and its objects (controls etc...) it also holds the text you typed to tell vb what to do during events and what your functions and subs do

open the files using notepad to read them.

tryp
 
It is not a good idea to mess with these files in Notepad, Wordpad,... as you may screw them up and not be able to use them in VB, and so have to recreate them.
Simon
 
Tryp-
I appreciate the tip but actually, VB stores all info about, for example, a form inside of the .frm file. It includes all object and their properties and all the code in that form. The .frx file seems to be non-text information. When I've opened other forms (in WordPad), there is a property called Icon=, followed by the path of a .frx file,: and a four digit number. I believe the .frx file holds the picture info emedded in it but was not sure. The project (.vbp) file works the same way. All the forms, modules, classes, usercontrols, property pages, etc are stored in the .vbp file with the appropriate heading (Form=, Module=, etc). The .vbw file does, however, seem to hold some info about the forms and other vb files contained in the project. For example, I opened a .vbw file in WordPad and the first line was: Form1 = 44, 44, 319, 370, , 22, 22, 297, 348, C. I do have a form called Form1 in my project, but I do not understand what all the numbers are and why there is a C at the end.
If you get anymore info, I would be very grateful.
 
Smokey -

Like others have said, the .frx files contain a form's non-code info. If you were to place a bitmap as the background of a form (in design mode), that bitmap would be stored in the .frx file. The .frx also stores all the design-time info for the ActiveX controls you've tweaked.

The .vbw is the Visual Basic Workspace file. The list of numbers you saw are the positions of the various design windows. I have no idea why a "C" is at the end, however.

I wouldn't worry about their contents too much. The only time it becomes an issue is when the .frm and .frx no longer match (sometimes VB screws up after a program crash). To re-sync them, you have to open the form in design mode, then switch over to Windows Explorer and delete the .frx. Then switch back to VB and save the form. The .frx will get re-created correctly.

Chip H.
 
Chiph
Thanks for the info. The reason I wanted to know what they were is because I created a Visual Basic Project Viewer that open the project, along with all the files contained in that project and will return basically everything about the project and its files. Everything from code to objects contained on the form or usercontrol to the properties of the form, usercontrol, module, etc and the properties of their various controls. I was just curious as to what those other files contained and if there was a way to extract that info and use it for myself.
Smokey
 
when i send stuff to the copyright office, i print out those files and send them too. it makes for a hefty package, but i figure the amount the post office charges nowadays, i'm gonna contribute to making them sweat.
LOL

wayne
 
Smokey,

Could you elaborate on the capabilities of the "Project Viewer"? It sounds like it be an interesting Add In for VB IDE.

MichaelRed
mred@duvallgroup.com
There is never time to do it right but there is always time to do it over
 
It has two TreeViews on the left and a TextBox on the right. It fills the upper TreeView with the associated files, name of the project as the main heading,all of the forms under \Forms, etc. If you click on the name of a form, module, usercontrol, etc, the lower TreeView fills with the objects (if any) contained on the form or usercontrol, along with all the object's properties. The TextBox fills with all the code inside of the form, module, etc. As of now, it recognizes any forms (MDI or other), modules, usercontrols, class modules, and resources associated with a project. Saving modifications has not yet been implemented.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top