assigning unsigned values in vb.net

  • Thread starter Thread starter Thiru .Net
  • Start date Start date
T

Thiru .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
 
Thiru,

You cannot use unsigned integers in VBNet 2002/2003

I hope this helps,

Cor
 
Thiru .Net said:
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)
///
 
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
 
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
 
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
 
Thiru .Net said:
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?
 
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
 
Thiru .Net said:
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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top