#1
help im taking a test in programing and we have to make a program with visual basic

its due by 12.30

we have to make it so it has two opt buttons
and when you click on one it will display a text that sais how much is for a book delivery


theres two option buttons
one regular
and one oversize

regular one is 1.10$
and oversize 1.55$


and when we enter the number of books we want it should display how much it will coast


if anyone knows what im talking about can you please help me!!!!!
#3
Dude, steal the fucking code from one of the incredibly numerous VB Help websites out there.

Find a similar program, change the text on the buttons, wammo!

Copy and Paste your way to freedom.
"Virtually no one who is taught Relativity continues to read the Bible."

#4
<Button1NameHere>_Click Sub
MsgBox "Book delivery will cost $1.10"
End Sub

<Button2NameHere>_Click Sub
MsgBox "Book delivery will cost $1.55"
End Sub

Wow, hard.

Edit: Make the buttons on the form, then use the button names in the bits I put <> around.
...
#5
Quote by Bubonic Chronic
Dude, steal the fucking code from one of the incredibly numerous VB Help websites out there.

Find a similar program, change the text on the buttons, wammo!

Copy and Paste your way to freedom.



Naaahhh I just turned it in halfass finished
my teachers pmsING or sumthing
#6
Quote by bartdevil_metal
<Button1NameHere>_Click Sub
MsgBox "Book delivery will cost $1.10"
End Sub

<Button2NameHere>_Click Sub
MsgBox "Book delivery will cost $1.55"
End Sub

Wow, hard.

Edit: Make the buttons on the form, then use the button names in the bits I put <> around.



nah you need the dims and all that other bs
#7
Quote by bartdevil_metal
<Button1NameHere>_Click Sub
MsgBox "Book delivery will cost $1.10"
End Sub

<Button2NameHere>_Click Sub
MsgBox "Book delivery will cost $1.55"
End Sub

Wow, hard.

Edit: Make the buttons on the form, then use the button names in the bits I put <> around.



nah you need the Dims and the constant statements and some otehr crap
#8
Public Class Form1

    Dim del_cost As Double
    Dim num_books As Integer
    Dim total As Double

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        MsgBox("Book delivery will cost $1.10", , "Book Delivery")
        del_cost = 1.1
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        MsgBox("Book delivery will cost $1.55", , "Book Delivery")
        del_cost = 1.55
    End Sub

    Private Sub btnNumberBooks_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNumberBooks.Click
        If del_cost <> 0 Then
            num_books = InputBox("Enter number of books:", "Book Delivery")
            total = num_books * del_cost
            MsgBox("Total cost is: $" & total, , "Book Delivery")
        Else
            MsgBox("Please select a delivery option.", , "Book Delivery")
        End If
    End Sub
End Class


Easy.
Schecter C1 Classic Left Handed
Line 6 POD HD500
Peavey Valveking 112
#9
Haha.....oh man, this takes me back to Higher Computing classes. Good times! Well, apart from the actual work.
California sunlight, sweet Calcutta rain, Honolulu star-bright, the song remains the same.

Casting quarters into wells that hold our dreams.

Believe in the freedom of music.

With our love, we could save the world.
#10
Quote by BloodlessMurder
nah you need the Dims and the constant statements and some otehr crap


sorry, didn't see the second part of your post. The one above works.
...
#11
I have visual basic...haven't used it for a while, but that still sounds pretty....well basic.
Quote by dcdossett65
Life is too short to worry about this crap.

Who.

Cares.
#12
^ It is indeed .... basic.
Schecter C1 Classic Left Handed
Line 6 POD HD500
Peavey Valveking 112
#13
Quote by Axeman99
Public Class Form1

Dim del_cost As Double
Dim num_books As Integer
Dim total As Double

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MsgBox("Book delivery will cost $1.10", , "Book Delivery")
del_cost = 1.1
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
MsgBox("Book delivery will cost $1.55", , "Book Delivery")
del_cost = 1.55
End Sub

Private Sub btnNumberBooks_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNumberBooks.Click
If del_cost <> 0 Then
num_books = InputBox("Enter number of books:", "Book Delivery")
total = num_books * del_cost
MsgBox("Total cost is: $" & total, , "Book Delivery")
Else
MsgBox("Please select a delivery option.", , "Book Delivery")
End If
End Sub
End Class


Easy.


thanks bro ^.^
#14
Quote by The Shadow
Haha.....oh man, this takes me back to Higher Computing classes. Good times! Well, apart from the actual work.

Yah, I remember back in the day (early 90's) like pre-internet or proto-internet days, finishing all the work in, like, five minutes then having 45 minutes to hack into the Principal's email and call him a French Faggot (because he was French and I was 16)...

Good times indeed. Especially because my email "came from" the professor.
"Virtually no one who is taught Relativity continues to read the Bible."

#15
10 print "What is your name?"
20 input A$
25 x=0
30 print "hello" A$
40 x=x+1
50 if x=10 then goto 70
60 goto 30
70 end



anyone remember just plain old basic?

CT
Could I get some more talent in the monitors, please?

I know it sounds crazy, but try to learn to inhale your voice. www.thebelcantotechnique.com

Chris is the king of relating music things to other objects in real life.