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

setting stretch property

9
Hi,
I am developing an application.in which i want to put the image into a picture box.i need the picture box to be displayed with fixed size but the whole picture.ie
i want to know how to set the stretch property to a picture box in visual basic 6
plz give me the specific code..
Thanks in advance
Kalai
Dec 6 '06 #1
3 2904
Killer42
8,435 Expert 8TB
Hi,
I am developing an application.in which i want to put the image into a picture box.i need the picture box to be displayed with fixed size but the whole picture.ie
i want to know how to set the stretch property to a picture box in visual basic 6
plz give me the specific code.
The picturebox control doesn't have a Stretch property. The simple way around that is to use an image control, which does have a Stretch property.

If there are reasons why you must use a picturebox control, then you might want to look into the use of the Stretchblt call. Try a search of TheScripts, as I'm sure it has been mentioned plenty of times. Or try looking it up at MSDN.
Dec 6 '06 #2
RKalai
9
The picturebox control doesn't have a Stretch property. The simple way around that is to use an image control, which does have a Stretch property.

If there are reasons why you must use a picturebox control, then you might want to look into the use of the Stretchblt call. Try a search of TheScripts, as I'm sure it has been mentioned plenty of times. Or try looking it up at MSDN.

Thank you very much.. i tried the Stretchblt. this api stretching the image.but the image lost its clarity.i dont know wht to do. is there any command or function to do the same..
Thanks
Kalai
Dec 7 '06 #3
Killer42
8,435 Expert 8TB
Thank you very much.. i tried the Stretchblt. this api stretching the image.but the image lost its clarity.i dont know wht to do. is there any command or function to do the same..
Well, one of the threads I spotteed on TheScripts was about losing picture quality when resizing an image with StretchBlt, and what to do about it. I don't know what the outcome was (didn't read through the thread), but try some searching and you should find it.
Dec 7 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: matt del vecchio | last post by:
hello, i am rendering some text using a barcode font. however it is coming out quite short... i would like to increase it's vertical w/o necessarily changing the horizontal. anyone know of a...
1
by: Soobrassen Thoplan | last post by:
Hi to all I would like to know how i can dynamically stretch the background image which is on an mdi form in vb .Net .. -- Regards Soobrassen Thoplan
21
by: Michael Bierman | last post by:
Please forgive the simplicy of this question. I have the following code which attempts to determine the color of some text and set other text to match that color. It works fine in Firefox, but does...
18
by: Dixie | last post by:
Can I set the Format property in a date/time field in code? Can I set the Input Mask in a date/time field in code? Can I set the Format of a Yes/No field to Checkbox in code? I am working on...
1
by: Tyrant Mikey | last post by:
I ahve a page that contains a DataGrid control that is offset from the left-hand side of the page by about 100 pixels. What I want to do is stretch the DataGrid to fill the remainder of the page...
2
by: =?Utf-8?B?V29ua28gdGhlIFNhbmU=?= | last post by:
Hello, I have defined a control template for a progress bar. This progress bar sits in a grid column with the width set to *. How do I get the progress bar to fill in the entire space of that...
3
by: Harris Kosmidhs | last post by:
Hello. I see there is a W3C CSS2 specification for font-stretch property. I also see that no browser supports it. Why is that? And is there a work around for this? I don't want to use an image...
4
by: Bob Altman | last post by:
Hi all, I posted an earlier question to the microsoft.public.inetserver.asp.general newsgroup asking how to set the background of a client-side table cell to a gradient, and I received this...
3
vdraceil
by: vdraceil | last post by:
I'm currently working on a project in vb6. I have to display icons in the form. I use DrawIcon(picturebox1.hDC,0,0,hIcon) API to draw the icon into the picture box. As image box does'nt have hDC...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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...

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.