473,399 Members | 3,888 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,399 software developers and data experts.

assigning unsigned values in vb.net

how to assign unsigned values in vb.net
i have a statement like this in c#

public const uint FEEDER = 0x00000001;

when i tried to convert above into vb.net
i said
Public Const FEEDER As int64 = 0x00000001

but it gives error in the values assigned and saying
end of statement expected..

wht does it mean ? and how to assign values like the above in vb.net ?
thanks in advance..
Thiru.S

Nov 21 '05 #1
9 4136
Thiru,

You cannot use unsigned integers in VBNet 2002/2003

I hope this helps,

Cor

"Thiru .Net" <th*********@walla.com> schreef in bericht
news:11**********************@o13g2000cwo.googlegr oups.com...
how to assign unsigned values in vb.net
i have a statement like this in c#

public const uint FEEDER = 0x00000001;

when i tried to convert above into vb.net
i said
Public Const FEEDER As int64 = 0x00000001

but it gives error in the values assigned and saying
end of statement expected..

wht does it mean ? and how to assign values like the above in vb.net ?
thanks in advance..
Thiru.S

Nov 21 '05 #2
"Thiru .Net" <th*********@walla.com> schrieb:
i have a statement like this in c#

public const uint FEEDER = 0x00000001;

when i tried to convert above into vb.net
i said
Public Const FEEDER As int64 = 0x00000001

but it gives error in the values assigned and saying
end of statement expected..


'0x00000001' is no valid hexadecimal integer literal in VB.NET. In addition
to that, VB.NET 2002/2003 do not support unsigned types out of the box.
Solution:

\\\
Public ReadOnly FEEDER As UInt64 = Convert.ToUInt64(&H1)
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3
hi Wagner,
thanks a lot for ur answer regarding hexadecimal...

i have one more question i.e.
wht is the equilent VarPtr function in vb.net.

if not, otherwise can we have indirect method in vb.net?

waiting for ur reply,
thanks in advance,

regards,
Thiru.s


--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 23 '05 #4
hi Wagner,
thanks a lot for ur answer regarding hexadecimal...

i have one more question i.e.
wht is the equilent VarPtr function in vb.net.

if not, otherwise can we have indirect method in vb.net?

waiting for ur reply,(I)
thanks in advance,

regards,
Thiru.s


Thiru.S

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 23 '05 #5
hi Waganer,
thanks a lot for ur answer to hexadecimal probelm.

i ve one more doubt in vb.net..
wht is the vb.net equlient function for VarPtr() which is in vb6?

waiting for the reply,
thanks in advance.

regards,
Thiru.s


--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 23 '05 #6
"Thiru .Net" <th*******@sify.com> schrieb:
i have one more question i.e.
wht is the equilent VarPtr function in vb.net.


There is no direct equivalent. What exactly do you want to archieve?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 23 '05 #7
hi wegner,

Structure REGDEF
Dim iLeft As Int16
Dim iTop As Int16
Dim iWidth As Int16
Dim iHeight As Int16
Dim iAttr As Int16
Dim iLanguage As Int16
Dim sCountry As String
Dim szType As String
Dim szParams As String
End Structure

Structure CH
Dim iLeft As Int16
Dim iTop As Int16
Dim iWidth As Int16
Dim iHeight As Int16
Dim iLine As Byte
Dim iWord As Byte
Dim iChar As Byte
Dim iConfidence As Byte
Dim res As String
End Structure

both structures have similar fields like iTop,iWidth like that..

actuallly i want to copy a structure REGDEF using it's pointer address
to structure CH.

Thiru.S

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 23 '05 #8
"Thiru .Net" <th*******@sify.com> schrieb:
Structure REGDEF
Dim iLeft As Int16
Dim iTop As Int16
Dim iWidth As Int16
Dim iHeight As Int16
Dim iAttr As Int16
Dim iLanguage As Int16
Dim sCountry As String
Dim szType As String
Dim szParams As String
End Structure

Structure CH
Dim iLeft As Int16
Dim iTop As Int16
Dim iWidth As Int16
Dim iHeight As Int16
Dim iLine As Byte
Dim iWord As Byte
Dim iChar As Byte
Dim iConfidence As Byte
Dim res As String
End Structure

both structures have similar fields like iTop,iWidth like that..

actuallly i want to copy a structure REGDEF using it's pointer address
to structure CH.


Mhm... In this particular case I think it's much easier and safer to copy
the members by hand.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 23 '05 #9
hi wagner,
i have a doubt in panel control in windows application.

i have a panel control wherein i have put a picturebox control.
i show picture into picturbox control.

now i need to zoom in and zoom out the picture in the picturebox
control.
the picturebox control is within panel(autoscroll is enabled true)
scroll bars are enabled.

PictureBox1.Width = PictureBox1.Width + 25
PictureBox1.Height = PictureBox1.Height + 25

the problem is the picture goes only right side when it gets size
enlarged.

then i used left and top properties

PictureBox1.Width = PictureBox1.Width + 25
PictureBox1.Height = PictureBox1.Height + 25
PictureBox1.Left = PictureBox1.Left - 20
PictureBox1.Top = PictureBox1.Top - 5

the above code streched the picture both left and right side...but the
problem is i can scroll right side and see the picture but i could not
scroll left side to see picture streched on the left side.

can u please tell me the code to strech and zoom in and out both sides
and should be viewed thru scrollbars both sides using panel.

thanks in advance,


Regards,
Thiru.S

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 23 '05 #10

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

Similar topics

10
by: Ben | last post by:
Hi all, I would like to know if there is an easy way to assign a string to an int. I have a struct such as: struct Values { int a; int b; }
1
by: George Marsaglia | last post by:
The essence of a multiply-with-carry RNG is to have declarations in the RNG proc, such as unsigned long mwc( ){ static unsigned long x = 123456789, c = 362436; unsigned long long t, a =...
12
by: bollod | last post by:
Is there any benefit to declaring a variable: x = (1<<12); instead of: x = 4096; (besides the geek appeal of course ;-) )
3
by: yogi | last post by:
Hi guys, I'm trying to write a program that will read in a series of files and create a 3D array from the files read in for converting 2D images to 3D objects. The values read in will be...
5
by: Phil Latio | last post by:
I have 2 virtually identical tables and wish to move data between them. Basically one table is called "live_table" and the other is named "suspended_table" and the only difference is that the...
9
by: Noel Milton | last post by:
Hi: Ok, I've just read in up to 65,535 bytes into a char array (using the recvfrom socket API call). So I have an array of 8 bit char's (char recvString;). Now, four (4) consecutive bytes...
17
by: Cliff | last post by:
Hi, I'm in the process of porting some code from a 3rd party and have hit a problem with the following: typedef struct { unsigned char Red; unsigned char Green; unsigned char Blue;...
43
by: emyl | last post by:
Hi all, here's an elementary question. Assume I have declared two variables, char *a, **b; I can then give a value to a like a="hello world";
9
by: shortyzms | last post by:
I'm having a problem with assigning 64-bit hex values to unsigned long variables in MS VS2005 c++ compiler. unsigned long Number; Number = 0x1000000000000000UL; After this declaration and...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.