Writing A Program Which Takes One Item From Each Of Two Lists?

Jun 11, 2011

I'm writing a program which takes one item from each of two lists and combines the items in one of three ways selected by the user. The results of the process are provided in either a summary form or a detailed form, again selected by the user. As it's currently developing, this program will contain six subroutines covering each of the six combinations of user selections, which are stored in three Booleans. Selection of the appropriate subroutine is done through traditional "if then else" coding.If I understand OO and Visual Basic (Express 2008) correctly, I could make the subroutines into different variations of one method, which when invoked would automagically use the correct coding depending upon the settings of the Booleans / properties. Assuming this is correct, the problem is that I have no idea how to actually set up code like this.

View 4 Replies


ADVERTISEMENT

Drop Downbox Only Lists One Item?

Nov 20, 2010

I'm using Visual Studio for the first time and VB. I have programed for awhile, but mostly new to windows related softwares. I have an access database connected to my test application and I am trying to display a drop down box with a listing of the item names in my table and the value that is sent off to my database is the actual item id. I can figure out the database part in terms of adding and editing, but I haven't been able to figure out how to display the full list. If I click the next button the list that is generated it displays the next item, but I would rather just list all items in the drop down box and remove that toolbar all together.

View 1 Replies

Formatting XML Data - Item Lists

Dec 29, 2009

I have an XML file that looks like this.

[Code]...

i will need to get every food that is associated with almond, with american cheese, apple etc.. i will be reading the data with vb.net

View 2 Replies

Program That Takes Data From A Survey In The Program?

Jul 7, 2010

I am working on a program that takes data from a survey in the program and needs to compile it into a PDF file. Optimally it would just be a snapshot of the filled out survey. I tried using the PrintForm component in the PowerPacks section, but I need a PDF not an EPS.

View 1 Replies

Program Takes All Cpu?

May 10, 2010

A couple days, I figured up a working program and it was def. faster than what we needed. Now, adding a couple more loops, the program barely uses any memory, but the cpu used spikes up to 90+ and just letting it sit doesn't help.I tried taking out the couple loops I put in, but it does not revert back to being fast. It's nothing big, but since dealing with 1000+ excel files a day, I'd rather not do that by hand.

how many infinite loops vb.net can support without dragging down the system? I know, infinite loops are poor design, but it works.

View 11 Replies

Program That Takes A SSN Into A Number Field?

Oct 26, 2009

I am writing a program that takes a SSN into a number field.Issue is when a SSN is entered with a leading 0. Ex. 012-34-5678 The zero is cut off and turns it into an 8 byte field, which is not good for SSN obviously.What can I do to prevent this from happening?

View 10 Replies

Write A Program That Takes Three Values Then Uses Them At Once?

Jan 22, 2011

How would i write a program that takes three values X Y and Symbol. the program is supposed to display a rectangle which is X

View 1 Replies

Can't Get The Program To Work - Randomly Takes Characters?

Nov 20, 2009

I am not recieving any errors, but the program is not doing what I had expected. I wish to make a program that randomly takes characters (well, not completely randomly. I used the table of letter frequency from wikipedia and included that data in my program by figuring out the max for the random numbers from the percentages in the wikipedia chart.) and adds them to a long list of characters ands saves the file every 5 minutes. I have calculated the timer interval so that the number of miliseconds shown is equal to 5 minutes. I am getting the textwindow, and it is showing (rather rapidly, as I need it to be) a long random list of characters (including spaces). The problems are (A) I am having difficulty saving the text as a file. You'll find the code that is supposed to do that at the bottom. The other problem I am having is once so many characters are added, the ones at the top start disappearing. I would scroll to the top, and each time I did so the letters at the top had changed (this is all during the same test), but I need all characters to be stored when the file saves. Granted, I haven't actually seen one of the saved files as I have not figured out how to make that work. One other thing, not sure if it's important, I haven't run a published version yet. I've only been running the debug builds. Does that affect how it handles actions with files?

Module RandomModule
Dim X, Y, contents As Primitive
Sub Main()[code].......

View 4 Replies

Terminate Code That Takes Long In Program?

Oct 25, 2010

How to terminate function/code (not entire page) when it takes some time, for example, more than 1 sec?[code]...

I found the command "Server.ScriptTimeou", but it stops the entire page instead of one command.

View 2 Replies

Working On A Program That Takes Input From A Textbox?

Aug 31, 2011

I've been working on a program that takes input from a textbox, removes the punctuation, puts the words into an array (using the split method), and compares the array against a reversed copy of itself to determine if it is a word palindrome or not. I understand the logic, but I'm getting kind of caught up as far as what code to us. This is what I have so far, but no matter what I enter into the text box, nothing happens. I'm completely lost as to what I'm doing wrong.

[Code]...

View 4 Replies

Make A Program That Simply Takes Current Date?

May 9, 2010

i need to make a program that simply takes current date and the input date (users birth date) from the user both as i integer then if the users is 18 or more then the back color turns green otherwise turns red.

Code:
Public Class Form1
Dim int_ThisDay, int_BirthDay, int_ThisMonth, int_BirthMonth, int_ThisYear, int_BirthYear, int_DifYear, int_DifMonth, int_DifDay As Integer

