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


ADVERTISEMENT

Mimicking Does A Simple Calculation Where It Takes Key And Plain Text Characters

Jan 31, 2011

I am trying to mimic an encryption application. The application I am mimicking does a simple calculation where it takes the key and the plain text characters 7 bit ascii code and xor's them together. If the two spots in the code are = then it returns a 0 if it is ~ then it returns a 1. I have tried several code snippets for xor and none of them produce the results I want. I have only taken a couple programming classes so I get lost easy. This is what I have so far. My goal is to decrypt something encrypted by the program I am replicating using a password generator to come up with the key.I already have the binary for the encrypted text from the program I am copying. So I need to convert the key into the matching binary format. I used this snippet for that. [code] When I run this as is I get a much longer result than I should. If I use an "a" as my key and "00000000" as my cipher bi the result is "0011000000110000001100000011000000110000001100000011000000110000" when it should be "01100001".

View 14 Replies

Flash Card Program - Type All The Words On A Text File And Have The Program Randomly Pull One Of Them

Feb 15, 2009

Anyway, I'm a teacher and am writing a program that simply shows kids a word on a flashcard. There are 2 buttons, 1 to read the word and 1 to go to a new work. There are going to be 300 words. Really I'm just testing it right here. What I want to know is should I be inputting all the words right into the code like I did with "hi" and "not 1" (Don't ask. those are just the 2 random words I picked to test this out with). OR is there a better way (maybe somehow to type all the words on a text file and have the program randomly pull one of them (I don't know how to do this).

Here is the code so far:

Public Class Form1
Dim word
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[CODE]...

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

When The Text Is More Then 9 Characters Then It Work?

Dec 29, 2009

If TextBox1.Text.Length < 9 Then it have 1 charakter and it work i need that when the text is more then 9 charakters then it work.

View 6 Replies

Make A Program That Randomly Selects A Name?

Dec 15, 2011

I am trying to make a program that randomly selects a name. i have a prompt that allows me to enter the number of names and the names themselves. but i dont know how to save or open the information into an array... can anyone help me with this?

View 14 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

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

VS 2008 Work Around Max Characters Of Combobox?

Dec 22, 2009

I have 35.000 lines I want to add to a combobox, but this is too much... so I thought maybe there is a way to let the users type the first letter, and then show all the possibilities with that first letter. [URL]..Here I already found some information, but I can't get it to work.

View 2 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

VS 2010 Randomizing - Program Randomly Choose Questions - NEVER Choose Same Question In Same Program

Dec 20, 2011

I am currently working on a family project which is based on "Who Wants To Be A Millionaire?" show. There is a huge diffrence between the show and my project. My project is a christmas edition and the goal is not to get money or something, since I will not add it... Erhmm... Let me get to the point. I have already designed a layout and scripted some things. I have about thirty questions but I do not want them to always spawn in the same array, if you know what I mean. I want the program to randomly choose one of those thirty questions and NEVER choose the same question in the same program run. By the way, there are four options on my project: A, B, C and D. I have got everything, I just need a code.

View 3 Replies

VS 2005 Educational VB App Doesn't Work With Characters : % ^ & { } [ ] # ` �?

Dec 19, 2010

I am a complete beginner with Visual Basic, I am attempting to continue where the original creator left off. His project is finished but he didnt (and still doesnt) have time to fix a couple of bugs with his code....Basically, he has written a small VB application that closes SWF flash files if the CRC matches from a list... So when an SWF is loaded into explorer the SWF is hash checked and then closed if it matches from the "hashcheck.txt" file.

All is working apart from 2 small bugs:

1) %^&{}[]#`� - dont work.Ive found that If there is any of these charactors in the folder or filename structure the file doesnt get checked/closed.

2) Network paths do not work.. (maybe is part of above bug?)

N: est_folder estfile.swf <-- works perfectly
\pcshare est_folder estfile.swf <-- doesnt work

View 24 Replies

Work Out What Characters Are Allowed In A Field With A VAM:RegexValidator?

Jan 11, 2012

I am investigating an issue with regards to a textbox rejecting user input. In this case the error message is: 'The note was found to contain a possible credit card PAN.'Now obviously this is a custom validator but I am enable to find where it tells me what characters ARE allowed? In debug I entered a note containing no numbers and when the validators are initialized, these variables have the value below:

