VS 2008 Vending Machine Using Structures - Calculate The Change From The Structure

Aug 23, 2009

I'm having a little trouble working with structures and using a counter for the same structure. my structure gets its data from a text file which i readoff and assign ok. Here's part of my code

[Code]....

View 9 Replies


ADVERTISEMENT

[2008] Link 2 Parts Of My The Transaction Part Of Vending Machine?

Jan 12, 2009

I don't know really how to link 2 parts of my the transaction part of my vending machine and the restocking bit. Here is the The Restocking bit is basically adding to values from txtbx27 and 13 in the listbox and then showing the final value in the txb27, which i want to link with Transaction part of my code so that its possible to control machine's stock.

[code]...

View 4 Replies

Making A Vending Machine App?

Aug 15, 2009

I just started doing a semester of Visual Basic in college(australian), our first assignment is to make a vending machine app but so far we've only been taught basic coding such as making time converters and forms. I've tried to ask the teacher for help and she refuses to help us, she tells us its unfair. None of my friends in my class know where to start and everyone else is cheating of the internet. I just want to know how to start making the application. The vending machine must have 6 products with 10 of each, the user must put in 10c, 20c, 50c, 1 dollar and 2 dollars. Everytime the user buys something it must deduct 1. The must also be an admin function.

View 6 Replies

Vending Machine Repeating Error

Jul 14, 2009

I am currently creating a vending machine program, designed to simulate a vending machine. However I have come across a rather large error, my stock is 50 at the begging. The person can go though the program and the appropiate amount of stock is taken away from the relavent object, however when I finish and want to go back to the start the last selection is still present.Therefore I have tried setting the variable as 0 when the form opens and when the program starts, but the last selection is still present.Does anyone know of a way to which I can reset this calculation without affecting my stock so I can then repeat my program cycle one or two times each time using the previous stock without reseting back to 50

View 10 Replies

Adding Decimals (Vending Machine Account)

Apr 19, 2010

25, .10 and .5... I cant get it to add. All it will do when each button is hit for each ammount is display that amount. Very frustrating. Here is an example of my machine:

[Code]...

View 6 Replies

Logon Vending Machine - Purchases Deducted From Balance

Aug 26, 2010

I am making a Vending machine that requires you to logon and then you can purchase things and the purchases are deducted from your balance. The logon information as well as the balance is stored in an access file. I have the logon working well and understand everything except the things dealing with the balance. How can I make it so that when you logon it takes you to the purchase screen and The person you logged on as name and balance are shown on labels. I also don't know how to deal with balance. So when they log on and purchase the amount is detracted from their particular balance.

View 4 Replies

Pass Address Of A Structure Which Contains Addresses Of Othere Structures And Unions?

Jul 22, 2009

I am running into a problem which I am using C Dll into my VB.net code. I have .H file which shows implementation of this DLL in C language.This .H file contains many structures and unions that contain variable of some structures type. There is a main structure which contains the pointers to these structures and unions and finally address of main structure is passed into the dll function.

I am enable to figure out how to create structures and unions with marshalling in vb.net and how to pass address of a structure which contains addresses of othere structures and unions.

View 2 Replies

VS 2008 - Run Function Or Sub At Structure Change

May 11, 2010

I have a question: How can I make a function or sub run inside a structure when a variable in this structure changes? As example I have this function:
Public Structure Texture
Sub New(ByVal TexturePath As String)
Me.Path = TexturePath
Me.Image = LoadImage(TexturePath)
End Sub
Public Path As String
Public Image As Image
End Structure

And somewhere this happens:
Dim t As New Texture("path ooldfilename.tga")
t.Path = "path o
ewfilename.tga"
I want it to automatically load the image when the "Path" variable changes. Is the only solution making an extra sub and run that? It would really decrease my code size if it changes on variable change.

View 3 Replies

VS 2008 Convert The XML Structure Into A Class Structure?

Apr 25, 2010

I'm having a problem that's driving me crazy; I can't understand how to convert the XML structure into a class structure (that I want to use to hydrate a XML document).

The XML document looks like this:

xml
<?xml version="1.0" encoding="utf-8"?>
<artists xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns="http://www.spotify.com/ns/music/1">

[code]....

View 2 Replies

(2005) Arrays Of Structures Within Structures?

Jan 20, 2009

I have a structure called 'Scheme' and in my program I want (ideally) an ArrayList of 'Schemes' (so i can add, remove schemes etc.). However, within the 'Scheme' structure, I want to have an ArrayList of 'Item''Item' is another structure. Are there any solutions out there for iterating through these arrays quite easily?

How can I easily add multiple Items to a Scheme and mutliple Schemes to my Scheme array. Code is below. When I try to add Items to a Scheme, I get the 'Object not set to a reference of an object, try the 'New' keyword', but you cannot declare 'New' keywork within a structure.

[Code]...

View 4 Replies

Change Structure Of Code?

Aug 27, 2010

