VS 2008 Code To Make A Text Box Only Except 4 Digits And Only Integers
Nov 27, 2009code to make a text box only except 4 digits and only integers.
View 21 Repliescode to make a text box only except 4 digits and only integers.
View 21 Repliesis there a way to make VB 2008 read a text file of digits eg:
56154131313313
31231212121211
12534645456464
44564545454787
and import it into vb, splitting it into four digits and putting each set of four digits into a different text box.
Recently I tried to make a command which will sum the digits of a number in a text box I used the following code
[Code]...
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 RepliesIm trying to get my code to check that my textbox has 16 digits in it so that it can then validate the number entered. Here is the doe i have so far: [code]
View 3 RepliesDim Timing1, Timing2 As DateTime
Timing1 = DateTime.Now
MyCode
[code].....
I Know you cant sum to strings to each other so i trying to make the variables to Integers first but i can figure it out why it does not work![code...]
View 12 RepliesI'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 tried coding for an application that will display the positive integers, negative integers and zero entered in a inputBox. for some reason it keeps crashing down.here is my code. paging all visual basic professionals. [code]
View 6 RepliesI am trying to rewrite some code and I am trying to determine if I am writing it correctly. My goal is to make sure that the old code and my new code produce the same results(i.e. are logically equivalent). Are the 2 code blocks below equivalent?
Old
If a = 1 then
If b = 3 OrElse b = 18 OrElse b = 20 OrElse b = 21 OrElse b = 4 then
' Do something
[code]....
I have an assignment in which I have to generate random numbers and use arrays to count single digits. I've finished everything the random number part but am stumped for the digit counting. What expression would I have to use?
I've got my labels for the counters as lblZeros, lblOnes etc. but can't seem to get any further with the coding.
I have a number, e.g. 1.23456789, and need to display 3 digits only, which will be 1.23. Which function can handle that?
View 6 RepliesFor some reason I can't figure this out. Here's my code. colorTextbox.Text =Format(Hex(ColorBox.Color.G), "00")What I want it to do is format the Green Hex number to be "00" instead of just "0" when the color is something like blackhis has proven to be very stressful and this Format command makes no sense to me anymore (worked differently in 2005).For one, whatever I put in the quotes ("00") is what comes out in the text box. Butaccording to the command parameters, "00" should be the format, not the actual text! So then I tried any string format I could think of (## etc.) along with switching the order and I STILL can't figure this out.
View 16 RepliesDue to some settings changes, my code view cannot make text selections.
View 2 RepliesBasically I have and array of integers that vary in size. I need to compare each number to each other number and display which number is repeated. For example:
Dim ints() As Integer = {1,2,2,5,4,6}
The number that shows up more than once is 2.
How can I run through the array and compare each integer with the numbers in the array. I tried a for loop but it didn't return the value I was looking for.
I have a listbox with nothing but integers in it.I want to keep a running total of the integers in a separate text box.
View 3 Replies i need to take two integers from two text boxes and put them into two separate integer arrays then add them right to left carrying if over 10. here is what i have so far but just looking for the addition i think i can figure out the rest if i get the addition working...
' Project Name: Big Integer Project
' Project Purpose: User enters two integers up to 30 digits each then performs operation.
Option Explicit On
[code]....
I need to click a button but after doing so a label will show the first digit in a text box and
another label will show the second digit. I know the button control but I don't get how to get the label to say what the first and second digit is.
what is the code for sending IP via textbox1.text and button1.text
View 9 RepliesI currently have a grid of 30 buttons, (6 x 5). So I named them btn1_1 - btn6_5
When the board loads up (this is for a jeopardy game) I have this
code
For counter = 0 To 5
Btn1_#.text = counter * 200
Next
Is there ANY possible way to do that (replace # with the number of the counter.) I doubt there is, but it never hurts to ask!
As a side note, where is a good place to post the jeopardy game that I am making in these forums, i tried both the code bank and gaming forums but they are dreadfully inactive.... since it is in VB.NET, i was wondering if i could post it here.
It is still in the making, but I would really like some feedback as i worked hard on it and got stuck for 6 hours on the save/load feature that was getting messed up cuz of a difference from A and a lol.
How can i make a textbox so like when a button is pressed how can i make the textbox select a random text and put it in its text box.
View 7 Repliesdoes anybody know the code i put in for tabcontrol1 to make another tab the same as tab1?
View 4 RepliesNOTE: I tried using concat() method, join method and even tried to insert just text(which turned out editable) but none of them worked as I wanted. I was thinking if substring method will work but I only have basic idea of how substring works. I want the letter "N" to be inserted into the text box when form loads and when the user enters 4digits(OrderNo2.text) which should be joined so that it can be saved together when I clicked on save button.
[Code]...
I got a quite a big sql statement and I get errors when dealing with dates and numeric values. All of this is in order to copy the data to a new table.so these variables I am trying to use for passing the data:
Dim orderdate As Date 'on my sql orderdate is datetime
Dim custntitle As integer 'on my sql is numeric(2,0)
Dim country As Integer ' on my sql is numeric(3,0)
for the date I get an out of range exception,and for these two integers (custNtitle, country) I get invalidCastExceptions when dealing with strings there's no problem but dates and numbers causes errors for me?
Imports System.Data.SqlClient
Public Class Form1
Dim serviceid As String
[code]....
is there any way to get a numberupdown text to show the value "+" so if the value is a positive number then it adds the plus sign in front of the digits.
example:
2.00 would become +2.00
3.25 would be +3.25
as when its negative its
-2.00
-3.25
It already adds the negative value when its negative of course.
i wonder how to make a copy code in my vb 2008 express edition
View 2 Repliesif i can make a webbrowser goto a game and make a button in viusal basic run scars code for the webbrowser. So basically some way of creating a bot for the game. And also, the game i am talking about for makin a bot is, runescape at: [URL]
View 13 Replieshow to make it's source code?
View 3 RepliesI have a code where I search a text file for for example: "2320018200000", then it looks it up and finds a line like this[code]...
I want it to put that entire line in a label, but for some reason it skips the "3 1604001Sf" in the start. [code]...
"Create an array to store 10 integers. Initialize all the array elements with -1."
View 1 Replies