VS 2008 Adding A Number From One Text Box To Another?
Dec 10, 2010
RichTextBox1.Text = RichTextBox1.Text + MaskedTextBox1.Text Everytime I click add, it just adds the actual number to the RTB1 instead of adding the numbers together like a calculator.
View 7 Replies
ADVERTISEMENT
Dec 6, 2011
Im learning .net from vb6 and been stuck with this a while
Option Explicit Private Sub Command1_Click() Dim i As Long
For i = 1 To 3 Me.Controls("Text" & CStr(i)).Text = "This is textbox number: " & CStr(i) Next End Sub
View 4 Replies
Feb 24, 2011
But task to use vb.net for school project. I want a code to help me add a No fo Months(this is an integer) to a datefield to do calcualtion and the result display in a textbox as a date. eg I have 2 fields: Months and startdate, the third field which is the result in a date format. eg 6 months to make a payments, the payment start from 01-02-2011. i want small code which would determine the enddate of the payment period. am getting a problem putting the code together
View 3 Replies
May 29, 2009
i am trying to count up to a number and add each number to a combo box. so for instance, the string value = 7. i want the combobox to count up to 7 in single numbers starting with 1
View 15 Replies
Jan 14, 2011
I am using this to populate column1 combobox from a text file and it works fine.[code]I tried to add a number range using this to populate columns 4 and 5..[code]The number range populates the combobox(CB) fine but when i select a number from the CB it causes a error and selects the first item, the error loops evertime the mouse hovers over the CB..[code]
View 5 Replies
Aug 10, 2009
My application has no static number of pictureboxes. I want to add picturebox to array control.
[Code]...
View 4 Replies
Oct 14, 2011
adding all the numbers in a list box then multiplying it by a %.theres one listbox and two buttons, and two textboxes.i've completed everything but this and can't fibd it in my book. I just looking for pointers. this is what i have which i know isn't right
Dim sum, cost As Double
sum =
cost = sum * 0.06
lstbox.Items.Clear()
lstbox.Items.Add("Total Commission =" & cost & ".")
View 4 Replies
Feb 3, 2011
VS 2010 Adding whole numbers between a number and a number
View 3 Replies
Dec 18, 2010
I'm trying to add text to the progress bar. Or basically percentage. This is so far i found, but no luck. I also can't find a problem because everything looks correct to me. [Code] Any suggestions?
View 8 Replies
Jul 1, 2010
I am facing problem with a vb.net code, it adds a second line on the txt file why ?
PHP
Dim fs As New FileStream("pwp.txt", FileMode.Create, FileAccess.Write)
Dim s As New StreamWriter(fs)
s.WriteLine(TextBox1.Text)
s.Close()
Me.Hide()
View 2 Replies
Sep 27, 2011
I am making a project in which if SID 001 is saved .after this SID textbox should display 002 automatically .I am using an Access Database. My code is as shown below:
Private Sub Sales_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
[code]....
View 1 Replies
Sep 13, 2009
Say you have the following string: Welcome to my program!
But you only want it to show a certain amount of characters then "..." so it would look like this: welcome to m...
I'm addressing this problem because I'm making a tabbed web browser and when I create tabs I have the document title as the text, but It looks weird without it cut off, so I wanted to know how I could replace the text after say, 15 characters with
View 13 Replies
Jul 26, 2009
Im making a copycat of windows calculator, but I cant figure out how to Use just one text box to recive two numbers. Im just using 3 text boxes....2 for input and 1 for a result.
View 6 Replies
Jun 5, 2009
It's exactly as the topic says. I have a text file with an unknown amount of words, typed out like this:tastymuffinsaredeliciousWhat I need is a counter that will tell me how many words there are, and in this case (besides a tasty muffin), there are 4 words. Is there a simple way to do this?
View 3 Replies
Jan 7, 2011
I'm reading a text file that has a single line with the number 70. I want to convert this to a number (decimal or Integer). The following returns 7 - what am I doing wrong? [code...]
View 6 Replies
Dec 12, 2009
How can i make it so that label1.text = the number of time timer1 is ticked ?
View 2 Replies
Jan 23, 2010
I'm trying to search for text that is known to be in a TextBox.
Once it is found, I want to return the line number it was found on.
Also, I would like to know how to delete all blank lines from a TextBox.
These two problems have been plaguing me for the last 2 days.
View 4 Replies
Oct 8, 2011
Using VB.NetWhen i add a the number with zeros means, it is showing exact result without zero'sFor Example
Dim a, b, c as int32
a = 001
b = 5
[code].....
View 2 Replies
Oct 27, 2009
I have list of number to add, the fomate of how the number are listed a bit tricky. thats what I mean:
[Code]....
View 3 Replies
Nov 2, 2011
In VB if you prompt the user for a number between 1-20, then a word, how do you get a text box to show the word the same number of time as the number selected using loops?... Ex: please select a number: 4 / select a word: cat....the text box should display ::: catcatcatcat ........
I am doing this for a class and my brain has locked up. Prob. just over thinking it though. Thanks in advance for any help!
View 6 Replies
Jun 29, 2010
How to create an error log system, which will log all errors(caused in my app) to a text file with line number, sub/function in which the error occurred, error details, etc. ?
View 11 Replies
Jan 4, 2011
This sounds like the stupidest question ever!!! BUT what is the code for adding a number to a label with the label's value being calculated dependent on user input?! So you choose 2 numbers to multiply, If a box is ticked then you add 10 to the label. I've got everything else I just can't work out the structure/code for this little bit.
View 1 Replies
Oct 26, 2009
i need to add the number in textbox 1 to textbox2 and mutiply the result times .10, if the result is grater than or equal to 2000 i need to add 12 other wise i need to add 10 heres my code
Dim total double
total = Val(txtbox1.Text) + Val(txtbox2.Text) * 0.10
If total >= 2000 Then
[Code]....
View 2 Replies
Aug 15, 2011
I have a fixed percentage 0.3% I need to multiply this by a number of months which varies 1 to 12
Having done this I need to add the percentage to a pre-determined number
so as an example
£300 + (0.3 * 10)
I can get the 3% (0.3 * 10)
But when I add this to the existing number (£300) it equals £303 not £309 which is what it should equal.
Can anyone advise the way of adding a percentage as appose to just another number? This also need to allow for -percentages i.e. -3%
The equation I am using is below and I appreciate there is nothing to set decTotalPercentage as an actual percentage but that's because I am stumped...
decTotalPercentage = decPercentage * intMonths
decFinalPercentage = decMoney + decTotalPercentage
View 4 Replies
Mar 16, 2010
I have a dataset that is being populated from a text file.
OrderNumber,Name,Model,Cost
123,john doe,product1,20.99
123,john doe,product2,10.75
There can be multiple of the same order number. In the dataset, I want to have a column "line number" and I want to put in it the value of the linenumber (in this case 1 and 2) per order. In sql , I was able to accomplish this by inserting rownumber() and grouping by order number. Can this be done in .net?
View 1 Replies
Jun 2, 2011
EDIT: I am so sorry! I have added my thread to the C# discussion thread instinctively wherein in fact I have been creating my application in VB.NET so sorry! Please transfer my thread to the appropriate location! I am currently trying to mess around with a simple mp3 player and am in the process of creating a shuffle list from all the songs in my playlist.
View 2 Replies
Dec 9, 2009
I am fairly new to programming and I am completing the Step by Step by Microsoft for Visual Basic 2008, but I am not finding anything in the book about binding keystrokes for a program. I want to add the Number Pad into my Calculator Program so that every keystroke on it would correspond to a button in my program but I am unsure how to do this take.
View 1 Replies
Jul 17, 2011
I have an Access table which has an auto-number primary key. When I add a new record to it I want to be able to get the value of this field.
The relevant code I have is:
dsNewRow.Item("FullName") = NewStudentFields(0)
dsNewRow.Item("FirstName") = NewStudentFields(1)
dsNewRow.Item("LastName") = NewStudentFields(2)
[Code]....
I want to be able to access the value of the primary key immediately after the Update (if that's possible without having to search the dataset for the new record - cumbersome!) or, even better, just before the Update, if that's possible.
View 28 Replies
Jul 12, 2009
How do you add an arbitrary number of controls to a form at run time? With indexed controls I could define the 'seed' control at design time and reference 'clones' of the 'seed' control at run time via the index. Now I must declare each additional instance of the control at run time then set each individual property that differs from the default for that control for each instance. Then I must add the newly declared control to the appropriate container controls collection. I'd like to do this in a loop but how can I get away from using a fixed control name in the declaration:
Dim controlname As New Control
I can't use a string that I can manipulate the contents of for controlname because it sees it as a double declaration. I can't use an array such as Control(index) for controlname. Dim Control(maxindex) As New Control doesn't work. Dim Control(maxindex) As Control works but any assignment based on this such as Control(indexvalue).Name = "ControlName" fails. It didn't address the issue of handling the declaration of new controls in a loop with some kind of variable name for the control.
View 1 Replies
Apr 18, 2012
I'm trying to write a function which obtains the sequence_number by counting the records in a table that fit a particular criteria and if the result is 0 or nothing sets a variable to 1 but if the result is 1 for instance, the variable will be set to 1 + 1.
This is the code i'm using but i'm not getting the correct result when results are actually returned. For instance, if the result of count is 1, i want "seq" to equal 1 and total (which represents the sequence # assigned to the next record which is entered with the same plan and date) would therefore be 2 which is the result of seq + 1 (i.e. 1 + 1)
[Code]...
View 6 Replies