
Originally Posted by
PlausiblyDamp
Seemed to work for me
In your example combination of b1 (100) and b2 (200) will never reach short's half (25800 not even close to 32767).
Try 255 and 255 and instead of 65535 we expect that achieve -1. (Or try other negative values based on your calculator)
I wasn't following the "write them down on separate lines" paragraph.
If you mean
Code:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim HIGHBYTE As Byte = 255
Dim LOWBYTE As Byte = 255
TextBox1.Text = CShort((HIGHBYTE * 256) + LOWBYTE)
End Sub
I've tried it. Same exception occurs.