Click to See Complete Forum and Search --> : Source Code


comart
May 15th, 2001, 11:46 AM
Is there a way to view the source code VB generates for me when developing my VB Application?

Iouri
May 15th, 2001, 11:54 AM
May be I did not understand the question, but the source code is exactly the code you are writing in your forms and modules. If you want to see your executable, you can do it any hex editor and find the hex code of your compiled app.

Iouri Boutchkine
iouri@hotsheet.com

comart
May 15th, 2001, 11:55 AM
I'm looking for all of the behind-the-scenes code for the controls, etc.

cksiow
May 15th, 2001, 07:32 PM
I don't think you can get an vb code from the controls, as some of them are not programmed in vb, but if you know assembly, then you can compile the program and run it in visual C++, which all you to view the assembly code. Sometime, I do use this method to find out how VB perform some function.

HTH

cksiow
http://vblib.virtualave.net - share our codes

Cakkie
May 16th, 2001, 07:28 AM
I think he means he wants the code to align the create the controls, load them, align them, initialize etc.
In C you will have to do that yourself, in VB it is done for you. The only 'readable' place you can find this is in the .frm file.
Try it, rename a form to txt, open it in notepad, and tada, all your controls, initial values etc.
I use this technique to easely copy a form. Make a copy in explorer, edit it, change the name property and a bit further down the vb_attribute name and you can load the form in your project.

Tom Cannaerts
slisse@planetinternet.be

Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook

comart
May 16th, 2001, 07:43 AM
What language is it written in? I don't know what the Begin blocks are doing and the attribute statement. Do you know?

Cakkie
May 16th, 2001, 07:57 AM
I don't know what language it is, if it even is one.
The begin/end blocks define an object, one you will always have in a form is the
Begin VB.Form formName
This defines an object of the type Form, located in the class VB. If you've ever worked with com, you should notice the dll.component notation.
Actually, now i'm looking at it, this ain't so hard.
You begin an object, everything that follows are properties of that object. You should see the caption, borderstyle ect.
If the object can contain objects itself (read as controls on a form, or picturebox or whatever can serve as a container), there can be other Begin/end block withing the first.
After all the objects (so the form is completely built) come the attributes.
The Attributes are extra information used by the VB compiler.
After the attributes, the code follows, this is the part you can actually see in your codepane.

If you open a project file in notepad, you will see some other stuff, but it's quite readable, except for the objects (used components) and the refferences, which are displayed as their GUID.


Tom Cannaerts
slisse@planetinternet.be

Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook

comart
May 16th, 2001, 08:50 AM
Great. Thanks so very much!