473,399 Members | 3,302 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.

how Can i convert from rectangle to rectangle F

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
Nov 22 '05 #1
2 2430
Hi,

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

"João Santa Bárbara" <jo****@i24portugal.com> wrote in message
news:OI**************@TK2MSFTNGP12.phx.gbl...
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

Nov 22 '05 #2
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" <jo****@i24portugal.com> wrote in message
news:OI**************@TK2MSFTNGP12.phx.gbl... 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

Nov 22 '05 #3

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

Similar topics

2
by: João Santa Bárbara | last post by:
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;
15
by: Steven T. Hatton | last post by:
The following may strike many of you as just plain silly, but it represents the kind of delelima I find myself in when trying to make a design decision. This really is a toy project written for...
1
by: Tamir Khason | last post by:
Somebody knows how to convert Bounds to Point ??? Thnx
7
by: Sergio Florez M. | last post by:
How can I convert a Bitmap to a byte array? I've searched all over and none of the code samples I've managed to find work. Actually, I just need to create a Byte array starting from an Image...
4
by: Harry Hudini | last post by:
Hi, I need to run exactly this code in an asp.net file when someone uploads an image, but i dont know C# and im having real issues converting it. If anyone can, could you convert it to VB.net...
1
by: Daniel | last post by:
I have looked everywhere on the web for an answer to this and the only thing I can find is converting the image format when the file is present on the local filesystem. What I want to do is use a...
2
by: UJ | last post by:
I have need to convert a text string (with formatting) to an image. This is so that I can resize the image to different sizes and the formatting stays exactly the same regardless of the size. I...
1
by: Sugan | last post by:
Hi all, I'm creating a custom button control. I need to show a color image when the button control is enabled and a gray shade of the same image when the button control is disabled. How can i...
2
by: Angus | last post by:
Hello I have some classes defined in shapes.h and use them like this: const IShape* rectangle = new Rectangle(10.0, 20.0); // width, height cout << rectangle->calculateArea() << endl; ...
4
by: krishp | last post by:
Hi, I need to convert raw data recieved from a device through C#.Net socket to BMP format. For some reason the image conversion is not happening proparly and I can see only blur image . ...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.