How to check, input text is empty and should throw an error msg if text is empty, error should gone while entering in to the text? - input

I have input textbox, I want to show an error when it is empty and cross text maxlength limit i.e 30,
the error msg should not display when user starts entering into the text.
Please enter a maximum of 30 characters.

Related

How to extend dialogue dynamically to add error msg in vb.net windows form application

I have aLogin dialogue like the image below and I am showing the error messages on top of the dialogue.
As you can see I am leaving a rather big empty area on top of the dialogue for these messages(it can be up to 5 lines of text) which does not look good. I would like to remove the empty space on top and add the space in run time when there is an error line added.
I know that it is possible to move each element of the Dialogue down when a new error line is added(e.g. button1.Left += 200, for each element in dialogue), but is there an easier and more practical way to do it?

QlikView: Input Box Not Accepting Values

I created a variable vAverageSalary and an input box which serves as a place to change the value of the variable (variable is defined as money). The problem is that nothing happens when I enter numbers in the input box for the variable. Additionaly when I check the value in the 'Variable Overview' for that varable, I see nothing. Even if I try to define here any value for the variable, nothing changes. And the third option I tried was to define any value by going to the 'Properties' of the input box and entering any value in the 'Settings for the Selected Value' (Tab - 'Constraints'). Even when I enter a value here, nothing happes - the system simply ignores everything I enter.
How can I make an input box to take the value I enter in it?
UPDATE: It seems that the problem is when I define the variable inside the input box as 'Money' - I can only set velue when I type for example '121,00 €'. However if I make a text box and try to write out the value of the variable, I get the message "Error: Garbage after expression ','". The input box takes the values in that format, but the output is garbage. And if I type for example any number without '€' sign, than input box ignores my input and gives me the previous value... Why?

A program that can display charts with data entered from textbox

i want to create a program,whereby my users can enter data through text boxes and it shows on the chart. And they can store it so that the next time the program
is opened it displays their data. How do i go about the saving the data and entering data through text boxes.
You can just set all de userinput in a string. For storing that string you can maybe put it in a text-file.
My.Computer.FileSystem.WriteAllText("C:\TestFolder1\test.txt",
"This text will be added to the text file",True)
You can output the userinput back again by reading from the text-file.
My.Computer.FileSystem.ReadAllText("C:\test.txt")
And set it in a label.

How to control the length of a text box

I am trying to control the length of the text box. The property of the textbox only has maxlength tool. If I want to set minimum length for textbox to be 3, how can I proceed this?
I want an error to pop up when someone types 10 instead of 100. User can only put a combination of 1 and 0 like 100,000,010,001, etc. Type of these are double.(not string)
handle the Textbox control validating event. See this

Create masked textbox but hide masked characters when empty

I want to validate text taken from a textbox and display it in a specific format.
I have tried using a MaskedTextBox, but when the textbox is empty it shows the empty blank lines (underscores) in the text box.
How can I avoid that and show the masked textbox like a simple empty (still masked) textbox?
Also, I want data like csc-(somenumber). Can I add some random number automatically after 'csc-' characters?
The reason the masked text box is showing a blank line is because underscore "_" is the default prompt character for a masked text box. You have two options for changing this.
If you want the prompt to be visible while the user is editing the text but hidden otherwise, set the HidePromptOnLeave property to true.
MaskedTextBox1.HidePromptOnLeave = True
If you never want to have the underscore as the prompt character, you can change the PromptChar property to be a space " ". You cannot make the PromptChar nothing, the field must have a value.
MaskedTextBox1.PromptChar = " "
For your textbox, use the MaskedTextBox class.
http://msdn.microsoft.com/en-us/library/system.windows.forms.maskedtextbox.aspx
For getting a random number
Dim s = "csc-" & New Random().Next(1000, 10000).ToString