Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading from a currency counter
Message
From
05/12/2015 11:45:25
 
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01628506
Message ID:
01628526
Views:
30
>>>OTOH maybe just setting the TextBox.Multiline = true ?
>>
>>Bingo!
>>That was the answer, Viv.
>>I tried that and it gave me what I needed.
>>It's interesting that when Multiline is set to false, the carriage returns disappear, but they're preserved when it's set to true. I'm sure that there's some logic there, but it escapes me.
>>That gave me me what I needed to separate the amounts.
>>Thanks, Viv
>
>Glad it was so easy :-}


Here's another question, Viv
string[] moneylines = Regex.Split(frmCounting.textBoxDemoninations.Text, "\r\n");
workingprocessds.depdetail[0].ones = Convert.ToDecimal(moneylines[0].TrimEnd().TrimStart());
workingprocessds.depdetail[0].twos = Convert.ToDecimal(moneylines[1].TrimEnd().TrimStart());
workingprocessds.depdetail[0].fives = Convert.ToDecimal(moneylines[2].TrimEnd().TrimStart());
workingprocessds.depdetail[0].tens = Convert.ToDecimal(moneylines[3].TrimEnd().TrimStart());
workingprocessds.depdetail[0].twentys = Convert.ToDecimal(moneylines[4].TrimEnd().TrimStart());
workingprocessds.depdetail[0].fiftys = Convert.ToDecimal(moneylines[5].TrimEnd().TrimStart());
workingprocessds.depdetail[0].hundreds = Convert.ToDecimal(moneylines[6].TrimEnd().TrimStart());
workingprocessds.depdetail.AcceptChanges();
This code successfully parses the text into the 7 correct denominations.

For testing, I activate this code by pressing a command button.
Is there any way that I can force this code to be activated automatically after the multiline textbox is filled?
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform