473,486 Members | 2,407 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

[VB.NET] Scaling a picturebox

Going from VB6 to VB.NET i have lost the capability to do the most simple
things...

In VB6 scaling a picturebox was done like this: Me.picturebox.scale
(0,25)-(25,0)

How is it done in VB.NET ?

All I want to do is draw simple lines and circle in a coordinate system.
Jul 17 '05 #1
2 14690
Set PictureBox.SizeMode to Normal (the default), AutoSize, CenterImage, or StretchImage. Normal means that the image is placed in the control's upper-left corner; if the image is larger than the control, its lower and right edges are clipped. CenterImage means that the image is centered within the control; if the image is larger than the control, the picture's outside edges are clipped. AutoSize means that the size of the control is adjusted to the size of the image. StretchImage is the reverse, and means that the size of the image is adjusted to the size of the control.

i.e PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage

Phil
"Bent F" <bf@bf.dk> wrote in message news:41*********************@dread16.news.tele.dk. ..
Going from VB6 to VB.NET i have lost the capability to do the most simple
things...

In VB6 scaling a picturebox was done like this: Me.picturebox.scale
(0,25)-(25,0)

How is it done in VB.NET ?

All I want to do is draw simple lines and circle in a coordinate system.
Jul 17 '05 #2
Almost everybody in this newsgroup is using VB6 or lower. While you may
get a stray answer to VB.NET (including VB2003 and VB2005 which has
dropped .NET from its name) questions here, you should ask them in
newsgroups devoted exclusively to .NET programming. Look for newsgroups
with either the word "dotnet" or "vsnet" in their name.

For the microsoft news server, try these newsgroups...

microsoft.public.dotnet.general
microsoft.public.dotnet.languages.vb
microsoft.public.vsnet.general

There are some others, but these should get you started.

Rick - MVP

"Bent F" <bf@bf.dk> wrote in message
news:41*********************@dread16.news.tele.dk. ..
Going from VB6 to VB.NET i have lost the capability to do the most simple things...

In VB6 scaling a picturebox was done like this: Me.picturebox.scale (0,25)-(25,0)

How is it done in VB.NET ?

All I want to do is draw simple lines and circle in a coordinate system.


Jul 17 '05 #3

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

Similar topics

3
8331
by: jeff | last post by:
Hiya, Im currently in the process of developing a picture browser, I want it to run off a CD, basically I have 2 questions for the group. The first is how do I get the program to only view the...
13
3284
by: Metallicraft | last post by:
I have a vb6 application. On the main form is a picture box with one or two images and several pieces of text displayed in it. These are created on the fly using gdi32 routines that are all in a...
13
2539
by: Dr. Zharkov | last post by:
Hello. A problem in the following. In VB .NET 2003 we create the project and in file Form1.vb the following code is written down: Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As...
0
1614
by: SamSpade | last post by:
I have a usercontrol that contains a picturebox. The user can obtain (creategraphics) a picturebox graphics object and draw on the picturebox. She could do gr.GraphincInit.Millimeter and then draw...
1
1780
by: Eric | last post by:
Hi, I'm writing a program that based on input will create a document. It is something simulair as a printing example. In MS Word when you click on the shown document you can zoom in and if you...
0
1255
by: M1Sports20 | last post by:
Here is a class i have expanded off of microsoft picturebox array in msdn. I have found a problem and I am thinking its not my fault. Here is how to reproduce the error 1. Create an instance of...
7
1466
by: creamBoy | last post by:
In VB6 scaling a picturebox was done like this: Me.picturebox.scale (0,25)-(25,0) How is it done in VB.NET ? Also, I want to draw simple lines and circle in a coordinate system on the picturbox....
6
2203
by: TEN Ware | last post by:
I have written an app in VB2005. This app uses a picturebox that is 256x256 pixels. It looks fine on the PC on which the app was developed. When I run the app on another PC, the picture box...
0
1056
by: EricW | last post by:
hi, For my program I have two forms. each has a picturebox on it. The second form is to allow the user to determine where he wants to place a small drawing in an existing drawing. When he is...
0
7100
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6964
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
7330
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
5434
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,...
1
4865
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...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3070
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
262
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.