I'm bored in programming right now........SO!

Kinja'd!!! "Cherry_man1" (Cherry_man1)
10/24/2013 at 11:21 • Filed to: Programming! Lamborghini

Kinja'd!!!2 Kinja'd!!! 31

Here is the code for the program......

also here is something for your troubles

Kinja'd!!!

Public Class Form1
'(Name was here)
'Dinner-001
'10/24/13


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
'Declare Variables
Dim dectotal As Decimal

'Read and processes the radio buttons
If RadMeat.Checked = True Then
dectotal = 5.0
MessageBox.Show("You have ordeded the Meatloaf")
ElseIf RadFish.Checked = True Then
dectotal = 4.0
MessageBox.Show("You have ordered the Catfish")
ElseIf RadSal.Checked = True Then
dectotal = 3.0
MessageBox.Show("You have ordered the Salad")
End If

'Side orders
If CHKFries.Checked Then
dectotal += 1.0
End If
If CHKBeans.Checked Then
dectotal += 0.75
End If
If CHKCole.Checked Then
dectotal += 0.5
End If

'Displatys the Totoal
lblTotal.Text = dectotal.ToString("c")



End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
'Ends the Program

End

End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
'Clears the form

RadMeat.Checked = True
lblTotal.Text = String.Empty
CHKBeans.Checked = False
CHKCole.Checked = False
CHKFries.Checked = False



End Sub
End Class

ANOTHER NOTE!!! IT DID NOT INDENT! I AM SORRY! (Stupid copy pasta)


DISCUSSION (31)


Kinja'd!!! ESSSIX GmbH - Accountant/Wagon Thumper > Cherry_man1
10/24/2013 at 11:22

Kinja'd!!!0

fun, this a 101?


Kinja'd!!! Cherry_man1 > ESSSIX GmbH - Accountant/Wagon Thumper
10/24/2013 at 11:23

Kinja'd!!!0

Not really its a 181 lol so ya pretty much....its in VB 2013


Kinja'd!!! Justino6969 > Cherry_man1
10/24/2013 at 11:24

Kinja'd!!!0

This sounds so much better than my Java class. I hate Java.


Kinja'd!!! Mattbob > Cherry_man1
10/24/2013 at 11:24

Kinja'd!!!0

have fun with your java. Get off oppo and do your school work!


Kinja'd!!! Cherry_man1 > Justino6969
10/24/2013 at 11:25

Kinja'd!!!0

I need to take Java and C++ still this is in VB2013


Kinja'd!!! Cherry_man1 > Mattbob
10/24/2013 at 11:26

Kinja'd!!!0

I finished 15 min after he assigned it...the rest of the class is still working....


Kinja'd!!! Nibbles > Cherry_man1
10/24/2013 at 11:27

Kinja'd!!!1

Fuck Java


Kinja'd!!! ESSSIX GmbH - Accountant/Wagon Thumper > Cherry_man1
10/24/2013 at 11:28

Kinja'd!!!1

ah, that means nothing to me. (accountant here) I took a basic Java course 3 years ago, figure all programing is based on the same old concept. I just hate working with other peoples code cause everyone has their own style etc. But programing can be fun when you realize the possibilities ala arduino. one day I'll make that my hobby...just to make my life easier lol and cause I can apply it to my car.


Kinja'd!!! Cherry_man1 > Nibbles
10/24/2013 at 11:29

Kinja'd!!!0

That bad?


Kinja'd!!! Carl (@stuffcarlsays) > Cherry_man1
10/24/2013 at 11:29

Kinja'd!!!0

People still use VB?!


Kinja'd!!! Cherry_man1 > ESSSIX GmbH - Accountant/Wagon Thumper
10/24/2013 at 11:29

Kinja'd!!!1

Yes soon we wont buy mods we will buy programs to mod our cars...


Kinja'd!!! Nibbles > Cherry_man1
10/24/2013 at 11:30

Kinja'd!!!2

Fuck Java


Kinja'd!!! Cherry_man1 > Carl (@stuffcarlsays)
10/24/2013 at 11:30

Kinja'd!!!0

Yes, this is in VB 2013. We also used Alice....*kills self over Alice*


Kinja'd!!! Casper > Cherry_man1
10/24/2013 at 11:31

Kinja'd!!!0

LOL VB is fun and easy. I just popped in and used VB .NET to build an automated script generation utility to pull user records from a SQL server and generate Powershell scripts for creating domain OUs, populating them with the users, creating SGs, and assigning the users the proper SGs.

Very handy. I like doing quick things with it much more than C#.


Kinja'd!!! Cherry_man1 > Nibbles
10/24/2013 at 11:31

Kinja'd!!!0

So that bad.


Kinja'd!!! ESSSIX GmbH - Accountant/Wagon Thumper > Cherry_man1
10/24/2013 at 11:33

Kinja'd!!!0

aaaaaand there's some motivation to pay attention lol


Kinja'd!!! Cherry_man1 > Casper
10/24/2013 at 11:39

Kinja'd!!!0

hmmm, that sounds like it is easy.


Kinja'd!!! Cherry_man1 > ESSSIX GmbH - Accountant/Wagon Thumper
10/24/2013 at 11:40

