Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Ok, I have several questions regarding VB with M$ Visual Basic Studio 6.0 installed as my vb tool.
-Firstly, how do you take a program you created and turn it into a stand-alone program? For example, if I were to create a calculator, it is saved as "Calculator.frm" - How could I turn this into an .exe so I could run it on windows without turning on Visual Basic.
-Second, How do you edit apps that were originally created in vb? Example - I have an friend's app edited in vb that is a .exe.(if you look at the icon, its a little vb rectangle with the teal title bar tilted to the left)
-Third, I'm trying to create a average calculator where the user enters numbers in several text boxes, then hits calculate. I wrote it, but deleted it after it failed. So I'll write it real quick here:
dim avg as double
avg=(text1.text + text2.text + text3.text) / 3
Label1.Caption="The average is " & avgWhenever I hit "Calculate," all of the text boxes with the numbers turn to 0 and the average is 0......
Help would me much appreciated =)
Thanks in advance
-eta378

To turn the source code calculator.from into a programme click File Make xxxxxx. xxxxx being the name of the application you have given it.
for the second question, you cant. You need the source code to edit a compiled programme.
As for the average, there is nothing in it that I can see that is wrong. There is something else making the boxes zero.
Stuart

Thnx ALOT for the fast reply Stuart! The only thing is, i just retried my formula for the average, and its incorrect - if you enter 5 in all three text boxes, the average comes out to be 185. What am I doing wrong?
Everything else works tho!

Try this:
Dim avg As Double
avg = (CDbl(Text1.Text) + CDbl(Text2.Text) + CDbl(Text3.Text)) / 3
Label1.Caption = "The average is " & avgCdbl converts the value in the Text Box to a Double, the same as avg.
Stuart

![]() |
linked lists/external fil...
|
Dev C++ kills my system
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |