stupid Textbox help :/
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
6 posts
Page 1 of 1
i have 8 textboxes..
and a button, the button will divide what they entered in the textboxes.
but if the person only entered a number on 2 textboxes only.. then the result will be infinite : (
i dont know what do add so that when you divide, it will only divide whatever textbox they used
or
if they used only 2 textboxes, make it so it adds an automatic "1" for every blank textbox.
and a button, the button will divide what they entered in the textboxes.
but if the person only entered a number on 2 textboxes only.. then the result will be infinite : (
i dont know what do add so that when you divide, it will only divide whatever textbox they used
or
if they used only 2 textboxes, make it so it adds an automatic "1" for every blank textbox.
Well because i have an option that they can enable, to divide more then 2 numbers.
it will only divide whatever textbox they usedYou can use sender.Text for that.
mandai wrote:i never used sender.text, how would i put it?it will only divide whatever textbox they usedYou can use sender.Text for that.
Actually you would use that if the event was being caused by a textbox. But with a button you would probably use code like this:
Code: Select all
For i As Integer = 0 To Me.Controls.Count - 1
If Me.Controls(i).GetType().Name = "TextBox" Then
If Me.Controls(i).Text.Length = 0 Then Me.Controls(i).Text = "1"
End If
Next
6 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023