Maskedtextbox only accept a value with two decimals (VB Windows form)

  • Thread starter Thread starter Jonathan.12
  • Start date Start date
J

Jonathan.12

Guest
Hello,

I'm building an calculator in Visual Studio (Visual Basic) and I'm stuck with the Maskedtextbox control. I want that the user only can give a value with two decimals. A value of 2.20 needs to be accepted and a value of 99.93. I want a code that only accept a value between 1 and 100 with two decimals.



If value.MaskCompleted = true Then

Value * 2

Else

MsgBox("The calculator only accept a value with two decimals!", , "Input"

End if


I now have my mask set to 00.00, but the value of 9.93 it doesn't accept.

Is my idea possible with the Maskedtextbox control?

Thanks in advance

Jonathan

Continue reading...
 
Back
Top