VS 2008 Repeat The Function Of The Button The Number Of Times As In The Textbox
Aug 26, 2011
I need a textbox where you can add a number and if you press a button that it will repeat the function of the button the number of times as in the textbox.
View 9 Replies
ADVERTISEMENT
Nov 21, 2010
i am trying to make a coin toss program where you toss a coin a certain number of times then repeat it a certain number of times.
the problem i have is "heads(counter2)" the word "heads" has a blue error line under it how do i sort the error out and also is all the code right
Public Class Form1
Dim tosses, repeat, heads As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
[code]....
View 1 Replies
Apr 10, 2011
This text book i have is not very good at all. the exercise's at the end of each chapter ask u to code projects without first covering the basic of what u will need do to code them. (Programming in Visual Basic 2008 Julia Case Bradley + Aninta C. Millspaugh)
Design and code a project to calculate the amount due and provide a summaray of rentals. All movies rent for $1.00 and all customers receive a %10 discount. The form should contain input for the member number and the number of movies rented. INside a groupbox display the rental amount, the 10 percent discount, and the amount due. inside a second groupbox, display the number of customers served and the total rental income.(afterdiscount).Include buttons for Calculate, clear, print and exit. The clear button clears the information for the current rental but does not clear the sumarry information. A print button allows the user to print the form. Do not allow bad input data to cancel the program; instead display a message to the user.[code]...
View 1 Replies
Apr 19, 2012
I am designing a rdlc report in vs2008 for windows application. I want to display the purchase and sales based on department. If i select one department it works fine but have no idea about how to display each department's purchase and sales data in different tables. I have used embedded resource to the report. Report is designed based on the DataTable(on dataset - xsd file) and which contains, ITEMS,Purchase,Sales and Net as Fields. I have attached an image with describes the format that i want to display.
View 1 Replies
Mar 14, 2011
I am writing a numerical model to perform a set of calculations within a unit, pass the output to a new unit and perform the same calculations and so on. To do so, I have created a complicated set of functions. I have various arrays which store function outputs that are used for other functions within the program. I am trying to modify the language of the program so the functions can be repeated for each unit without literally repeating each code sequence with modified variable identities. For example:
for x = 1 to 5
for z = 0 to 2
y(z) = 3x +6
[Code]....
View 6 Replies
Jan 31, 2009
I want to make a autotyper and I was wondering how would I make The words I am writing in the textbox be set to a number of times? EX.- say I want to write a word only 10 times instead of it keep repeating..
View 9 Replies
Mar 22, 2011
I have set up text boxes for user to pick a number 1-20 and to enter a word as well. Then, press submit button. What's supposed to display in result textbox is the word that many number of times. For example if the number is 5 and the word is hello, then "hellohellohellohellohello" should appear. I don't know how to complete my For...Next function to append the word to the result.
Public Class Ch6ex1
Private Sub btnsubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsubmit.Click
[CODE].....................
View 5 Replies
Feb 8, 2012
The List Box has three candidates and a record Button. Every time the record button is hit I need it to add those button clicks for each candidate that is selected in the List Box. My code keeps counting all the clicks no matter which candidate I am selecting in the List Box. How can I differentiate between each selected item in the List Box. Here is an image of how the application should look: [URL] Public Class Form1
[Code]...
View 1 Replies
Mar 8, 2010
Why isn't this working? The number shown on the label gets stuck at 1 no matter how many times I press the button. [code]
View 5 Replies
Feb 21, 2009
I'm having trouble using the Random class. I have this [code]...
I have this code in a function and everytime I call it it return a random number. The problem is I only want the number to be return/generate once. There be times I call the function and it returns the same number as in the pass. Is there a way to random the number once? I know in C++ you use like "Seed" or something and it will only generate once.
View 6 Replies
Aug 2, 2009
I would like to generate a random number less than 50, but once that number has beengenerated I would like it so that it cannot be generated again.
View 3 Replies
Nov 29, 2011
I'm trying to write a function where if the number in the first textbox is greater than the number in the second textbox.the result shows that it is "True", otherwise, it will show "False."
This is what I have so far:
[Code]...
What am I suppose to put in the Button coding? Or is what I have wrong? I don't know.
View 4 Replies
Oct 6, 2011
Using VB.Net
I am having the form name as "Employee Entry"
User want to open a Employee Entry from in 5 tabs...
For Example
When the user open a Employee Entry form, while entering the details at that same time, user again open a employee entry form (2nd Employee entry form show like a new employee entry from with out any details)[code]....
View 1 Replies
Nov 6, 2010
Best way to repeat a character in C#
I wonder if there is a function that returns x times of given char or string. Or I must code it?
View 3 Replies
Sep 17, 2011
I have this program generating a firstname and lastname from a file. When I run this program I enter information in three textboxes. The first two are the salary low and high(salary1.text, salary2.text) and the last one is the number of "copies"(copies.text) that I want.. When I put a number such as 10 in the text box it outputs some of the same names. The firstname file has around 100 records and the lastname file has about 1000 records Why is it generating the same name The problem is even worse if I do something like 1000 copies.. it outputs the same thing 8 times and then does something different another 8 times
Public Class Form1
Dim sex As String
Function randomfirstname()
Dim infile As IO.StreamReader
[code]....
View 1 Replies
Oct 17, 2009
I have a simple program that takes the number of students and calc's the avg. It is suppose to add one student,(female, male,all) with each button click and update the avg. I have a loop set up to do this but I don't know how to get my do/while to work once, each time I press my calc button or can't it be done this way?
I'll try to past my code so far:Public Class frmMain
[Code]...
View 1 Replies
Feb 17, 2011
I'm trying to make a mastermind game program with visual basic. I started of creating the combination maker for the start of the game. Hoever, in my version i don't want any colors to repeat. I used the random function independently to get numbers from 1 to 6. Each number has a corresponding color. The problem, the values still repeat sometimes.
Here's my code for that part:
Randomize
a = Fix(Rnd * 6) + 1
txtA = a
If a = 1 Then
[CODE]...
View 2 Replies
Oct 17, 2009
I have a simple project that calculates the grade avg of male, female, and both using a listbox and radio buttoms for male and female. The program needs to update each time I use my btnCalculate button by adding one student and updating the avg.MY question is how to I get my do/while loop to work each time by just hitting my calc button? [code]
View 1 Replies
Mar 2, 2010
Im trying to make a game that is like where you have to go a path with buttons and I need the code for it. It is like a game what 4 buttons then when you click the right button you go to the next form and so on
View 1 Replies
Mar 28, 2012
I was wondering if there is a way to run a sub/function from a textbox and button combo.
So say you had
HTML
Public Sub XX()
I would want to be able to put XX in the text box click the button and whatever was in sub xx would run.
View 8 Replies
Jun 10, 2011
im a bit new on asking questions if you have a hard time reading this ill try and make t a bit clear for you but anyways.with this code in a button it lowers the number in the textbox and then counts back up
[Code]...
View 9 Replies
Oct 22, 2009
I have a textbox that reads like so:
Line 1
Line 2
Line 3
[code]....
How can I use VB to loop through the textbox, deleting Lines 1, 2, and 3, skipping the fourth, and repeat? Or, rather, record every fourth line into a new textarea?
View 4 Replies
Feb 17, 2010
I recently used the "d" of regex to find a 6 number digit. In this scenario I knew the digit was 6 numbers long. What about when I don't know how long the items is I am looking for?In the HTML code I am searching through is as follows:
<a href="player.php">
USERNAME</a>
[code]....
View 8 Replies
Apr 16, 2011
I want to ask about the VB. NET Array
I want to create an array and Textbox & Button Array consisting of one thousand number and Letter( one thousand )
From 0 - 9
and
From A - Z
When i press on Button, I want to see one thousand random number Every time the numbers must changed! Except the location 400 and 410 for example i want to see in the location 400 " 7 " for example and in the location 410 "Y" for example
View 8 Replies
Jun 22, 2010
how to do array of textboxes when a user input a number of textbox to be loaded and when the button clicked, the array of textbox that the user enters will appear?
View 1 Replies
Jan 5, 2010
How do I (programmatically) find out the key repeat delay and key repeat rate for a system?
A solution that works on any/all .Net capable platforms would be ideal, but the key target OSes would be XP, Vista, and 7.
View 1 Replies
Mar 4, 2011
I am doing a bar cash register and I want to use a if statement to see if fosters button and number 1 on the number pad are both pressed then multiply constant by quantity number
View 1 Replies
Aug 16, 2009
So how would I use .next (random numbers) to randomly select something from a list of numbers but it can't repeat the number?I could do:
dim num as integer
dim r as new random
num = r.next(1,5)
if num = 1 then
elseif num = 2 then
etc.
That wouldn't work because it would repeat.If I donwload someone's game can I disect it in VS? :0 I tried going to open project, then I went to the folder and clicked open. It brought me inside of the folder so I tried to open the game but there is no form1 there. It says the games name then .exe in the explorer-like thing in the top right?Also, how would I have a value or something in a label and access it from a button.
Example:This is in a label.
Dim number as Integer
number = 0
Then in the button do
Label.number = 0
How would I do something like that? I want to use that a lot as I did in a different language.
View 6 Replies
Jul 16, 2009
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim timeN As DateTime
Dim timeF As Date = #7/11/2009 12:43:20 PM#
Dim timeR As TimeSpan
timeN = DateAndTime.Now
timeR = ?????
End Sub
End Class
TimeN is system time. TimeF is a fixed date and time. All I need is the number of seconds between fixed and system(now) for timeR (and counting).
View 5 Replies
Feb 22, 2009
I created a access table with three fields, CustomerID, FirstName, LastNameI set the CustomerID field to the primary key and the type of AutonumberIn my VB app I dragged the three fields over to my form.I clicked on the plus sign at the top and it displayed -1 in the customer field, I entered a First Name and a Last Name and press the save button. I repeated the process 2 more times and the CustomerID field went from -2 to -3.I looked at my table in acces and all three records showed 1, 2 & 3 as it should. When I exited the form and then open the form again it shows record numbers 1, 2 & 3 as it should.How come it takes exiting the form and then back in to see the correct CustomerID's ?
View 4 Replies