PC Review


Reply
Thread Tools Rate Thread

how Can i convert from rectangle to rectangle F

 
 
Joăo Santa Bárbara
Guest
Posts: n/a
 
      21st Jul 2004
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


 
Reply With Quote
 
 
 
 
Shiva
Guest
Posts: n/a
 
      21st Jul 2004
Hi,

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

"Joăo Santa Bárbara" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
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



 
Reply With Quote
 
Jay B. Harlow [MVP - Outlook]
Guest
Posts: n/a
 
      21st Jul 2004
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

"Joăo Santa Bárbara" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rectangle Box Keyrookie Microsoft Excel Worksheet Functions 1 27th Jan 2008 08:09 AM
GDI+ - finding a rectangle inside another rectangle sklett Microsoft C# .NET 10 20th Jul 2007 08:33 PM
A Rectangle Contains/touches other Rectangle =?Utf-8?B?TUFC?= Microsoft C# .NET 1 16th Feb 2007 02:56 PM
Rectangle Box =?Utf-8?B?Q0s=?= Microsoft Access Reports 1 6th Jan 2005 04:04 PM
Not A Rectangle woodBeeProgrammer Microsoft C# .NET 5 17th Dec 2003 12:07 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:33 PM.