Get A Text Box To Show The Word The Same Number Of Time As The Number Selected Using Loops?
Nov 2, 2011
In VB if you prompt the user for a number between 1-20, then a word, how do you get a text box to show the word the same number of time as the number selected using loops?... Ex: please select a number: 4 / select a word: cat....the text box should display ::: catcatcatcat ........
I am doing this for a class and my brain has locked up. Prob. just over thinking it though. Thanks in advance for any help!
View 6 Replies
ADVERTISEMENT
Mar 3, 2010
I am trying to filter a dataset using a number different inputs, selected by a number of check boxes. I have all the text base rowfilters working, but I can not make the date filter work unless I hard code the datetime into the code. The database is MS Access and I am using VB2008 to show the data. I would like to be able to use a DateTimePicker to set the filter date (without the time part) Also I would need to remove the time section of the datEnterDate. I cannot change the structure of the database fields. Also the datEnterDate is MM/dd/yyyy, because I'm in England I would like to use the format of dd/MM/yyyy if possible
[Code]...
View 10 Replies
Sep 21, 2010
I'm developing a policy administration system and I need to generate a unique policy in this formart
RP000000/HH
Where R is the Region i select from a Combobox, P is the product the client chooses and the auto generated six digit number and HH is the hour when the record was entered in the system. I want the auto generated number to be the ID in my ClientDetails table in my DB.Here is my code of what I have done so far.They want to be able to tell the region and the product by just looking at the policy number.
Private Function PolicyNumber(ByVal intRegion As Int16, ByVal intProductCover As Int16) As String
PolicyNumber = intRegion.ToString & intProductCover.ToString & "000000" & "/" & Hour(Now).ToString
End Function
[code]....
View 2 Replies
May 28, 2011
converting the number of frames (in a video) to a number/time format. For instance, say a video has 110,212 frames at 23.976 fps, it works out to 01:16:36 (hh:mm:ss) with 18 frames remaining. I would like to format the result in a Textbox like the following:
[Code]...
View 3 Replies
Jan 31, 2009
I created a listbox using VB.NET. When the user select an item (it is a string format) in the listbox and click on a button, there will be a number beside the string and the number will increment which time the button is clicked. Anyone know how to do it...?Below is the coding I'd done, but I don't know how to do the increment part. Anyone know what coding I need to add?
Dim no As Integer = 0
listBox.Items.Add(listBox.SelectedItem & no)
View 7 Replies
Jun 9, 2011
Just getting started in VB.NET. I would like to add X-number of text boxes at run time. And then be able to address them by their index or some sequential numerical value (like an array)
This is what I have so far:
CODE:
When I turn this into a loop to create multiple toolboxes, how do I assign a name to the controls, or will all of them be named "MyTextBox" ? I'll increment their position so thats no problem.
View 4 Replies
Jul 31, 2009
is there a way to show my running number in a text box. the logic is like this, i have 1 button once i click on that button,the textbox start running a random number start from 1-47. when i click again the running textbox stop.here is my code.
If lb_count.Text = "0" Then
Dim RandomNumber As Integer
RandomNumber = RandomClass.Next(1, 47)
[code].....
View 14 Replies
Jun 7, 2006
I heard that you have to add some code to a random number generator
results(1) = Int((5 - 1 + 1) * Rnd() + 1)
so that if it is used again and again it keeps generating new numbers as apposed to what this piece of code does by itself which is creates the same number every time.what is the code?
View 10 Replies
Nov 10, 2010
I have the following code to insert a record into the database [code]...
View 6 Replies
Sep 20, 2010
its like this if we think the original textfile like this [its meaning less] dim original as string = "myname is not thename wasthe notthe nameisnot nere!" i want to see what words are recurring, like name, the, was, not but i cant use split(), substring because they may even exist as combined words like thecat and i need to know the number of time it has recurred
View 1 Replies
Aug 31, 2010
I have 2 panels set up, one contains the rich text box the other one contains a single label. The am currently using the following code however it is not working.
Dim line_count As Integer = mainEditor.Lines.Length
Dim linecounter As Integer = line_count
linecounter += 1
line_count = 0
[code]....
View 6 Replies
Mar 25, 2010
i have a loop in here what suppose to add a rondomly choosen number and show it on the label .text increase every time by the the same number when appear. It does not do it correctlythat is the
Private Sub licz()
Dim pbs() As PictureBox = {PictureBox1, PictureBox2, PictureBox3, PictureBox4, PictureBox5}
Dim las() As Label = {Label1, Label2, Label3, Label4, Label5, Label6, Label7, Label8,
[code].....
View 11 Replies
Dec 7, 2011
I am trying to code something with nested for loop with the following format:
[CODE]...........
However when the program hits the last value of 'For loop 1', the nested for loops seem to only trigger once instead of the number of times that i specified.
Private Sub populatedgv1()
'setup temptable to store Server data
Dim m_table As New DataTable
[CODE]........................
View 7 Replies
Jul 28, 2010
I am just wondering how I can make a listbox count the number of selected items and display it in a text label. My listbox selection mode is on MultiExtended.
Also, can someone provide the definitions for:
SelectedItem
SelectedIndex
TabIndex
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
Dec 12, 2009
How can i make it so that label1.text = the number of time timer1 is ticked ?
View 2 Replies
Mar 7, 2010
I'm writing a program for my algebra students to practice integers.Stuff like....
3-6
-4 + (-5)
3(-4)
-15 � 3
etc.
I want to show an explanation and for the addition and subtraction, I want to show it on a number line. For example, if the problem is 3 - 7, the number line should show and arrow to that goes right to 3, and then left 7 units (starting from 3). Then the student can see that the answer is -4.I could probably do this with some string manipulation, but what would be the easiest way to do it in a picture format? Maybe a bitmap.
View 1 Replies
Apr 18, 2009
I have created a basic query generator which allows a user to select the Select, WHERE and criteria attributes using a number of checkboxes.However i have got stuck. In the results form i have the following code
Private Sub DisplayRecord()
RichTextBox1.Text = ds.Tables("newResults").Rows(intCurrentRecord).Item(0)
RichTextBox2.Text = ds.Tables("newResults").Rows(intCurrentRecord).Item(1)
RichTextBox3.Text = ds.Tables("newResults").Rows(intCurrentRecord).Item(2)
[code]....
The program keeps on crashing if the user does not select the corresponding amount of display records from above for the amount of attributes they want for the SELECT part of the query in the intreface in form 1.
How would i go about making something where the number of SELECT attributes selected which are listed in a string create the correct number of textbox fields in the results form (form2)
View 1 Replies
Sep 29, 2009
is there any way to get a numberupdown text to show the value "+" so if the value is a positive number then it adds the plus sign in front of the digits.
example:
2.00 would become +2.00
3.25 would be +3.25
as when its negative its
-2.00
-3.25
It already adds the negative value when its negative of course.
View 2 Replies
Feb 1, 2011
Anyone knows how to convert Number into Word using VB .Net : Like this example.. (sample: 150 = One Hundred Fifty )
View 3 Replies
Nov 18, 2008
How to convert the 5-digit number into a word using visual basic express edition
View 2 Replies
Aug 15, 2009
I'm having to code hangman. So far I've done well, except for the part where I need to verify if the five character word contains a number. I also need to verify that the letter they are putting in does not contain a number. I have to use loop, so I'v considered using Do. Anyways, the loop needs to verify one character at a time that one of the character's is not a number. I know I can also use word like "[!a-zA-Z]" and that will verify the word does not have any numbers, correct? I have not assigned any value to letter yet, just word. Basically I've give the word length 5. I also know I need to use subString, but I'm not sure where in the loop.
View 2 Replies
Feb 7, 2011
Ok so what i have is 2 listboxes and which ever item on listbox1 is selected i need the same row number selected on listbox2.
Listbox1 selected item = listbox2.select??
View 7 Replies
Oct 27, 2011
i have this problem iam working on its a phone number word generate i have a code that is correct no errors just 2 problems 1. my generate button is not working and 2. how can i get the words generate to appear like say the number is 4247288 the word would be Haircut here is my code:
[Code]...
View 6 Replies
Oct 29, 2010
I am trying to make telephone number word generator, user enters phone number 7 digits between 2 to 9 and then it generates all possible word combinations,it should be 3 ^ 7 = 2187
View 8 Replies
Oct 24, 2011
Use the correspondence between digits and letters to develop seven-letter words that correspond to their phone numbers.- develop the seve-letter word that correspondsto exactly one seven-digit telephone number. Every seven-letter phone number corresponds to many different seven-letter combinations. Mostrepresent unrecognizablejuxatapositions of letters.Write an application that allows the user to enter a seven digit number in a textBox and diplays every possible seven-letterword combination corresponding to that number ina multiple line scrollable TextBox whenthe user clicks the Gernerate Words Button. There are 2,187 (3^7) such combinations. Avoid phone numbers with the digits 0 and 1.
View 14 Replies
Dec 13, 2011
I am trying to use a listbox to hold categories from one table in a database and by clicking on the categories in the listbox it will display data from another table in the database that is linked to those categories. One table has a field called ID and the other has categoryID and categoryID is linked to ID so it displays the numbers from ID.I am using this:
daSamples.SelectCommand.CommandText = "SELECT * FROM tblSamples WHERE tblSamples.categoryid =" & (lstCategory.SelectedIndex + 1)
daSamples.Fill(dsSamples, "tblSamples")
Currently, however with this if you delete a category from the table with ID in it then it changes the values of the selectedindex in the listbox which messes up the data that gets displayed. How can i change this so instead of using the selectedindex from the listbox, it takes the ID from the selectedindex?
View 2 Replies
Jun 25, 2012
I'm having a problem in MS Word interop. I'm using VC++, but I'll accept suggestions in C# as well. In a word document having a page number given in the footer when I use the SaveAs method I am getting a random page number instead of the correct
[Code]...
View 2 Replies
May 18, 2012
I'm having a problem in MS Word interop. I'm using VC++, but I'll accept suggestions in C# as well.In a word document having a page number given in the footer when I use the SaveAsmethod I am getting a random page number instead of the corre also tried using PageNumbers.GetStartNumber and Range.GetInformation methods with no luck.
View 2 Replies
Sep 22, 2009
I'm working with Microsoft Word and trying to generate a table with headings that may span one to three columns. I'm having trouble figuring out how to do this. The table should look something like the following:Counters
Times (hrs)
Flows (gals)
Day
Regens
Well Starts
[Code]...
To get it to look this way, I'm not exactly sure what to do from VB.
View 1 Replies