473,396 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to transfer values bewteen Integer and UInt32 types in VB.NET?

The below code always get compile error, "Can not change Integer to UInt32". Then how can I set BackColor property

With txtob
.Name = "txtProductCode
.SetText("Apple"
.BackColor = 8 ' BackColor is UInt32 typ
End Wit

Nov 20 '05 #1
2 1685
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

"steellock" <gu***@nttdatabj.com.cn> wrote in message
news:97**********************************@microsof t.com... 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

Nov 20 '05 #2
* =?Utf-8?B?c3RlZWxsb2Nr?= <gu***@nttdatabj.com.cn> scripsit:
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


What's 'txtObj'? You can try '.BackColor = UInt32.Parse(8.ToString())'.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: David Fisher | last post by:
The most common sizes of integer types seem to be: 8 bits - signed char 16 bits - short 16 or 32 bits - int 32 or 64 bits - long Question #1: Does anyone know how common sizes other than...
10
by: jiing | last post by:
I am reading a binary file *.dat, (8-bit unsigned char) Now I want to transfer the value in it as decimal, how can I do ? Thanks in advance. ifstream fin("usb1_8192_out.dat", ios::binary |...
1
by: steellock | last post by:
The below code always get compile error, "Can not change Interger to UInt32". Then How to set the BackColor property With TextObjec .Name = "txtProductCode .SetText("Apple" .BackColor = 8 '...
20
by: barbara | last post by:
Hi, all I have to read a binary data which is four bytes and I need to use the following function to deal with data: Private Function BIT(ByVal Val As UInt32, ByVal BitNum As UInt32) As...
5
by: Boni | last post by:
Dear all, how do I convert a .NET integer into System.Uint32 (needed to call external function) Thanks, Boni
2
by: Fernando Barsoba | last post by:
Dear all, I have been posting about a problem trying to encrypt certain data using HMAC-SHA1 functions. I posted that my problem was solved, but unfortunately, I was being overly optimistic. I...
9
by: Chris Botha | last post by:
Hi, I have an UInt32 and want to stick the value into an Integer and get an Overflow exception, BUT using C# the same value can be casted into an int and the value is as expected. The Hex value is...
19
by: Robbie Hatley | last post by:
For your enjoyment, a function that expresses any integer with absolute value less-than-or-equal-to nine quintillion in any base from 2 to 36. (For larger bases, you could expand the "digit"...
0
by: peridian | last post by:
Hi, I have the below code to transfer code modules between Access database files. I have three problems, only one of which is annoying. a) How do you prevent the Save As box from appearing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.