473,795 Members | 2,812 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 = "txtProduct Code
.SetText("Apple "
.BackColor = 8 ' BackColor is UInt32 typ
End Wit

Nov 20 '05 #1
2 1706
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.ToUInt3 2(8) ' BackColor is UInt32 type

Hope this helps
Jay

"steellock" <gu***@nttdatab j.com.cn> wrote in message
news:97******** *************** ***********@mic rosoft.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?c3RlZWxsb2N r?= <gu***@nttdatab j.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
13035
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 these are ? I know that the
10
3476
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 | ios::in ); if (!fin.is_open() ){ cout<<"File is not open."<<endl; }else{ cout<<"File is open."<<endl; }
1
1496
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 ' BackColor is UInt32 typ End Wit
20
4700
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 UInt32 Dim displayMask As UInt32 = Convert.ToUInt32(1) If (BitNum = Convert.ToUInt32(0)) Then
5
4183
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
2533
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 am really desperate now, because I havent' been able to locate the origin of the problem for a couple of days now.. PROBLEM: the message digest obtained differs each time I execute the code, but works perfectly when applying the "control", that...
9
8636
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 FFFFFFDB, which should be -37. Thanks.
19
2246
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" character string with, perhaps, foreign letters with diacritical marks, if you don't mind iso-8895-1 instead of ASCII. And if you don't like the non-std type "long long" you can always change it to "long"; but then it could only handle numbers up to...
0
1609
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 when the instance of Access is closed? I've tried the acQuitSaveAll as well as the acCmdCompileAndSaveAllModules route. b) The On Error line was added when the code was in Access 2003, when I was getting an error message regarding a bad DLL...
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9522
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10165
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10002
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9044
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6783
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.