473,396 Members | 1,773 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,396 software developers and data experts.

a Picture Box question

Anyone can tell me how to make sure
that the width of a picture box would
become 100 pixels width if i do use the
autosize true

because the width is like 2055 for a
100 pixel width how to convert that?

Thank you all
Jul 17 '05 #1
3 7281
when I do change the ScaleWidth
the real Width does not change

Can you explain that?

"Stephane Richard" <st**************@verizon.net> wrote in message
news:Et*****************@nwrdny02.gnilink.net...
You can change the "ScaleMode" property of the picturebox to Pixels instead of the default Twips" scale.

This way if you want the picture box to be 100 you can simply set the
Picture box's width to 100 instead of that 2055 you're talking about.

--
Stéphane Richard
Senior Software and Technology Supervisor
http://www.totalweb-inc.com
For all your hosting and related needs

"Yang Li Ke" <ya******@sympatico.ca> wrote in message
news:uW*******************@news20.bellglobal.com.. .
Anyone can tell me how to make sure
that the width of a picture box would
become 100 pixels width if i do use the
autosize true

because the width is like 2055 for a
100 pixel width how to convert that?

Thank you all


Jul 17 '05 #2
Borders = Width - ScaleWidth
what do you mean by Borders ?
a picture box has no Borders

"J French" <Bo*************@iss.u-net.com_.bin> wrote in message
news:3f***************@news.btclick.com... On Tue, 1 Jul 2003 09:41:48 -0400, "Yang Li Ke"
<ya******@sympatico.ca> wrote:
when I do change the ScaleWidth
the real Width does not change

Can you explain that?


Change the Widh
Borders = Width - ScaleWidth

Jul 17 '05 #3
On Tue, 1 Jul 2003 12:19:15 -0400, "Yang Li Ke"
<ya******@sympatico.ca> wrote:
Borders = Width - ScaleWidth


what do you mean by Borders ?
a picture box has no Borders

Try it - with a PictureBox with BorderStyle set to FixedSingle

Private Sub Command1_Click()
Me.Print Picture1.Width - Picture1.ScaleWidth
End Sub

You should get 60 printed - eg: 4 pixels

Actually I was being obscure
- the ScaleWidth property is rather different from the Width property
- changing the ScaleWidth property directly changes the 'ScaleMode'
- it is like changing the ScaleMode from vbTwips to vbPixels
(like, but not exactly that - look up ScaleWidth in the Help File)

To adjust something to have a desired ScaleWidth you _must_ attack it
through the Width property
- hence

Borders = Width - ScaleWidth
or
Width = Borders + ScaleWidth

Obviously the ScaleMode must be the same ...
Jul 17 '05 #4

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

Similar topics

1
by: Simone Winkler | last post by:
Hello, I don't know if my question is out of topic...so I apologize if I am. I use the coppermine picture gallery for my web (actually I want to use it but the server doesn't seem to have GD...
10
by: Chris Coho, Jr. | last post by:
Ok, I'll explain the whole problem because there may be several ways to solve this and hopefully someone knows one. What I'm doing is creating a specialty template editor, similar to say a corel...
4
by: DraguVaso | last post by:
Hi, In my application I receive a Byte Stream (Dim bytFile() As Byte) which contains a jpeg-picture, which I want to display in a picturebox. I want to display it directly from the bytfile()...
6
by: John Ortt | last post by:
Hi there everyone, I have a part info form which has a faded image of our company logo as a background. I want to replace the faded image with a bright red warning image on items which have run...
4
by: Andre Nogueira | last post by:
Hi there. I have one question... How can I create a bitmap (programmatically), paint it to a picture box and have a transparent background? I don't know what will be below the picturebox because...
2
by: zheng | last post by:
ÇçÌì I have a word document and it has a picture object, I want save the picture object as other single picture file by C# program. I have a idea, by clipboard, copy the picture to clipboard, and...
14
by: hamil | last post by:
I am trying to display an image in a picture box. The image is a group 4 fax black and white image of a piece of sheet music. The original resolution is 300 X 300 dpi. I want to have the picture...
17
by: merrily | last post by:
Read in one forum the question someone asked after successfully (sort of) installing Picture It 2000 on new computer with Vista. Will this person or any other help me accomplish this install on...
46
by: OldBirdman | last post by:
What a mess this question is. I have spent 2 weeks trying to make it concise and clear, and I can't. I do not have the vocabulary for the question. I cannot even TITLE it correctly. Here is my...
8
by: Jonathan Sachs | last post by:
I'm trying to compose a list of items, each of which consists of text that wraps around a picture at the left margin. The examples I have seen tell me to do it like this: <p><img src="xxxx.jpg"...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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,...

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.