valNoteContainsPAN.Expression = Me.PANRegEx value = (d*)45367{13,15}(?!d)

I'm assuming this is blocking numbers of certain lengths? How can I find out how to actually read and understand the above? Google is proving fruitless

View 1 Replies

Randomly Input A Text Line From A .txt To Different Labels In Program?

Jan 6, 2010

Looking for a bit of help with some code im working on. I want to randomly input a text line from a .txt to different labels in my program. So far i have this:

Dim FILE_NAME As String = "question.txt"If System.IO.File.Exists(FILE_NAME) = True Then Dim objReader As New System.IO.StreamReader(FILE_NAME)

[Code]...

This works perfectly, but as you can see there is no randomization, it just runs through each line. I want one out of every three lines to be chosen. My text file, on each line, has question tab answer tab answer tab answer tab answer tab correct answer. So for the first inputted question i want it to chose one of the first three lines, second question chose a line between line 4,5 and 6. etc.

View 1 Replies

Write A Program That Randomly Selects A Picture Of A Flag?

Aug 20, 2009

I am having to write a program that randomly selects a picture of a flag. Then the corresponding country needs to be selected and a message box letting them know if they have the right answer or not. I know this isn't near completion but I am stuck on assigning the pictures to the array. The problem I am getting is in the 5 lines like this "Flags(0,0) = My.Resources.USA". VB isn't liking the Flags(0,0) it is saying that a "declaration is expected." The other problem is in this line "PictureBox = Flags(0, x)" the error is "Value of type 'String' cannot be converted to 'System.Windows.Forms.PictureBox'".

[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

Make A Program That Randomly Chooses A Roller Coaster And Displays It?

Jul 29, 2010

i want to make a program that randomly chooses a roller coaster and displays it. I want a hidden textbox1 with rollercoaster names (line by line) and then i want a user to click a button and it will randomly show the name of a rollercoaster in textbox2.

View 8 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

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

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

EXE Program Don't Work Debudding Of Program Work

Jan 8, 2012

I'm building a VB(2010) program to create the graphics for my laserprojector.The program works when I debug it in VB, but when I run the EXE program in the release directory, it doesn't work. The problem in the EXE program is theat I can't draw/view graphics in the picturebox..I coppied my whole program to a new VB project, but I'm having the same problem...In the original project, where the program works, there are no warnings or errors.

View 3 Replies

CAI Program - Display Question "How Much Is _ X _?" With _ Being A Randomly Generated Number Between 0-9 - Label

Jan 28, 2011

Basically, I'm not sure if I'm thinking along the correct lines when trying to break this down. The program is supposed to display the question "How much is _ x _?" with _ being a randomly generated number between 0-9 which I have in a label. The student inputs the answer and clicks the "Answer" button. If he gets it right, the label below outputs "Very Good!" and automatically puts a new question in the above label. If the student gets it incorrect, the output is "No, Please try again." and the student keeps trying until the question is answered correctly.

My method of thinking on this is that the random.object generator is input first so the question with the numbers are output in the first label. Then, under the Sub answer.button, enter the statements that will either check and refer to the above statements to get a new question or have the student try again until it's answered correctly. One of the other criteria for this is that I have to use a function for the calculation. Would the function statement, because it has to return a value, go before the answer.button code or after?

View 8 Replies

VS - Program Doesn't Work Though Flash Player - When Click On Icon Of Program - Shows Error Message

Sep 30, 2010

I am really confused! My program doesn't work if I don't have Visual Studio here in my PC. To test it I have uninstalled Visual Studio. But my program doesn't work though Flash Player is present there (I have used Flash animation in the first form).

To be more sure about it I have installed Flash. But it's not working! That means the Flash animation file (.swf) is not making a problem! It needs support from Visual Studio to start. Doesn't it mean that some files are not attached with a setup file as a result it needs Visual Studio to run? Let me tell you how I create a setup file of my program.

CODE:

When I click on the icon of my program it shows the error message

CODE:

Reporting details: This error report includes information regarding the condition of WindowsApplication1. When the problem occurred the operating system version and computer hardware is use; your Digital Product ID, which could be used to identify your license; and the Internet Protocol(IP) anddress of your computer.

View 1 Replies







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