VS 2008 - Code Error On Tax Calculating Program - User Enters The Item Name And Amount Of The Item Purchased

Feb 9, 2010

So i've to write this program whose purpose it this:

Purpose: The user enters the item name and amount of the item purchased. The program calculates the tax for the item and the final total, and then displays these values. Tax on all items will be 7.75%.

And so far i've this code but it's not working:

' Program: Cash Register
' Author: Nidhi Shah
' Date: February 2, 2010
' Purpose: The Cash Register Window application will
' computer the tax and the final cost of a
' purchased item.

Option Strict On

Public Class frmCashRegister
' Tax per item - used in multiple procedures
Const _cdecTaxPerItem As Decimal = 0.0775D

[CODE]...

View 6 Replies


ADVERTISEMENT

Possible To Make List Box Item Height For Item Depending On Amount Of Lines That Item Contains?

Jan 1, 2012

I have a list box on the form which functions as a copy/paste. When you copy something, it is automatically added to the list box as a "clipboard helper". Here is the problem,however: if the text is more than 1 line, the list box does not show all the text.It ends up looking messy.So getting back to my question, is it possible to make the list box item height for an item depending on the amount of lines that item contains?This is a one line sentence in the list box and should take up one line.This is a multi line sentence in the list box and should take up two lines for item height.

View 11 Replies

Reciept Printing - Form Which Consist - Item Code , Item Name , Item Price , Quantity Of Item

May 25, 2012

Regarding my college project. i'm working on a sales system . i have a form which consist of all the following information( item code , item name , item price , quantity of item ) which is display using a data grid . data input by user using text box and all this information will be stored in a database(sales database) i'm using ms access 2007. the grand total will be displayed in a text box . and amount paid will be input in a text box too , my major problem now is how to i create a reciept that will have all this information of the purcase. i have a reciept button . what the next step ? i dont have any idea how to get the reciept done.

Imports System.Data.OleDb

Public Class Form5
Dim con As New OleDbConnection

[CODE].......................

View 9 Replies

C# - Set The Binding Of A Item Template Item To User Property?

Oct 21, 2010

I have a simple user control, which is essentially just an AutoCompleteBox with some custom logic.

For a specific instance (a collection of Persons), I want it to look like this:

<sdk:AutoCompleteBox Name="myACB" ItemsSource="{Binding People}" FilterMode="StartsWith" MinimumPrefixLength="2" ValueMemberBinding={Binding LastName}>

[Code].....

I want the DisplayMember property to be the property name to display for whatever kind of custom collection (persons, cars, etc) I have bound to the AutoCompleteBox.

I don't think I can modify the datatemplate programmatically. Is there a way I can do this with binding (relative source)?

View 3 Replies

[2008] Error Validation - Series Of Nested If/then/else Statements To Make Sure A User Enters Information

Feb 15, 2009

I'm using a series of nested if/then/else statements to make sure a user enters information into each text box or chooses a radio button. What would i use to say if no text is entered in textbox1, then ... also what would i use to make a sure the user choose one or the other radio button? for example i also have a combo box, i used "If SubjectComboBox.SelectedIndex <> -1" for the if statement.

View 2 Replies

When Users Select Each Item Another Item Will Be Added To Second Listbox But It Is The First Selected Item

Jul 5, 2010

In my application I have a listbox and SelectionMode should be MultiSimple because users need to see which items they selected. In another tab we have another listbox this one should show all the selection users had done in first tab. Private Sub

[Code]....

View 3 Replies

VB 2008 Console - 2D Array - Infinite Loop - Program - User Enters The Number Of Enrollments For 5 Different Campuses During Two Semesters

Jun 12, 2011

I am trying to create a program that the user enters the number of enrollments for 5 different campuses during two semesters. I just got started and here is what I have so far but when I run the program it is stuck in an infinite loop and will not go to the next function. I am not sure how to end the loop.