Kinja'd!!!0

But, I was done before the rest of the entire class....and we just now got to go over it....


Kinja'd!!! ESSSIX GmbH - Accountant/Wagon Thumper > Cherry_man1
10/24/2013 at 11:43

Kinja'd!!!0

Ah, I know the feeling. Well welcome to the internet lol watch this video of awesomeness....my dream car right there... I drive a B5 S4 avant, but one day...one day...I will get one of these...


Kinja'd!!! Justino6969 > Cherry_man1
10/24/2013 at 11:43

Kinja'd!!!1

Worse than that bad. It's pointlessly pointless and pointless.

That statement is the basics of how Java works.


Kinja'd!!! Meatcoma > Cherry_man1
10/24/2013 at 11:47

Kinja'd!!!0

Shame on you for using default names on your buttons but making all the labels, radiobuttons and checkboxes strongly named. Also why camelcase labels but not radiobuttons or checkboxes?


Kinja'd!!! Meatcoma > Meatcoma
10/24/2013 at 11:49

Kinja'd!!!0

Also no error catching.... FOR SHAME! Have a sendemail function in return.

Public Function SendEmail(ByVal theSubject As String, ByVal theBody As String, ByVal theSender As String, ByVal theRecipient As String) As Integer Dim returnValue As Integer = 0

Try

Dim SendFrom As MailAddress = New MailAddress(theSender) Dim SendTo As MailAddress = New MailAddress(theRecipient) Dim MyMessage As MailMessage = New MailMessage(SendFrom, SendTo)

Dim readcontents As String readcontents = theRecipient.ToString() Dim textdelimiter As String textdelimiter = "," Dim splitout = Split(readcontents, textdelimiter)

Dim i As Integer Dim x As ArrayList = New ArrayList For i = 0 To UBound(splitout) x.Add(splitout(i)) MyMessage.To.Add(splitout(i)) Next

MyMessage.Subject = theSubject MyMessage.Body = theBody

Dim emailClient As New SmtpClient()

emailClient.Host = "SMTP.ksdot.org"

emailClient.Send(MyMessage)

Label1.Text = "Thank you for submitting your questionnaire."

Catch ex As Exception Dim x As String x = ex.Message.ToString Label1.Text = "There was an error submitting your questionnaire:" + x.ToString()

End Try

Return returnValue End Function


Kinja'd!!! bkempert > Cherry_man1
10/24/2013 at 11:53

Kinja'd!!!1

Word of advice — VB.NET is easy and dirty, but get some experience with C# (preferably the .NET M$ version) and you'll have a great base for finding a job. Most companies love people with M$ language experience.

Also C. And C++. And Java. And Python.

Just learn them all. Never stop learning languages — you will find that one language is never the solution for every problem.

Source: I'm a programmer by trade.

Edit — ElseIf is clunky and looks bad. Most people don't like it. Just a tip.


Kinja'd!!! MauritiusMauritia > Cherry_man1
10/24/2013 at 11:55

Kinja'd!!!4

Check Fries. Checked

Check Beans. Checked

Check ColeSlaw. Checked

End Sub Sandwich.

/Copy Pasta


Kinja'd!!! CAR_IS_MI > Cherry_man1
10/24/2013 at 12:04

Kinja'd!!!0

So your building a POS for a restaurant?


Kinja'd!!! Cherry_man1 > Meatcoma
10/24/2013 at 12:15

Kinja'd!!!0

My bad on the buttons lol I forgot to name then lol and this is an intro class


Kinja'd!!! Cherry_man1 > bkempert
10/24/2013 at 12:21

Kinja'd!!!0

I hear ya languages are always evolving too, so always have a source book on hand I have learned from doing a job shadow. And ElseIF is what we are using for now cause it's an intro class. The teacher is amazing though he worked for Boeing for like 10-15 years in Washington and saint Louis


Kinja'd!!! Meatcoma > bkempert
10/28/2013 at 13:21

Kinja'd!!!0

I learned in C#, transitioning to VB is easy, I think going the other way may be a bit harder.


Kinja'd!!! Meatcoma > Carl (@stuffcarlsays)
10/28/2013 at 13:23

Kinja'd!!!0

Almost all state agencies in KS use VB. Since I learned C#, I felt like they were all cavemen... I have assimilated.


Kinja'd!!! jpaulus > Justino6969
11/03/2013 at 19:23

Kinja'd!!!0

Er...pointless? I take it that you're not in college to become a computer scientist, I hope not because you sir are clueless. Do you use an android OS phone or tablet? You do realize that many job positions as a Software Engineering in one of the top 5 technology companies - requires you to be proficient at either Java/C/C++ or some other object oriented language. Java is far far far pointless - if you ever have to take an Assembly Language course, you will truly experience hell.


Kinja'd!!! Justino6969 > jpaulus
11/03/2013 at 20:30

Kinja'd!!!0

I am, and I stand by my point. C++ I like, Java I don't, especially since I am pursuing my degree at Ohio State and they use their own sick twisted form of Java with made up components that don't make sense outside of the scope of their courses. All of the 'problems' they give me could easily be solved using standard methods, but I have to use the components they provide which don't play nicely with anything else.