.net - VB 2010: How To Index Textbox (making It Like Slots)
Mar 29, 2012
If the title isn't clear; I want to be able to select any character from textbox without making some complex loops-dependent code (I can do that one). For example, let's consider this text is entered in a textbox:
I want some syntax when I tell to get me the index 1's value, it gives me "h", for index 5 = "o"... etc
So, anyone knows what's the right syntax,
View 3 Replies
ADVERTISEMENT
Jun 20, 2012
In VB6 you could use textboxes with an index so textbox(1), textbox(2) and such. Now I need something like this in VB2010 and it seems that VB2010 doesn't work with those indexes. Now I need to following:
I need 3 textboxes and 3 button, (where button 1 belongs to textbox1 etc.)for a path on the hardrive(s). 1 will be source, 2 will be copy path and 3 will be compare path. Those 3 I want to set with only 1 drive/folder sub.
In VB6 I used 1 sub for the buttons and use something like textbo(index).text = strDriveFolder. Where the index is the index from the buttons, because those are the same.How can I do something like this in VB2010 when it is not working with those indexes?
View 3 Replies
Feb 5, 2012
so i am new to v basic and as you can see in the picture below that i have 2 textboxes just to put in them 2 numbers and then do mathematical calcualtions on them and a label up there that shows the answer so i wanted to make 1 textbox to type in the 1 st number then press the symbol for example + and then type the 2nd number and then press equal so the result is formed in the same textbox the only problem is idk how i searched google but i couldnt understand here is my source code
[Code]...
View 1 Replies
Jan 15, 2012
I have 3 combo boxes on my form
1. Doctor Start Time
2. Doctor End Time
3. Doctor Appointment Duration
I want a 4th combo Box that will Start from Doctor's Start Time upto Doctor's End Time with the interval of Appointment Duration eg. Suppose the Start time is 08:00 and End Time 10:00 with 24 hr clock the appointment duration is 30 mins then the 4th comboBox should Display
08:00
08:30
09:00
09:30
I have done this coding on the basis of Appointment Duration
Dim da As DateTime = FormatDateTime("00:00")
cboAppTime.Items.Clear()
If txtDuration.Text = "15" Then
[code].....
The above coding shows time from 00:00 to 23:00
View 4 Replies
Jun 3, 2011
I am doing a project for college where I have a booking system. The people book for a time slot and I would like to work out how to have a break down of time slots say for one hour periods throughout the day. Something similar to the bottom half of this picture [URL]. How would I go about something like this in VB.NET?
View 10 Replies
Oct 3, 2009
I'm a noob to VB.NET and I was wondering how to make something you type into a textbox on the application type that text into a website textbox and submit whats in the textbox by pressing a button? I am using visual studio 2008.
View 2 Replies
May 20, 2011
I added a textbox and a button to my form. In the textbox I've wrote "Hello my name is eddy and I'm 17" so when I click the button , I got the textbox length .
My code button on click is :
textbox1.text = "hello my name is eddy and I'm 17"
msgbox(textbox1.length) ----> the length is 32
Now my question is how to get the index of the word "eddy" in the textbox and as you see all the text written in the textbox has the length of 32 and the number 7 which is the last letter in the textbox has the index of 32. So how do I get the index of the word "eddy" in the textbox.
View 1 Replies
Apr 26, 2011
Create an application for maintaining payroll for a business. When your program begins, read in an input file containing delimited employee records (a sample is provided in the assignment); each record contains the employee name, the current salary and the number of years employed. Display only the names of the employees in sorted order, and when the user selects a particular employee, display the salary and number of years employed for that employee, allowing the user to edit the record. Provide methods of adding and removing employee records as well, and update the input file with all changes before the program close
I want to put the salary and years into separate text boxes. Heres my code so far, I realize its certainly not the most efficient way, but its functional.
Public Class Form1
Dim sr As IO.StreamReader
Dim strLine As String
[Code]....
View 6 Replies
Feb 9, 2012
I am trying to put this into one TextBox instead of using two TextBoxes, I receive the error(Index was outside the bounds of the array.)
The error is in ( TextBox1.Text = TextBox1.Text & ((arrNumber(i)) & (p)) & " ," & vbCrLf)
Public Class Form1
Dim intNumber As Integer
Dim arrNumber(0 To 4) As Integer
[Code].....
View 2 Replies
Jun 8, 2012
how to validate and save the results of a textbox when I change to another tab on a tabcontrol?I have found the SelectedIndexChanged and LostFocus but they do not tell what was the tab that has been previously selected, so I then can do that validation and save. is there an event that triggers before the SelectedIndexChanged?
View 2 Replies
Aug 29, 2009
Im going to make this Quick I have a Textbox where I want someone to input there email
E-mail = Textbox3
and a button
Okay Button = Button1
[code].....
View 3 Replies
Feb 15, 2012
I have 1 Table Called "Menu" there are some textboxes and a combobox. I want to fill data in the Textbox called "Menu_Rate" on Selection of combobox selected item & coressponding rate of the Menu shoud be displayed in the textbox.
This is my Code
con.ConnectionString = "Data Source=localhost;Integrated Security=true;Initial Catalog=Restaurant"
cmd.CommandText = "select Menu_Rate from Menu where Menu_Name='" & cbMenu.SelectedItem & "'"
[Code].....
View 10 Replies
Jan 4, 2010
an anyone show me an example or source code of how to load the value of a selected index value to a textbox using onclick event?
View 1 Replies
Jul 7, 2011
How can I make the textbox in a VB Inputbox larger?
View 2 Replies
Dec 13, 2009
I have a CheckedListBox with 6 different indices that all correspond to a textBox. For example: Index 0 corresponds with TextBox1, Index 1 corresponds with TextBox2, and so forth. When the user selects the item in the CheckedListBox, the TextBox with that particular index becomes visible. I am at a loss. I have been working on this for 4 days now, with no end in sight!
CODE:
View 7 Replies
Jun 9, 2011
I have a function in my textbox1 with the got focus event. I have a 40 textbox in my goupbox1.[code]I want that when the textbox1 gotFocus, all my textbox in groupbox1 under the for loop event will declare that only numbers are allowed to be entered in all the textbox. I manage to work with it but only in a single textbox. Here is my code for it.[code]Is there a way or would it be posibble to put this code # 2 into the code # 1? So that I don't have to declare 40 TEXTBOX which is not good.
View 5 Replies
Jan 19, 2011
I am trying to make some Text in a Textbox become Transparant gradually to the point where it disappears - it this possible in VB08 Express?
View 3 Replies
Mar 20, 2011
In vb.net using Data Reader while selecting an value in combobox should display an selected value record from the database into textbox.
View 4 Replies
Mar 29, 2010
I need to create a telephone directory with search option(textbox). I use sql db as backend and vb.net for frontend. In this the user must search for a particular name using the textbox and the results have to be displayed in the gridview. how to do this?
View 1 Replies
Oct 8, 2011
I am having trouble making a function that reorders the text put into a textbox. I then have to get that reordered data and put it into a list box.
Basically, 2 words separated by a comma are entered into a text box (say Wash, Car is put into the text box), then I need to get a function that reorders that string and be able to put in into a listbox that shows Car Wash. So it gets the word after the comma first, then gets the word before the comma. It should do this with every string.
Need to use a function for this.
Right now I really just have
Dim Word As String
Word = textbox1.text
'Then the function to reorder the name and return the reordered name will go right here
What this is suppose to do?
- Example, some puts Wash, Car into textbox 1. List Box 1 will display Wash Car.
- Basic, Visual in textbox1, list box 1 will display Visual basic
View 4 Replies
May 15, 2009
How do I make the data in the TextBox1 into a string, which will then become the data added to the text file after the button is clicked
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
IO.File.AppendAllText("C:UsersPublic est.txt", TextBox1)
End Sub
And yes, I realize that I have no idea how to use the insert code feature.
View 2 Replies
May 27, 2011
I am making a chat program, that sends the message by pressing enter key. But when im pressing enter in the textbox im getting extra blank space. Is there any chances to remove this blank space from the textbox by using single code
View 12 Replies
Dec 31, 2010
anyway, i just want to know how can i write a multi-tabbed text output in textbox/rich textbox, like one of those creating a report. like in this image:
View 1 Replies
Sep 20, 2009
I'm making a HTML Editor. There are uttons in a toolbox they can click and it will add that HTML code. I don't know how to make it add the code to wherever the little falshing line is in the textbox.
View 2 Replies
Feb 14, 2009
I'm looking for a solution for making the program response to the enter/return key inside a textbox. After browsing the forum I end up with this
Private Sub TextBox1_KeyPress(ByVal Keyasii As Integer)
If Keyasii = 13 Then
Label1.Text = TextBox1.Text
End If
End Sub
As this seems to be the answer to the problem, I still can't make it work. I just get a 'beep' and nothing happens.
View 2 Replies
Jun 9, 2010
I am making a program that reads a file. Csv,and information to a textbox.
After he demand on the Csv file, the same information he writes what is in the same row forward in the same textbox.
A-dos-Francos;39.346246,-9.031105
A-dos-Negros No;39.366089,-9.090929
A-dos-Negros PV;39.366886,-9.131098
[CODE]...
Example: If "A-dos-Francos" is written in the textbox I want that it be replaced by "39.346246,-9.031105"
But in the same textbox.
View 8 Replies
May 30, 2010
Public Class Form1
Private TargetProcessHandle As Integer
Private pfnStartAddr As Integer
Private pszLibFileRemote As String
Private TargetBufferSize As Integer
[code]....
View 3 Replies
Jan 31, 2012
How could i get the index of line found?
Dim fn As String = "test.cfg"
Dim sr As New StreamReader(fn)
Dim ar As String = sr.ReadToEnd()
[code]....
View 4 Replies
Apr 3, 2010
How could i get the index of line found?
Dim fn As String = "test.cfg"
Dim sr As New StreamReader(fn)
Dim ar As String = sr.ReadToEnd()
[code].....
View 1 Replies
Mar 15, 2011
I'm trying to create an ASP.NET web application to enter the winners of a science fair. I have a gridview that contains bound fields for the students' IDs and names and template fields with comboboxes from which the user can select the award, place, and prize amount. I want the user to be able to change the values in the template fields, then hit the Submit button and update all of the records in the database (SQL Server 2005). The code below seems to be on the verge of doing what I want, but I'm getting the error "Index was outside the bounds of the array" on the line in red:
[Code]....
View 3 Replies