[Code]....

View 3 Replies

Make A Program That Takes Old Records From Access And Moves Them To MySQL?

Feb 2, 2012

I'm trying to make a program that takes my old records from Access and moves them to MySQL. Its supposed to take records from 3 different tables in Access to 3 different tables in MySQL. The first table is "Orders" and it sorts the ones to pull to the dataset, taxDS, by "Where Status = 'Waiting Payment' OR 'Cancelled'". Then the second table pulls its info(this is where i'm having trouble) by the "Control_Number" in the "Orders" table, so basically if the control number isnt already in the dataset its not going to pull the data into the new table "FNF Taxes".

Imports System.Data.OleDb
Imports MySql.Data.MySqlClient
Public Class Backup

[code]....

So now after my 3rd edit and no answers, I'm finally at the point where I'm only stuck on my For..Next statement not working, How can i get this statement to run for each 24,000 controlnumbers?

View 7 Replies

Write A Program That Takes A String Of Bits And Encrypts It Using DES Encryption?

Feb 19, 2010

Alright, So ive returned to using vb after several years now. Ive programed in VB6.0 years ago and I was quite proficient at it. However after returning to vb (now using Visual Studio 2010). Either Ive forgotten everything, or something has changed. For a university project. Im trying to write a program that takes a string of bits and encrypts it using DES Encryption.

[Code]...

View 3 Replies

VS 2008 Make A Program Which Takes A Bunch Of Inputs (Name, Age, X2 Score Results)?

Mar 12, 2011

I've recently started programming for Visual Basic Express - 2008, and I'm currently trying to make a program which takes a bunch of inputs (Name, Age, x2 score results) and then turns this into an output at the end which varies depending on the score results.

I've stumbled upon a small hinderance, which is that the very final stage which has a Console.Writeline does not appear after testing the program. So, everything else functions fine, but as soon as it gets past the "Console.WriteLine("All pupils have been calculated, the results are...")" command the program closes itself.I'm not looking for much help, just wondering exactly what is causing this to happen. I also realise that my coding is sub-par and is coded in a slightly odd fashion, but I'd rather just get this one to work and use the mistakes from this one to correct my future work.

View 5 Replies

Clear The Recently Opened Program Lists In The Start Menu?

Feb 2, 2011

How do you clear the Recently Opened Program Lists in the start menu?

I've been making a computer cleaner, and I've Googeling and I guess binging so much to find an answer but i couldn't, does any1 know how?

The most I could find was: [URL]

BTW I know how to clear it, but I need to know with VB code.

View 2 Replies

Writing To File And Selecting An Item Using A Dropdown Box?

Mar 27, 2011

My program that I'm creating is a quiz creation tool, based for teachers to create quizzes and then use them to aid with quizzing their students.I've got the whole program working in that you can create quiz, play the quiz and then see how many questions were answers correctly and how many questions their were The problem I'm having is that I don't know how I can save multiple quizzes, for example you can create one quiz, that then saves as a .txt in debug however, when you then create another quiz and click the save file the old quiz details are sitting in the .txt

Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
Dim filename As String 'full file/path name for QuizRecords.txt
Dim index As Short 'loop control variable

[code]....

So what I'd like it to do is, when saved create another text file? Or another set of data questions, I have been looking through my Computing projects in Visual Basic . NET book as well as through online but I can't find anything that I understand as such.

View 2 Replies

Create A Program That Takes An Amount Entered By The User And Then Convert It Into Half Dollars?

Oct 13, 2010

Im trying to create a program that takes an amount entered by the user and then convert it into Half Dollars, quarters, dimes, nickles, and pennies when the calculate button is clicked. Each coin has its own function and is shown in separate text boxes... right now i cant get it to work correctly. When i try to get half dollars to work it rounds up and then the rest of the coins say 0. How should i do this?

View 5 Replies

VS 2010 Make A Program Which Access The Internet And Takes The Source Code From The Webpage

Mar 6, 2011

I've been trying to make a program which access the internet and takes the source code from the webpage. I've copied this code from the internet:

[Code]...

View 2 Replies

Event Vs Recursion - Program That Has A Large Set Of Classes In It - Each Class Will Need To Add One Or More Strings To One Of Two Lists

Mar 14, 2010

I have a program that has a large set of classes in it. A certain incident (I won't call it an event, yet, as that has a specific meaning that will cause trouble later) needs to a relatively small subset of these classes a question. The subset of classes will need to respond to the question, but for it to be able to do so, the classes may first need to ask a similar question of the same subset, which may prompt yet a further question, though this recursion will never go more than three or four levels down. Since only a small subset of these classes will participate in the questions, while the majority will never participate, and since all of these classes are virtually identical, and I can know at design time whether any given class is part of the subset or not, an event is appropriate. The main class can raise an event, and those classes in the subset can handle the event, while those classes that are not in the subset won't handle the event. Furthermore, any of these classes can raise the event again with different parameters, as needed. Thus far, an event appears to be ideal.

The problem is this: As a result of the event, each class will need to add one or more strings to one of two lists. Event handlers can't return anything, so I can't be using the return values from functions to populate these lists.

Two options appear possible:

1) Include the two lists in the event arguments.

