EOSERV Forum > Programming > visual basic 2010
Topic is locked.
Page: << 1 >>
visual basic 2010
Author Message
Post #138811 visual basic 2010


One of my friends is trying to create this program in visual basic 2010, he has no idea where to even start. I took a look at it and couldn't help either so maybe somewhere here can help us out?


i appreciate any help.

14 years, 13 weeks ago
Post #138933 Re: visual basic 2010

All the work would be in the 'Calculate reward points' button.

In the buttons onclick event have it do something like:


if chkBasic.checkstate = checked and text1.text < 75 then

RewardPoints = text1.text * 1.05

end if


if chkBasic.checkstate = checked and text1.text > 75 and text1.text < 149.99 then

RewardPoints = text1.text * 1.075

end if


text1 would be the input textbox for the total monthly purchase.

chkBasic would be the basic membership checkbox.

RewardsPoints would be the box/label or whatever that displays the points.

I typed that code entirely freehand so dont expect to be able to copy/paste as i havnt even looked at a vb.net source in months so my syntax is probably all over the place.

Hope this helps though.


14 years, 12 weeks ago
Post #138946 Re: visual basic 2010

I did it for you, enjoy. Full source and all.

Preview:

Download:

Mediafire Mirror

Source:

https://tehsausage.com/paste/lab4b-source

Could you possibly tell me where you're getting these labs? I would love to get some tasks to do in VB, I'm kinda stuck at doing nothing..

14 years, 12 weeks ago
Post #138960 Re: visual basic 2010

its from the Microsoft vb 2010 book. i used to do some vb6 so i told him i would take a peak at it.


Thanks guys.

14 years, 12 weeks ago
Post #138975 Re: visual basic 2010
Loading.. posted: (30th Mar 2012, 12:43 am)

I did it for you, enjoy. Full source and all.

Preview:

Download:

Mediafire Mirror

Source:

https://tehsausage.com/paste/lab4b-source

Could you possibly tell me where you're getting these labs? I would love to get some tasks to do in VB, I'm kinda stuck at doing nothing..

Not to put a man down when he's done good work or anything but you could've just declared "Equation" beneath public class form1 or whatever it is then instead of using Dim Equation As Integer = whatever, you'll be able to code it like this: Equation = whatever
It just makes your code easier to look at and it's good programming habit :) 

---
If money doesn't grow on trees, then why do banks have branches?
14 years, 12 weeks ago
Post #138980 Re: visual basic 2010
Not to put a man down when he's done good work or anything but you could've just declared "Equation" beneath public class form1 or whatever it is then instead of using Dim Equation As Integer = whatever, you'llbeable to code it like this: Equation = whatever
It just makes your code easier to look at and it's good programming habit :) 
It doesn't really matter when it comes to this, even if I publicly declared Equation, the equation is different every time. There for I would have to type what the Equation equals under every if statement. So yes it could of been done either way but it still would of required the same amount of code. So in my opinion I don't see anything wrong with the way it was done. 

When I don't have to type what a variable equals under multiple IF statements then I publicly declareit.
14 years, 12 weeks ago
Page: << 1 >>
Topic is locked.
EOSERV Forum > Programming > visual basic 2010