Can't Enter Any More Digits
Aug 5, 2010I have a textbox called TxtProNo - this should be ONLY 10 digits maximum. After 10 digits have been typed, the user can't enter any more digits, how can I achieve this...
View 3 RepliesI have a textbox called TxtProNo - this should be ONLY 10 digits maximum. After 10 digits have been typed, the user can't enter any more digits, how can I achieve this...
View 3 RepliesThe client can enter only four digits in the textbox wich represent the PIN (the text box is not allowed to enter more or less than four digits) . After the client entered four digits the textbox will be read only
My problem :When I put one digite then the text box becomes read-only, i want to enterd only 4 digite ..
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar Like "[0_9]" Or Asc(e.KeyChar) Like 8 Then
[Code].....
I have a textbox and I would like to limit this textbox to enter 10 digits only. Is there a way to do it?
View 3 Repliesi want to know how to assign specific number of digits enter in a textbox..
View 1 RepliesDim Timing1, Timing2 As DateTime
Timing1 = DateTime.Now
MyCode
[code].....
I'm trying to match a string to see if it matches exactly this:####-####, it has to be 4 digits followed by a hyphen followed by 4 more digits. Right now I have this pattern: "d{4}-d{4}" but it's allowing 5 digits in either (or both) instead of strictly 4 per group. Here's an example of what it should allow:
1999-2000
2003-2007
2009-2010
and here's what my pattern is allowing but should not be allowing:
20081-2009
2009-20101
12345-12345
12345-1234-1234
I have 10 labels with 10 numbers and i want theses numbers to compare with other 10 labels with different numbers and when they found that second pair of labels are not equal with the first to show me in a new label where is the fault and in another new label the sum of the mistakes
View 3 RepliesWhat did I do wrong below? When I pass the enter key but for somehow the enter key event doesn't get triggered.
CODE:
I have a function that allows a user to enter numeric vallues and also a period for the decimal points but I also want to allow for users to enter the minus sign to allow users to enter negative values . How would I go about it.
Public Function SingleDecimal(ByVal sender As System.Object, ByVal eChar As Char) As Boolean
Dim chkstr As String = "0123456789."
If chkstr.IndexOf(eChar) > -1 OrElse eChar = vbBack Then
If eChar = "." Then
[Code]...
how to enter a data that i enter in textbox to a datagridview... for example i enter in the textbox is round and when i click add it will go to database... im using ms access database
View 1 RepliesI am trying to enter the following on an excel spread sheet from vb.net:applic.activesheet.cells(1,1)="=server|topic!" & Item & My.computer.keyboard.sendkeys("{CNTRL} {SHIFT}{ENTER} ")The error says: "Expression does not produce a value"I tried even {ENTER} and still the same error.
View 12 RepliesI want to only show the last four digits of a Social security number after they leave the textbox. Does AJax have a tool for this that I am not aware of? How can i do this? I want to replace the digits with '*'. I'm working in .NET. Ajax is also accessible.
View 2 Replieshey ppl i have a simple one today. How can i get the year to come up only as the 2 digits . Ex
2009 but i only want 09
i have this
DatePart(DateInterval.Year, Date.Today) but i was looking for a trim that will do this any ideas
actually we have given an assignment that find the LCM of two digits in VB.netbut i m not getting the logic how to code this...e-g... we have two digits... 10 and 20
2| 10, 20
2| 5 , 10
5| 5, 5
[code].....
Excuse me if this question already have been answered somewhere else but I really need to know.I need the code to take certain digits out of an intiger, for example:I have the integer 3002010 I want to put the 2 last digits in another integer.Then I want to put the 20 in another integer.After that I take the first digits which comes before those.
Another example:
I have 2993064 In integer one it should be 64 In integer two it should be 30 In integer three it should be 299
I need a regular expression that I can use in VBScript and .NET that will return only the numbers that are found in a string.
For Example any of the following "strings" should return only 1231231234
123 123 1234
(123) 123-1234
123-123-1234
[Code]....
I want to run a check on a String right before I append it to a StringBuilder to make sure only numeric characters are in the string. What's a simple way to do that?
View 7 RepliesI need to count the number of digits in an integer input by the user. In other words if the user enters 101010, I need to obtain the value of 6, because there are 6 digits in this number
View 3 RepliesTextbox1
ListBox1
1234
[code]....
I need a function that takes a decimal, with a certain number of digits behiond the comma and convert it to a string with a different number of n digits behind the comma. (to display it)My problem is the rounding ip/down.
like 123,789 with n = 2 --> 123,79
or 123,4 with n = 0 --> 123
or 123,5 with n = 0 --> 124
I did not find an existing function that does that, so I wrote one myself.However the code has become soo complex and it still does not work well, and I get frustrated to spend soo much time with something so trivial.Does anyone know a function that can do this? There must be something out there.
Now i am doing a vb.net desktop application, In which i have to construct GUID. Eventhough having a built-in function in our VB.NET like "System.Guid.NewGuid.ToString()" to get GUID, I need to create the GUID in 30 digits in the below mentioned criteria through vb.net.
Application constructs the GUID (30 digits) using the information from the 5 different sources. The different sources are Current system time, millisecond of the system time, Process ID for the application, system physical memory status and finally the group object identifier number.
8 digits
4 digits 8 digits
8 digits 2 digits
[Code]....
I am not sure how to get the above values to construct the GUID?
How do I know the original number of digits that appear in this way 5.555555E+36
View 6 RepliesI have this textbox and i want to limit the number of digets able to be entered to 4.
View 4 RepliesI found this code for making my textbox only accept numbers.
Private Sub TextBox1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
Dim allowedChars As String = "0123456789"
[Code]....
But... the user can't delete the numbers using the backspace button. How do I do then?
Given a texbox, how can I completely ignore non-digit characters? So if I press "A" or "Z", those characters would never appear in the textbox. I'd like to run a bit of code if the user tries to input digits and if he tries to input non-digits too..
View 3 RepliesGiven a texbox, how can I completely ignore non-digit characters? So if I press "A" or "Z", those characters would never appear in the textbox. I'd like to run a bit of code if the user tries to input digits and if he tries to input non-digits too
View 1 RepliesI am creating a program to calculate digits of pi, I get two error messages. Value is not a member of Integer. I get this message twice.
View 12 RepliesWRITE A PROGRAM THAT TAKES AN INTEGER VALUE AND RETURNS WITH ITS DIGITS REVERSED.. ex. input 7631 output: 1367POSITIVE NUMBER ONLY...Could you guys give me a hint on what i'm supposed to do here?
View 5 RepliesI am new to VB (and coding in general) and I'm wanting to make a check digit generator. To do this I need to take the a user text input and split it into individual digits so that I can then calculate the check digit.
View 2 RepliesPrivate Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
Dim allowedChars As String = "0123456789$,"
If allowedChars.IndexOf(e.KeyChar) = -1 Then
' Invalid Character
e.Handled = True
[code]....
this code accept only digits and its working like a charm but if i typed a wrong number its not allowing me to use the delete or the backspace on the keyboard?