User Profile
Collapse
-
I don't understand what you mean. All comboboxes begin their index at 0. When executed, and trying to go through the selectedindex if statements to find which 'phone' was selected, it returns a value of 0. -
Multiple classes
Alright so im having a problem getting a value from a couple combo boxes based on their index. Im calling the objects from the main form to calculatecost() from 2 other classes. Anyways heres the main form code and i'll post one class after that with the combo box selected values.
[code=vbnet]
Option Strict On
Option Explicit On
Public Class MobilePhoneCost
Private Sub btnCalculate_Cl ick(ByVal... -
-
Alright i noticed it was moved, but anyways if i do my code like this. It will add the total based on the checkboxes checked. But it automatically treats the radiobuttons as radBucket (3.59) being checked when its not. From there any checkboxes clicked will add. Anyone know? I'm incredibly new to this .NET.
Option Strict On
Option Explicit On
Partial Class _Default
Inherits System.Web.UI.P age...Leave a comment:
-
radio button/function problems
Alright so i've come across a problem. Basically what i have is 3 seperate radio buttons within a panel labeled ( tall, huge, bucket) I'm trying to return values from check boxes once the choice of the radio button is clicked. I'm just trying to return the value of the radio button clicked (tall being 2.59, huge being 3.09, and bucket being 3.59) Once the radio button is clicked I'm trying to call functions to return the total value with a few... -
-
Alright so with a few changes i got that part working. Now my next problem i've come across. I got the highest hours worked to display the persons name and hours worked in the label. Now when i'm trying to do it for fewest hours worked, the name of the person with the fewest hours wont display. Anyone point me in the right direction?
...Code:Sub fewesthours() Dim intCount As Integer Dim intMinimumLeave a comment:
-
Validating input from an array
Ok so i'm trying to validate numeric input through the use of input boxes. I'm trying to use a try catch statement to catch anything thats non numeric and it works fine. But the only problem i'm having is looping through the array. For example an input box pops up asking John for hours worked, enters 20 and clicks ok. Then loops to the next inputbox asking Jake for hours worked, enters 30 clicks ok. Now when the next question comes up for 'Jeff'... -
Multiple Container Box Overlap
Alright so im building a program that lets you select from 3 different methods of transportation via a combo box. In form view i've made 3 different panels to hold each groups controls so i wont have to change the visibility on every label/textbox. I'm new to this and put each panel over eachother to make the format look good when executed. The only problem is, when i execute all the panels overlap for the first combo control, and when selecting... -
25. I guess ill just declare variables as strings and take the input from the message boxes and convert them to integers when doing the calculations. Just wondering what the syntax is to force a textbox to accept an integer value instead of string.Leave a comment:
-
converting to integer
Alright so i've done this in some of my recent programs with option strict on and for some reason When i debug and select the option from the combo box, it crashes and gives me a 'Input String was not in the correct format' error. Ive tried declaring the variables as strings and converting the textbox to integer from there and still get the same thing. I'm just trying to get a value to store it in that variable so i can use it for later calculations.... -
That didn't work either, went through the division to get the percentage of vowels and threw a dividebyzero/overflow exception. So i piddled with it and just wrapped the full code as a system exception and it catches everything. Maybe it woulda helped if i would've given you the full code lol. Sorry bout that, but i appreciate you trying. Thanks!Leave a comment:
-
didnt work, it gives me the enter a sentence, but when i click ok. It goes down to the message statements and executes that :/Leave a comment:
-
One more question if someone doesnt mind.
I'm trying to throw an exception if nothing is entered in the text box. The message is displayed once the translate button is clicked, but i need it to stop immediately before any output is given through the message box. And for some reason, focus won't work on my text box :/
...Code:Try For i = LBound(strWords) To UBound(strWords)Leave a comment:
-
-
Is it possible to insert a counter in this line of code to count if the string begins with vowel while its being split up?
...Code:'Split the text into an array of words strWords = Split(strInput, " ") For i = LBound(strWords) To UBound(strWords) strChar1 = strWords(i).Substring(0, 1) Select Case strChar1.ToUpperLeave a comment:
-
help with counter
Alright so i'm writing a program, and i need to count the number of times a word begins with a letter.
...Code:Public Class frmPigLatin Private Sub btnTranslate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTranslate.Click Dim strChar1 As String Dim strInput As String Dim strOutput As String = "" Dim strWords As String() -
i always try and overdo everything when its a simple fix. I've looked everywhere trying to figure this out. Thank you for helping me out, it's greatly appreciated.Leave a comment:
-
Yeah I agree, i was just messing with quite a few variables trying to get it to add up... but yeah i trimmed it. The only problem is i'm trying to add the Total points in the right column based on the values entered in the input boxes.
example this is what im getting.
Points scored 20 Total Points 20
Points scored 30 Total Points 40
Points scored 50 Total Points 60
Points scored 50 Total Points...Leave a comment:
-
Help with inputbox values?
Hello im new to visual basic, i'm on 2005 and need a little help with a project im doing. Once this code is executed an input box pops up and asks for a football score, once the score is entered it is displayed in a listbox like this.
Points Scored 6 Total Points 6
Now the problem is when i enter the second score from the next inputbox i'm getting the problem.
Points Scored 6 Total Points 6
Points...
No activity results to display
Show More
Leave a comment: