显示文本框输出的函数 vb.net
Function showing output to textbox vb.net
美好的一天,
我用的是visualstudio2019,功能是这样的:
Sub doQR()
Dim SallerName As String = gethexstring(1, "Bobs Records")
Dim VATReg As String = gethexstring(2, "310122393500003")
Dim DateTimeStr As String = gethexstring(3, "2022-04-25T15:30:00Z")
Dim TotalAmt As String = gethexstring(4, "10000.00")
Dim VatAmt As String = gethexstring(5, "150.00")
Dim decString As String = SallerName & VATReg & DateTimeStr & TotalAmt & VatAmt
Console.WriteLine(decString)
Console.WriteLine(HexToBase64(decString))
Console.Read()
End Sub
我想在文本框中显示输出(output.text)
谢谢,
将其放入文本框
Sub doQR()
Dim SallerName As String = gethexstring(1, "Bobs Records")
Dim VATReg As String = gethexstring(2, "310122393500003")
Dim DateTimeStr As String = gethexstring(3, "2022-04-25T15:30:00Z")
Dim TotalAmt As String = gethexstring(4, "10000.00")
Dim VatAmt As String = gethexstring(5, "150.00")
Dim decString As String = SallerName & VATReg & DateTimeStr & TotalAmt & VatAmt
Console.WriteLine(decString)
Console.WriteLine(HexToBase64(decString))
Console.Read()
' do this
TextBox1.Text = decString
End Sub
试试这个:
Sub doQR()
Dim SallerName As String = gethexstring(1, "Bobs Records")
Dim VATReg As String = gethexstring(2, "310122393500003")
Dim DateTimeStr As String = gethexstring(3, "2022-04-25T15:30:00Z")
Dim TotalAmt As String = gethexstring(4, "10000.00")
Dim VatAmt As String = gethexstring(5, "150.00")
Dim decString As String = SallerName & VATReg & DateTimeStr & TotalAmt & VatAmt
Console.WriteLine(decString)
Console.WriteLine(HexToBase64(decString))
Console.Read()
output.text = HexToBase64(decString)
End Sub
或者如果您只想显示 decString
,则替换此行:
output.text = HexToBase64(decString)
与:
output.text = decString
美好的一天, 我用的是visualstudio2019,功能是这样的:
Sub doQR()
Dim SallerName As String = gethexstring(1, "Bobs Records")
Dim VATReg As String = gethexstring(2, "310122393500003")
Dim DateTimeStr As String = gethexstring(3, "2022-04-25T15:30:00Z")
Dim TotalAmt As String = gethexstring(4, "10000.00")
Dim VatAmt As String = gethexstring(5, "150.00")
Dim decString As String = SallerName & VATReg & DateTimeStr & TotalAmt & VatAmt
Console.WriteLine(decString)
Console.WriteLine(HexToBase64(decString))
Console.Read()
End Sub
我想在文本框中显示输出(output.text)
谢谢,
将其放入文本框
Sub doQR()
Dim SallerName As String = gethexstring(1, "Bobs Records")
Dim VATReg As String = gethexstring(2, "310122393500003")
Dim DateTimeStr As String = gethexstring(3, "2022-04-25T15:30:00Z")
Dim TotalAmt As String = gethexstring(4, "10000.00")
Dim VatAmt As String = gethexstring(5, "150.00")
Dim decString As String = SallerName & VATReg & DateTimeStr & TotalAmt & VatAmt
Console.WriteLine(decString)
Console.WriteLine(HexToBase64(decString))
Console.Read()
' do this
TextBox1.Text = decString
End Sub
试试这个:
Sub doQR()
Dim SallerName As String = gethexstring(1, "Bobs Records")
Dim VATReg As String = gethexstring(2, "310122393500003")
Dim DateTimeStr As String = gethexstring(3, "2022-04-25T15:30:00Z")
Dim TotalAmt As String = gethexstring(4, "10000.00")
Dim VatAmt As String = gethexstring(5, "150.00")
Dim decString As String = SallerName & VATReg & DateTimeStr & TotalAmt & VatAmt
Console.WriteLine(decString)
Console.WriteLine(HexToBase64(decString))
Console.Read()
output.text = HexToBase64(decString)
End Sub
或者如果您只想显示 decString
,则替换此行:
output.text = HexToBase64(decString)
与:
output.text = decString