How do I change the program path '"logic.txt", "G:"' in the code below to the OpenFileDialog.FileName? Cos when I tried it, I receive String conversion errors and I tried altering the codes but it didn't work out well. [code]...

View 1 Replies

Calculate Percentage Of Change?

Jun 21, 2010

I'm developing a data logging application using VB for the actual logging to a MySQL database. I'm reading a value from a device and then running an insert query every minute. This is great but if the value doesnt change all day then my records are going to all be the same. I'd like to try and calculate the percentage of change on the value and only run the insert query if the percentage of change is greater than, say 5%.

View 2 Replies

Calculate The CRC32 Of A File And To Change It?

May 5, 2012

I want my program the be able to calculate the CRC32 of a file and to change it. I already have the CRC32 calculation class now I wanna know how to make it change the value.

CRC32 calculation class:

Code:
Private crc32Table() As Integer
Private Const BUFFER_SIZE As Integer = 1024I

[Code]....

View 1 Replies

IDE :: Size Parameters Change When Development Machine Has Different Screen Resolution?

Mar 18, 2010

We did development of a VB application on a machine with a high resolution screen. Also the machine where the real application runs has a high resolution screen. After a while we wanted to do minnor changes on the application and we wanted to use a low resolution laptop for that. When we opened the application for editing we saw that all forms changed their sized automatically AND unwanted.How can we build and change applications in one form size that does not change depending on the resolution of the machine on which edits are made?

View 2 Replies

Structures And Arrays In VB (VS 2008)?

Mar 14, 2010

I would be more that happy for someone to tell me I am missing something very simple here I am writing code that - amongst other things - talks to code on other servers using the tcpclient function in .net

What I want to do is - in essense very simply. I want to define a structure which includes an array load it with data and sent it to the other end of the socket.

[Code]...

View 4 Replies

Apply Change To Instance Of Structure Within Array?

Nov 5, 2011

So I have an array which holds instances of a structure. The structure contains various string properties.

I'm looking to modify each instance of a structure within this array by doing the following:

For Each stuInstance As StuInstance In arrStuInstances stuInstance.strCarName = "Benz"

But I found that this in fact fails to really change it permanently. If I do the following loops in the given order:For Each stuInstance As StuInstance In arrStuInstances

[Code]...

View 2 Replies

Structure Values Change In Multiple Places?

Mar 21, 2009

I have created two structures, one named "Product" and the other named "Item". These structures are quite similar but are at the same time quite different from each other. The structure definitions are as follows. Ultimately, I declare arrays in my containing class which access these structures as a type. Their declaration: "Products() as Product" and "Items() as Item". All has been fine and dandy until one day, I go to change the items Enabled() values, and something happens. Not only does it change the Items(index).Enabled(index) value, it does it on the corresponding Products(index).Enabled(index) value, even though it was never specified to do so. Also, nowhere in my coding have i defined this sort of thing to occur. It is rediculous, because I watch it happen. I turn on the watch window, and debug one step at a time, and every time, I watch the Item line step, I look down at the arrays of products and items, and both values have changed. How do I get this to stop, and only change the Item.Enable value??

<Serializable()> _
Public Structure Product
Public Name As String

[code]......

View 2 Replies

Calculate Minimum-coin Change For Transaction?

Feb 4, 2011

I am working on Visual Basic Express and I am supposed to calculate the change from a transaction.

View 1 Replies

Press Calculate The Program Should Display The Change

Sep 8, 2011

It is a cashier change return where the user enter the amount owed and the amount paid and when he/she press calculate the program should display the change due as well as the number of Dollars, Quarters, Dimes, Nickels, and pennies returned to the customer. When I run the program sometimes it gives me the right output and others it gives wrong output and it rounds the output. I just want to let you know that I have the option strict on. I will paste the code below

CODE:

View 1 Replies

Block Access For User To Change His Machine Address In C# .NET For Windows Forms

Nov 16, 2010

What i want is :

There is one windows app ( made in .NET 3.5, VS2008, C# ) for Windows XP SP2 & SP3

generally users can change there IP or modify their IP Address.

Now,when my apps starts i dont want users to change there IP Address untill my app stops.

View 3 Replies

VS 2008 - Looping Structures For Class

Dec 14, 2009

I have this Visual Basic class I'm taking online. At this point in the section all I'm supposed to know about are Do, Do While, Do Until, Exit Do, Continue Do, and For Next loops. So try not to go off in a fancy super-coder direction. And everything is (preferably) made through Console Applications on VBE 2008

Problem 1:
Write a program that evaluates the factorials of the integers from 1 to 10 using an appropriate data type. (factorials are... factorial of 1 is 1, factorial of 5 is 120, or 1*2*3*4*5=120)

Problem 2:
Make a diamond - 1 asterisk at the top, 9 asterisks at it's widest - using only nested For...Next statements to print the asterisks AND spaces, minimizing use of output statements.

View 4 Replies

VS 2008 Passing Structures Between Modules?

Apr 25, 2010

i have a main module called "main", within the module i have declared 2 other modules "Interfacing" and "Espec", within these 2 submodules they both have a structure called "coord" which is identical. The problem is that when i have defined a function in one module with "coord" as type and try to assign a value in the other module with coord type i get error message "Value of type Main.Interfacing.Coord cannot be converted to Main.Espec.Coord", so basically how could i pass that structure?

[Code]...

View 3 Replies

[2008] Running Arrays From Structures?

Feb 16, 2009

i am currently running a program that will allow me to save all data on the form to open and edit at will. It uses a structure of 8 arrays, each with 16 values to save the information.

When i try to save the text into the array, it tells me that its a bad record length and crashes.

Here is the

Public Structure save_weekly
<VBFixedString(8)> Public dates() As String
<VBFixedString(30)> Public description() As String

[Code].....

View 4 Replies

Change Calculator And Is Supposed To Calculate The Number Of Dollars?

Sep 16, 2011

I am trying to learn how to use the modulus operator.this excersise is a change calculator and is supposed to calculate the number of dollars , qtrs, dimes, nickels and pennies from the change that is calculated.

in the form if i put a value in for owed = 30.00 and paid 34.25 my dollars returned = 4 and that is correct but the number of qtrs = 0 and should be 1. I am not sure how to correctly use this - any assistance you can provide is great - this is purely educational

Private Sub btnCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalc.Click
Dim owed As Decimal
Dim paid As Decimal
Dim change As Decimal

[Code]...

View 8 Replies

VS 2008 Bubble Sort Array Structures?

Apr 15, 2009

I've learned about and understand HOW to do a bubble sort (theoretically), but I can't seem to wrap my head around how to use a bubble sort with array structures. I'm supposed to be able to sort the inputted student information (via textfile) using bubble sort and display the result in a listbox. Buttons for Sort by last name, sort by gpa, & sort by letter grade.

[Code]...

View 8 Replies

Handling Long Strings - Change The Query / Structure And Test It?

Jul 9, 2010

I develop in VB and often I'm writing long TSQL statements in SSMS but getting them into VB is a bit of a pain. I like SSMS during development because I can change the query / structure and test it when there are problems. Some of them become stored proceduresand some of them I just keep in the code.

I like keeping them in the code because when I have a problem with something, I can GREP my projects directory and find the code that does something (that I've forgotten) or someone asks something about how something works, I can look it up. I've yet to find a GREP for stored procedures. Is there such a thing?I've read in a "best practices" white paper how we're not supposed to concatenate super long strings with & _

[code]...

C# handles these things much better than VB. I'm wondering how I can keep my code together during development and searchable later. I had my hopes up when VS 2010 offered implicit line continuation, that this would help my multi line SQL procedures.Again, I was mistaken. Perhaps I could write it all on one line. I'd be interested in knowing if there's a feature that I am not aware of. Well there are certainly many features which I'm not aware of, but I was referring to "long strings".

View 2 Replies

Structures And Arrays Of Structures?

Jun 2, 2010

I read in the Book "Mastering Microsoft Visual Basic 2008" about "User-Defined data types".The example given is creating a Structure as follows.I wanted to check that so I wrote all the code given; I used a TextBox and a Button for this.(I didn't include the "CheckDate" here; that is in the book)

Structure CheckRecord
Dim CheckNumber As Integer

[code]....

The problem is this does work.What I get is "00000". and I found out that the "Checks(4)" Array does hold any value ie: on keeping the cursor over that, it shows "CheckAmount 0.0, CheckNumber 0 , CheckPaidTo Nothing ".

View 1 Replies

VS 2005 Make The Calculate Funtion Work Up Selection Change In Combobox?

Nov 21, 2009

I have a calculate function that adds twenty text boxes together a+b, etc... 20 +20, B changes value when a selection in combobx is changed, how can i make the calculate funtion work up selection change in combobox ? You would think the selection change or index change , but that doesnt work because the tetbox doesnt actually get the new value till after the combo selection is made, so you actually have to go and make the selection twice I know i can put the code in the textbox value change , but i dont want to do that for 20 text boxes and i am assuming there must be a BETTER way?

View 1 Replies

Cannot Access The Database From Server Machine To Client Machine Using .net 3.5?

Dec 9, 2010

I develop an application using vb.net.application will run on client server architecture.when we try to execute the program in client side then it will give me an error which is related to sqlclientexception.how can i handle this situation.i used vb.net 3.5 as front end and sql server 2000 as back end.i have done total coding with system.data.sqlclient namespace.

View 6 Replies

.Net Software Behaves Differently From Machine To Machine?

Dec 21, 2010

I've inherited a lot of custom made software for an office, and, while managing it, I've found it performs differently from machine to machine.I mean, some controls get painted in weird ways in some machines but well in another, or just work differently, like in some machines clicking something selects it, and in the next machine clicking the same thing makes it editable.I suspect, o course, of the myriad of DLL the software loads

View 2 Replies







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