How to transfer values bewteen Integer and UInt32 types in VB.NET? by:Anonymous
|
The below code always get compile error, "Can not change Integer to UInt32". Then how can I set BackColor property?
With txtobj .Name = "txtProductCode" .SetText("Apple") .BackColor = 8 ' BackColor is UInt32 type End With
|
| | Reply: by:Jay B. Harlow [MVP - Outlook]
|
| | Steellock, I would expect BackColor to be of type Color.
Current versions of VB.NET do not support UInt32 its easiest to avoid them. If you need to convert to & from them I would recommend the System.Convert class
> .BackColor = Convert.ToUInt32(8) ' BackColor is UInt32 type
Hope this helps Jay
|
| | Reply: by:hirf-spam-me-here@gmx.at (Herfried K. Wagner [MVP])
|
| | What's 'txtObj'? You can try '.BackColor = UInt32.Parse(8.ToString())'.
-- Herfried K. Wagner [MVP]
|
0 Comments:
Post a Comment
<< Home