How To Find Lcm Of Two Digits
Feb 21, 2010
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].....
View 3 Replies
ADVERTISEMENT
Sep 13, 2010
This code bellow to find total of digits from textboxs to listbox.This code don't care about how many textboxs on the form.I take this code from Cazypennie..Great code.My question is..I want to change that code from many textboxs to only one textbox MultiLine having 30 Lines of digits to count and appear to listbox.
Option Strict Off
Public Class Form1
Dim BoxValueCollection As New Collection[code].......
View 6 Replies
Apr 30, 2009
Dim Timing1, Timing2 As DateTime
Timing1 = DateTime.Now
MyCode
[code].....
View 13 Replies
Jul 2, 2010
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
View 5 Replies
Jan 17, 2010
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 Replies
Oct 12, 2009
I 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 Replies
Aug 5, 2010
I 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 Replies
Mar 13, 2009
hey 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
View 4 Replies
Sep 4, 2011
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
View 2 Replies
May 10, 2009
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]....
View 5 Replies
Jul 30, 2010
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 Replies
Oct 14, 2006
I 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 Replies
Sep 2, 2010
Textbox1
ListBox1
1234
[code]....
View 1 Replies
Jul 22, 2010
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.
View 4 Replies
Dec 3, 2011
The 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].....
View 4 Replies
Oct 1, 2010
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?
View 7 Replies
Jun 17, 2011
How do I know the original number of digits that appear in this way 5.555555E+36
View 6 Replies
May 22, 2009
I have this textbox and i want to limit the number of digets able to be entered to 4.
View 4 Replies
Jan 26, 2011
I 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?
View 3 Replies
Apr 6, 2011
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 Replies
Feb 23, 2009
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 1 Replies
Mar 11, 2010
I 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 Replies
Aug 11, 2010
WRITE 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 Replies
Jun 11, 2011
I 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 Replies
Mar 27, 2010
Private 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?
View 2 Replies
Aug 30, 2010
Can someone give me code to do the following.if the integer is 1-9 display a string 01,02,03 etc.. if 10 or over leave it as is.string display = yourInt.ToString("00");
View 6 Replies
Jan 5, 2011
I need to round like this:
12 -> 10
152 -> 200
1538 -> 2000
25000 -> 30000
etc.
Twisting my head, but can't see how to make this. Must work for any n number of digits. Anyone got an elegant method for it?
View 6 Replies
Apr 28, 2012
i want to get the correct value if number is more than 16 digits [code]and i change it to double and the value is "1.11111111111111E+16"the answer i want is "11111111111111111".is it possible to get the proper value?
View 5 Replies
Sep 26, 2010
how to modified in cazypennie coding..
[Code]....
View 8 Replies
May 18, 2012
With Binding the Listview with dataset, the dateformat in datefield only appear the year as '12' instead of '2012',
strSQL = "select * from tableA where PNo = '" & cbPortNo.SelectedItem.ToString() & "' and convert(date, fDateReceived) = '" & dDateSelected & "'"
Dim da1 As New SqlDataAdapter(strSQL, sqlconn)
[code]....
View 2 Replies