how Can i convert from rectangle to rectangle F

  • Thread starter Thread starter João Santa Bárbara
  • Start date Start date
J

João Santa Bárbara

hi all i need to convert from rect to rectf .. how can i do this ..
(VB.NET)

thks

JSB

PS: i saw a sample in C#
RectangleF TextRect;
TextRect = (RectangleF)ClientRectangle;

how can i do this in VB.NET
 
Hi,

You might try this:
Dim TextRect As RectangleF
TextRect = CType (ClientRectangle, RectangleF)

hi all i need to convert from rect to rectf .. how can i do this ..
(VB.NET)

thks

JSB

PS: i saw a sample in C#
RectangleF TextRect;
TextRect = (RectangleF)ClientRectangle;

how can i do this in VB.NET
 
JSB,
In VB.NET 2002 & 2003 you can use:
RectangleF TextRect;
TextRect = (RectangleF)ClientRectangle;
Dim TextRect As RectangleF
TextRect = RectangleF.op_Implicit(ClientRectangle)

Note: RectangleF.op_Implicit is normally hidden as it is an advanced member,
to see advanced members use 'Tools - Options - Text Editor - Basic -
eneral - Hide advance members'.

In VS.NET 2005 (due out in 2005) we gain overloaded operators so using CType
as Shiva showed will work.

Hope this helps
Jay
 
Back
Top