Here is what I have so far:
Module Module1
Dim SIZE As Integer = 5
Dim campus() As String = {"Decatur Day", "Decatur Evening", "Huntsville Day", "Huntsville

[CODE]....

View 1 Replies

VS 2008 Feed A Multi Line Textbox Into A String Array Then Check Item By Item

Jul 25, 2010

I've been trying to feed a multi line textbox into a string array then check item by item if a string contains part of it.

[Code]...

View 2 Replies

Asp.net - User Enters Code Into TextBox, Code Gets Added To URL (using Session)?

Sep 1, 2011

I'm using ASP.net 4.0 VB,I am using a session variable to add a user entered code into the url of each page. I can get the code to show up at the end of the page's URL that my textbox is on, but what do I add to every page to make sure that the session stays at the end of every URL that person visits during their session? This is the code from the page that the user enters their user code.

Protected Sub IBTextBoxButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles IBTextBoxButton.Click
Session("IB") = IBTextBox.Text
Dim IB As String = Session("IB")
End Sub

[code]....

This is what I have in the page load of one of the other pages. What else do I add to make sure that variable is added to the URL of that page?

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim IB As String
IB = Session("IB")
End Sub

View 3 Replies

VS 2010 - Getting An Item Amount To Decrease In Listview Using A Checkbox

Apr 18, 2012

My program takes a checkboxed item and depending on the serial number that is present on the item on the invoice, subtracts one from the amount list I have the following in a listview on a details page which I added with the following

[Code]...

Right now it doesn't look like it does anything. I have tried changing my index's on my subitems to 1 and 3 instead of 0 and 2 but i figured because they are subitems that they need to be subitem index 0 and subitem index 2. if that makes sense.

View 18 Replies

VS 2008 Crashes On Add New Item After Exporting Item Template

Jul 11, 2009

I am using VS 2008 (VB) with an XP machine. I exported an item template and now my computer locks up when I attempt to add a new item to my project. I tried deleting the exported template but the same thing happens.

View 4 Replies

My Program Isn't Selected The Right Item That Click On - Allows A User To View A List Of Foods In A Combo Box

May 1, 2012

I am creating a program that allows a user to view a list of foods in a combo box, add that food unto a list box, and adds all of the calories of that food together. When the user highlights their select food, the program automatically shows the amount of calories for that particular food in a text box. The program is getting the food and calorie information from an access database. I managed to get all of the food calories to add up properly, however, I ran into a problem. Sometimes, well, most of the time, when I select certain foods from the combo box, the program automatically reselects another random food, usually a food that begins with either an A, B, or C. Also, the other random food that the program chooses usually has the same amount of calories as the food I originally wanted to choose. I have over 6,000 items in the database. I don't understand why this is happening. This is what my code looks like for the button that adds each food to the list box:

Private Sub Button4_Click(sender As System.Object, e As System.EventArgs) Handles Button4.Click
Foods_Selected.Items.Add(ComboBox1.Text)

Static i As Single

[CODE]...

And this is what my code looks like for the button that adds all of the foods together:

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click

Dim x As Single
Dim TotalCalories As Single

[CODE]...

I have no idea what to try. It's like the program just skips over random foods, even though all of the information for them is in the database.

View 2 Replies

If The Program Catches An Error With The Current Listbox Item To Move On To The Next One?

Aug 23, 2009

I have some items in a listbox and a try catch. I need it where if the program catches an error with the current listbox item to move on to the next one.

View 18 Replies

User Enters A Username In Textbox1 And Then Enters A Password In Textbox2?

Jul 2, 2009

I have a login form that I made. The user enters a username in textbox1 and then enters a password in textbox2. The user then hits the submit button (button2) and from there it works beautifully. The problem is, I would also like the user to be able to hit the "enter" key after they fill out the password textbox (textbox2) and have it be like they pressed the submit button. When the user hits enter right now, the form hides.

View 4 Replies

Confirm What User Enters In The Program?

May 2, 2012

Well, I have a form called customers. Login form and mainform.

So my clients want to have an option that explains this: If a user enters information in the customer form, then that information has to be confirmed by admins panel.

Get me well. When application program loads with a limited user, I set some buttons hidden so that only admin can see it when they log in. so in that case, users are not capable of inserting anything in the customer form.

But this time they want users to insert information then the information goes to administrators to confirm the information...if admins accepts the information, then information is then goes to customers table in database. If they don't confirm it, then that information will be ignored.

am using vb.net 2008 with sql server database.

View 7 Replies

Make A Simple Program That When For Eg A User Enters 4 It Gives This Figure ****?

Mar 1, 2009

i was wondering how i can make a simple program that when for eg a user enters 4 it gives this figure **** and so i want that if the user enters 5 it gives ***** etc.

View 9 Replies

Program Asks That The User Enters Valid Data?

Jun 27, 2011

I am trying to write the code for a conference:

1 person costs $695.00
2-4 people costs $545
5-8 people costs $480
8 or more costs $395

If the company has been before they get a 15% discount and no company can have more than 16 people. The program asks that the user enters valid data.?? (error msg boxes)

View 33 Replies

Program Where The User Enters 3 Inputs In A 3 Textboxes - First Name, Last Name, Birthday

Dec 7, 2009

Ok so i made a program where the user enters 3 inputs in a 3 textboxes (First Name, Last Name, Bday) and when the person presses enter a check list is made under the checklistbox with the Lastname. So can any1 tell me if i click on that checklist then everything i entered shows up in a label.

View 11 Replies

If Eval Compare Item 1 And Item 2 If Item 1 ="0" And Item 2 > "0.00" = Display Result

Jan 21, 2012

Is it possible to compare 2 dataitems and then display the result depending on the 2 values using if eval at run time?I have a ListView with databound controls. 1 is RedemptionChoice and the 2 is CashBack.When 1 reads "0" and 2 reads > 0.00 the output should read AUTO I have read many comments online and most point to create a new function within code behind but have found it impossible to implement on my own.I tried this as a test on the actual page:

<%# If(Eval("CashBackRedemptionChoice").Equals("0") & Eval("[CashBack]").Equals("0.00"), "Auto Cashback"))%>

2 needs to be greater than 0.00 for AUTO to be displayed. Hence I know this would not work. Just trying to give an example of what I would like.

View 4 Replies

Create Console Program Where User Enters A Character And Respective ASCII Value In Denary

Nov 21, 2010

The latest assignment from my teacher was to create a console program where the user enters a character and the respective ASCII value in Denary, Hexadecimal and Binary, Even Parity, Odd Parity and Hamming code is returned.I've managed to implement all of them except the latter with relative ease, I am familiar with the concept of Hamming code and can compute it easily by hand, but don't really know how to implement it as a function in my program. [code]

View 1 Replies

VS 2008 - Listview Selected Item Getting Error InvalidArgument=Value Of '0' Is Not Valid For 'index'?

Feb 12, 2010

I have this code

[code]...

And I select one and it works! But when I try to select a different one it comes up with an error on..If ListView2.SelectedItems.Item(0).Text = "None" Then
The error..InvalidArgument=Value of '0' is not valid for 'index'. Parameter name: index

View 2 Replies

Create An Import Program From CSV - Error "An Item With The Same Key Has Already Been Added" - Csvreader.fieldcount

Sep 8, 2010

I'm trying to create an import program from CSV. My code is

[Code]...

View 2 Replies

ComboBox - Calculating Total Amount Of Pay

Nov 15, 2011

These person is hired by her employee which it agree that the salary would be one penny the first day, two pennies the second day and four pennies the third day and continuing to double each day. I have to use a combo box to select the days that the employee will be working and calculate the total amount of pay that will received. Its not calculating right?

Dim intDay As Integer = 0
Dim intCount As Integer = 1
Dim decPay As Decimal = 0
Dim intNumDays As Integer
Dim dblTotal As Double = 0
[Code] .....

View 1 Replies

Get Selected Item Index Or A Sorted & Grouped List Relative To Item Source?

Feb 12, 2011

I'm having some difficulty with a sorted & grouped listbox in WPF vb.net 3.5 that has an items source bound to an ObservableCollection.

What I want to be able to do is to retrieve a piece of data from the ObservableCollection items source depending on what item in the listbox the user has selected.I've almost got it working but because the listbox is sorted it does not match the index of the items source.

[code]...

As I previously mentioned, because the lstBox is sorted and also grouped the index's don't match up.Does anyone know how I can get the correct information I want from the List Source depending on the selected item in the list box?

View 3 Replies

Click Event Procedure Should Display The Color Of The Item Whose Item Number Is Entered

Dec 13, 2009

the disply color buttons click even procedure shold display the color of the item whose item number is entered. all item numbers contail eactly five characters(12b12). my problem is i can not get it to disply a color in the lblcolor control. it displays the item number.

[Code]...

View 2 Replies

Forms :: Command To Auto Remove Item From Combobox If Item Is Blank?

Apr 3, 2011

I have used the command:

For Each Proc as process in process.getprocesses
Combobox1.Items.Add(Proc.MainWindowTitle)

to populate a combo box with the list of current process windows, however for every process that doesnt have a main window title there is a blank space, is there a way that I could tell it to not insert the item if it's mainwindowtitle field is blank?

View 7 Replies

Select An Item From A List Box And Click A Button And Have That Item Go Into Another Listbox With It's Price

Oct 13, 2011

How someone would select an item from a list box and click a button and have that item go into another listbox with it's price? I seem to be stuck on this part.

Here's my code:

I want to select the first option from the first listbox and I want to put it into another listbox along with the price of that item on the same line in the listbox. I can't seem to figure out how to that.

Public Class Form1
Const dcmPRICE_STRESS As Decimal = CDec(595.0)
Const dcmPRICE_TIME_MANAGMENT As Decimal = 695

[CODE]...

View 12 Replies

[2005] Change Cell Backcolor If Datagridview1.item.value = Datagridview2.item.value?

Feb 25, 2009

i want to make program like this:

if DataGridView1.item(SID).value = DataGridView2.item(SID).value then
color=green
else
color=red

i want all item list in DataGridView2.item(SID).value will be checked.

this is my

Private Sub PSCDataGridView_CellFormatting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles PSCDataGridView.CellFormatting
Dim myBL As String

[code]....

View 14 Replies

Check Combobox Item Then Change Labels To Item Selected

Oct 31, 2009

Just started on vb.net

I have a combo box with "yes" and "no" with i select Yes i want the label2 to change the text to "yes" likewise with "no"

I've tried to code it in a logical way as possible but it just doesn't works except for the "wtf" so i think that overall my code is correct but the way i want to retrieve the selected item from combo box is wrong.

Public Class Form1
Dim aa As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As

[Code].....

View 3 Replies

Edit Item Or Subitem Values Of A Selected Listview Item?

May 19, 2009

Ok, so I have a listview on one form, and when a button is pressed it opens up a new form with the contents of the selected listview item and it's subitems in a series of textboxes. The user can then change the data in the textboxes and either press save to make the changes or cancel to close the window. What command would I use to change the selected listview item and subitems to whatever is in the boxes?

this is the code that populates the boxes:

Private Sub Form_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim appeditcontents As String = main.passlist.SelectedItems(0).ToString

[Code]....

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved