Computing.Net > Forums > Programming > How to: Edit Visual Basic Apps

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

How to: Edit Visual Basic Apps

Reply to Message Icon

Original Message
Name: eta378
Date: March 9, 2005 at 14:08:01 Pacific
Subject: How to: Edit Visual Basic Apps
OS: Windows XP
CPU/Ram: 512
Comment:

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 " & avg

Whenever 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


Report Offensive Message For Removal


Response Number 1
Name: StuartS
Date: March 9, 2005 at 14:51:46 Pacific
Reply: (edit)

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


Report Offensive Follow Up For Removal

Response Number 2
Name: eta378
Date: March 9, 2005 at 17:58:02 Pacific
Reply: (edit)

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!


Report Offensive Follow Up For Removal

Response Number 3
Name: StuartS
Date: March 9, 2005 at 18:13:40 Pacific
Reply: (edit)

Try this:

Dim avg As Double
avg = (CDbl(Text1.Text) + CDbl(Text2.Text) + CDbl(Text3.Text)) / 3
Label1.Caption = "The average is " & avg

Cdbl converts the value in the Text Box to a Double, the same as avg.

Stuart


Report Offensive Follow Up For Removal

Response Number 4
Name: browser
Date: March 10, 2005 at 06:28:23 Pacific
Reply: (edit)

eta, what is the rest of the code? Perhaps we might see something.

Browser


Report Offensive Follow Up For Removal

Response Number 5
Name: eta378
Date: March 10, 2005 at 09:08:27 Pacific
Reply: (edit)

It's ok browser - Stuart fixed my error.

Thanks again fellaz

~Problem solved~


Report Offensive Follow Up For Removal







Post Locked

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


Go to Programming Forum Home








Do you own an iPhone?

Yes
No, but soon
No


View Results

Poll Finishes In 6 Days.
Discuss in The Lounge
Poll History




Data Recovery Software