|
From: Fireseeker on 17 Jun 2008 22:14 Hello all. I am currently working on a project that would allow you to make your own project at runtime. so i have the following code to make a control a runtime : Dim ctl As Control Set ctl = Form2.Controls.Add("VB." & Text1.Text & "", "" & Text2.Text, Form2) ctl.Visible = True i want to be able to edit the newly created control's attributes too .. how would I go about doing that? I've tried Form2.edit.caption and stuff but it wont work. Any help would be appreciated. Also, I want to know how i could write code at runtime and execute it at runtime :) Is this even Possible? 0.o if so how would i do that? i want to make a button that says "write code" then an inputbox would ask you what control you want to write the code for and then it would take you to a form with a blank textbox. Then a button at the bottom that says execute code. Could someone help? Last but not least i want to know if it is possible for me to make an EXE file at runtime of my newly created project? so i could build a calculator at runtime and make it a .EXE file? A Save and Load function for this would help but i dont know how to do that either. If you can help me out with any of these problems please post :) Thanks for reading and hope i get some comments soon. Thanks in Advance Fireseeker
From: Occidental on 22 Jun 2008 16:45 On Jun 17, 10:14 pm, Fireseeker <fireseeker_1...(a)hotmail.com> wrote: > Hello all. I am currently working on a project that would allow you to > make your own project at runtime. A project is a collection of flat files, including forms (name *.frm). The components of a form (buttons, text boxes etc) are coded in a special language at the top of the .frm file, and hidden from the IDE user. Take a look at a .frm module in a text editor and you will see what I mean. I sometimes directly edit the .frm file of a project when doing so is quicker than futzing with the IDE - eg to change all the names of a group of components at once. So to create a project dynamically you will have to 1. Master the hidden format of all the file types you want ot include (modules (*.bas), forms (*.frm), classes (*.cls) and also the project file (*.vbp)). 2. Write vb code that is able to generate such files on the fly as required by the selections made by the user. 3. Compile the project into an exe Compile can be done with a DOS command line: C:\Program Files\Microsoft Visual Studio\VB98\vb6 /make ProjectName.vbp A command line can be executed within a VB program. Check the NG for the best way to do this. You will need a method that waits until the dos operation is finished. 4. Execute The executable will appear in the same directory as the .vbp file. Execute it with the same method you used to run vb6.exe in 3.
From: Occidental on 22 Jun 2008 16:51 On Jun 22, 4:45 pm, Occidental <Occiden...(a)comcast.net> wrote: > On Jun 17, 10:14 pm, Fireseeker <fireseeker_1...(a)hotmail.com> wrote: > > > Hello all. I am currently working on a project that would allow you to > > make your own project at runtime. > > A project is a collection of flat files, including forms (name *.frm). > The components of a form (buttons, text boxes etc) are coded in a > special language at the top of the .frm file, and hidden from the IDE > user. Take a look at a .frm module in a text editor and you will see > what I mean. I sometimes directly edit the .frm file of a project when > doing so is quicker than futzing with the IDE - eg to change all the > names of a group of components at once. > > So to create a project dynamically you will have to > > 1. Master the hidden format of all the file types you want ot include > (modules (*.bas), forms (*.frm), classes (*.cls) and also the project > file (*.vbp)). > > 2. Write vb code that is able to generate such files on the fly as > required by the selections made by the user. > > 3. Compile the project into an exe > > Compile can be done with a DOS command line: > C:\Program Files\Microsoft Visual Studio\VB98\vb6 /make > ProjectName.vbp > > A command line can be executed within a VB program. Check the NG for > the best way to do this. You will need a method that waits until the > dos operation is finished. > > 4. Execute > > The executable will appear in the same directory as the .vbp file. > Execute it with the same method you used to run vb6.exe in 3. Did anyone spot my delibrate mistake?
|
Pages: 1 Prev: How to send a mail with VB6 Next: Problem printing with a network printer |