2) Have the two lists be accessible to all classes, and don't pass anything around.

The second part of the problem is that the event is effectively a question being asked of each class, and no action can be taken until each class has responded. If I simply raise an event and let each class respond, can I be certain that all classes that should respond have? An alternative solution would be to have each class expose a method, and call these methods for each class in turn. By doing this, I could get return values, but I would have to call the methods for ALL the classes, not just the subset that actually cares (the classes are all different types, but they all implement a common interface, and are added to a List (of ) that interface, so I can iterate through them all without much difficulty). So, the event seems more efficient, but adding a function to the common interface for the classes is the approach most certain of being a solution.

View 7 Replies

Forms :: Listbox - Program That Takes Common Applications And Installs Them Silently Using Batch Files

Aug 21, 2010

I'm making a program that takes common applications and installs them silently using batch files. Someone would select the programs they would want to install and my program will write a giant batch file and execute it to install whatever they want. Heres the problem, After the user selects the programs they go into either one or two lists. Non Silent Installer List Or Silent installer list.

Some programs I have simply won't go silently so from there they can choose in what order they want to install these programs. Then there is a combo box that tells weather you want to install non silent programs first or last. From there you hit add to batch file and it would add everything in listbox1 and listbox2 in order. Listbox1 would contain just the text "MalwareBytes" for example. Along with Novell Groupwise and Firefox. How do I get that to add to the Batch List as a code and in order? So the user wants Malware bytes added first to the batch file. How do I add that to my batch list as a completely different code?

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

View 8 Replies

Write A Program In VB 2008 Express That Takes An User Entry From A Textbox And Strips Out All The Spaces?

May 10, 2011

I need to write a program in VB 2008 express that takes an user entry from a textbox and strips out all the spaces, changes it to either all upper case or all lower case then checks to see if it is a palindrome. I must also include a loop structure and a decision structure. I have seen bits and pieces of code but I do not really know how to put them together. Basically I need it from the button click to the end. ?

View 3 Replies

Sorting 2 Lists Based On Only One Of The Lists?

Apr 1, 2011

I have two lists. One list is a list of names, the other list is a list of how many times each name is found in the first list noted in the database

so...
Nick
John
Jim
Jack

is the firs tlist

10
13
13
2

is the second list. Nick had 10, john 13 and so on.I want to sort the second list from large to small, but have the index for the first list still linked to the correct amount of calls.i do it this way so I can

for x = 0 to num_of_names
string = lst_name(x) & "-" & lst_count(x)
next x

View 3 Replies

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

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

Program Temporarily Writing To DB?

Jun 24, 2009

I wrote the code and it runs through it perfectly, the problem is that it will only save it to the database temporarily. So once I close down visual studio for the night and come back to it what's been entered is gone. It's not a published program still in debug mode but I've not run into this before. I have another program I'm working on that I'm running purely in debug mode and it works flawlessly. The code between the two is the same cause I just copied it and changed the parameters. Any ideas? I'm using an sql mdf btw.I should clarify, don't know if it matters or not, that the DB that is working is in SQL server whereas the DB I'm having trouble with is a mdf that I added into the program.

View 3 Replies

Writing A Program For Salesperson

Mar 23, 2011

Ok this is what I have so far. Now the numbers are not adding up at all. When I type in the name and it ask for the code then the monthly sales and commission are at 0 and they should be. [code]

View 4 Replies

Writing To Sql And Program Crashes

Jan 7, 2011

This is a program I am making for a game he is making. All it needs to do is add information from textboxes into sql fields when clicking create account. That is working perfectly however if I tell it to add an account a second time it crashes. saying ?

[Code]...

View 2 Replies

Know If An Array Of Lists Contains Similar Items (similar Lists)?

May 20, 2010

I know how to check whether an item exists in a list using (MyList.Contains), But I do not know how to check the whole list. For example (use one button and one richtextbox):

[Code]...

View 14 Replies

Program Works Writing Error?

Mar 29, 2010

Just completed a program, and tested it. It works, and does exactly what its supposed to do, but I continue to get this error: Cannot Write to a closed TextWriter.The code I'm using is below, but the issue here which I'm guessing would be that in my If statement.[code]'Goes on to create a bunch of tabled XML text.I have this code copied throughout each If Then loop. Basically If the text box is blank then the program will close the table and stop writing.I know the problem most probably lies in that its reading that its trying to close the table or stop writing, but the program forces it to continue.

View 9 Replies

Forms :: Writing A Marketing Email Program?

Feb 8, 2011

I am writing a Marketing email program so we can email news letters and the lke to customer listed in our database.One part of the application is a email templates page. On this there is a tabpage. Tab1 has a textbox and teb2 has a browser window.The user pastes/write HTML code in to the text box and it displays the formatted email/html in the browsers window.

The users just want to edit the text from time to time and within VS.NET and TEXPAD the html code is colour coded depending on the html tags.I guess this can not be done in my textbox1 but can it be done in a rictextbox and text_change event?

View 2 Replies







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