how Can i convert from rectangle to rectangle F

  • Thread starter João Santa Bárbara
  • 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
 
S

Shiva

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
 
J

Jay B. Harlow [MVP - Outlook]

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
 

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

Top