i am trying to put a maximum row number of lines in a multiline textbox. What i want is to achieve something like a console, with a maximum number of rows, with the top rows to dissappear and to keep always the last i.e. 500 rows. a note: for the textbox text i use the following algorithm
dim text
textbox.text = textbox.text & vbcrlf & text
the problem is that after a certain number of rows the program starts to get a little slow. So i guess if i put a limit to the rows i will fix this.
I added a multiline textbox to my form. I only wanted that users can add 3 lines.This code works perfect if i don't add the messagebox. Any ideas?
Private Sub txtFunctie_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtFunctie.TextChanged If txtFunctie.Lines.Length > 3 Then SendKeys.Send("{BACKSPACE}")
My issue is that some websites only allow say 15 characters maximum to be used to create a user name where other sites do not. Currently I have one text box on the screen and a button, and a web browser that navigates to two sites.Site #1 has a cap of 15 characters max to create a user nameSite #2 doesn't have any maximum amount of characters to use.I am wanting to know how I can enter lets say a 20 character username into the text box and have the code set a max of 15 characters for site one and nothing for site 2. I was thinking that this could be done when passing the information from the text box to the text box on the screen with something like
Textbox1.Text.value.length= maximum 15 Site #2: Textbox1.Text
I would like to include the line numbers on the left side of a multiline textbox, much like what Notepad++ has. It should scroll along with the rest. Is this possible?
I have a multiline textbox which is loading from a .dat file. However, despite telling it to load all of the .dat file, it misses off the end. I it copies the first large body of text and a load of spaces that are inbetween the first and second body, but doesn't load the second body of text. Here is the code I'm using to open my file: RichTextBox2.Text = IO.File.ReadAllText("00061530.dat")
I'm trying to count characters in a textbox, which includes newline characters and tabs. How do we know if the textbox contains only newline characters? ie or if the user types in one or more characters, then a bunch of "newline" characters (CR followed by LF) and then goes back and deletes the original one or more characters leaving only the leading "newline" characters. I don't want to count the characters in textbox only if new line exists..
If String.IsNullOrEmpty(TextBox1.Text) Then Label5.Text = 0 Else
I'm using VS 2005, after VB6 to VB.NET conversion we have fixed all the errors but still have unidentified number of warnings. Is there any way to increase this limit of 101 warning you can see after compiling? I want to actually see the total number of warnings to get an idea how much work is there.
Im trying to complete code for a program I am running regarding the Collatz Conjecture. Im using Visual Basics 2010.This is the code I have thus far :
Dim a, count As Integer a = TextBox1.Text count = 0 ListBox1.Items.Clear()
[code]....
This code allows me to type in a number and see the length of the hailstone sequence and the hailstone sequence itself. What im not quite sure on how to do is this following: I would like to add the maximum sequence number reached in my program, but I am unsure on what to do.
What is the maximum number of executions in a while loop in VB.net that it will allow? Meaning, it is checking for a variable to equal some value, but that value never comes? How many times will it execute the code before it quits? Is there some way to set the maximum number of executions without terminating it programmatically?
I am new to visual basic. Below is my Private Sub todayMonth_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles todayMonth.Validating Dim tb As TextBox = DirectCast(sender, TextBox) If Convert.ToInt32(tb.Text) >= 1 And Convert.ToInt32(tb.Text) <= 12 Then tb.Tag = True [Code] .....
Actually, I wanted to validate the todayMonth textbox just to input number between 1 to 12. The problem comes out when I do this procedure : Lets say I input an interger 11 and it passes the validation and proceed to another textbox. Then I click back to the todayMonth textbox, it shows this error : "Conversion from string "" to type 'Integer' is not valid." I don't know why my value in the textbox is "null" or empty . I still saw the value 11 on the textbox.
I'm trying to figure out a good way of implementing a List(Of) that holds a maximum number of records.
I have a List(Of Int32) - it's being populated every 2 seconds with a new Int32 item.
I want to store only the most current 2000 items.How can I make the list hold a maximum of 2000 items, then when the 2001'th item is attempted to be added, the List drops the 2000'th item (resulting in the current total being 1999).
Thing is, I need to make sure I'm dropping only the oldest item and adding a new item into the List.
one of our programmers is having an issue with a asp.net app. i had him rebuild and recompile the app to the network share on the staging server and received the same. i even deleted the files in this folder(C:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files). to make sure that the server was not the issue i installed it on another server and received the same error.i found a article on msdn that states that its a source code issue.
Compiler Error Message: BC30041: Maximum number of errors has been exceeded. Source Error: [No relevant source lines] Source File: vbc : Line: 0
I have been looking all around Bing and Google trying to find this, does anyone have an answer? How many line continuations will the compiler tolerate in VB.NET 2010 (.NET 4)?
I developed a client-server application using soket technology. At this moment the number of clients that connect at the same time is 40. Question: What is the maximum number of clients that can connect simultaneousl
Im wanting to use a textbox for the entry of Decimal figures (currency). Is there any way I can have it so if a user does not put a decimal figure (ie 15 instead of 15.00) it will put it on.
I tried a masked textbox, but that means i have to set the maximum number of digits before the decimal too which is no good.
I have designed a form with textboxes for numerical entry. I need to validate each textbox so the number entered is an integer, and is between 0-1000. I am struggling to find how to validate the data entry.
I have a multiline textbox that has wordwrap set to True I am assigning each line of the textbox to a string Lets say I typed this into the textbox without pressing enter and it just wordwrapped to the next line Visual Programming is fun it would assign "Visual Programming is fun" to the first string however, what i want it to do is assign "Visual Programming is" to the first string and "fun" to the second string.....now if i would have pressed enter after "is" then it would have done what I wanted it to do, but if i dont press enter and just let it word wrap it does not do what i want it to do...
I have this app to copy files with a progressbar... What I'm trying to do is to set the progressbar1.maximum to the number of files in the folder. But I'm getting a cross-thread error. This is the error I'm getting: Cross-thread operation not valid: Control 'ProgressBar1' accessed from another thread than the thread it was created on. This is where I'm trying to set the ProgressBar1.Maximum: [code]
Assuming that I have a Windows Forms textbox and want to reduce the maximum amount of characters that can be allowed in via user entry, how would I do that?
I have a RTB which I import with a set of 7 or 9 didit numbers, 7 for Staff and 9 for Students. e.g. Staff numbers [code]and depending on what is selected in a list box ('Student' or 'Staff') will generate a string to create user accounts. To further error check I would like to check if a line in the RTB = 7 And Listbox = "Student" Then msgbox("Data mismatch between User ID and Account type")
how can i code a simple program to generate the maximum number i enter/type within 3 or more numbers using math.max. for example, if i enter 25, 60, 45 how can i use math.max to calculate the largest value out of the 3 numbers?