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

Assing Picture1.Picture to Image1.Picture

Hi,

Is it possible to assign the Picture property of a picturebox to the
Picture property of an image control?

I use an invisble picturebox to make some changes to a picture, but I
want to show the picture in an imagecontrol, since the image is very
large and I want to stretch it.

But when I execute the following code:

Image1.Picture = Picture1.Picture
Image1.Refresh

The image control Image1 stays empty. What am I doing wrong?

Thanks in advance,
Sandra
Jul 17 '05 #1
3 10425
Hello Sandra,

What you can do, it using an imagelist (project -> components -> microsoft
windows common controls 5.0 / or 6.0).
Open the imagelist's property dialog (right mouse click on the control ->
properties) and add the image to the list.
Fill some name in the key box (e.g. "MyPic").

Then bind the imagecontrol and the picturebox to the imagelist:

Image1.Picture = ImageList1.ListImages.Item("MyPic").Picture
Picture1.Picture = ImageList1.ListImages.Item("MyPic").Picture

and voila !

Good luck,
Ramon.
"Sandra Setz" <ss***@wxs.nl> wrote in message
news:74**************************@posting.google.c om...
Hi,

Is it possible to assign the Picture property of a picturebox to the
Picture property of an image control?

I use an invisble picturebox to make some changes to a picture, but I
want to show the picture in an imagecontrol, since the image is very
large and I want to stretch it.

But when I execute the following code:

Image1.Picture = Picture1.Picture
Image1.Refresh

The image control Image1 stays empty. What am I doing wrong?

Thanks in advance,
Sandra

Jul 17 '05 #2
On 12 Aug 2004 01:35:45 -0700, ss***@wxs.nl (Sandra Setz) wrote:
Hi,

Is it possible to assign the Picture property of a picturebox to the
Picture property of an image control?

I use an invisble picturebox to make some changes to a picture, but I
want to show the picture in an imagecontrol, since the image is very
large and I want to stretch it.

But when I execute the following code:

Image1.Picture = Picture1.Picture
Image1.Refresh

The image control Image1 stays empty. What am I doing wrong?


1) Autoredraw
2) Set X = Picture1.Image

The Picture of a Picturebox stays the same when you tinker with
Picture1.Image
Jul 17 '05 #3
er*****@nowhere.com (J French) wrote :
1) Autoredraw
2) Set X = Picture1.Image

The Picture of a Picturebox stays the same when you tinker with
Picture1.Image


Yes, this did the trick for me. Thanks!!!

Sandra
Jul 17 '05 #4

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

Similar topics

3
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...
2
by: Sandra Setz | last post by:
Hi, I was wondering if someone could explain to me what the difference is between the width propery of the picture property of an image and the width property of the image itself. I would...
8
by: marslee | last post by:
I know how to use buttons to go to the next and previous picture in slide show, but i want to change it so when the user clicks the picture instead of button, the script shows the next phicture. ...
0
by: wolf | last post by:
Hi I had put a PictureBox and three Buttons on a Form. I want the PictureBox show the 1.gif if I click button1 and show 2.gif if I click button2 and so on. But while it running, the value of...
4
by: janie66 | last post by:
Hi guys Can anyone please help me out i need to display image on form .i have a requirment iam pulling data from query... PRDID PRDNAME PRDPIC 01 XYX ...
1
by: nowitsoverx | last post by:
I'm just trying to test something out to see if I can get it working but I'm a little stuck. I have two frames. The left one has a menu of radio buttons. I want it so when you click on the radio...
3
by: mpratheepa | last post by:
How to get a picture file (*.jpg extension) in Image tool box in the form during run time. I used Image1.Picture = LoadPicture(photoname) photoname is from table which contains file name...
12
sgrec7
by: sgrec7 | last post by:
hey guys, guess what, i've got another problem for you!! i want it so that when image1 touches image2, a "crashed message" appears this dosen't work: private sub form1_keypress (keyascii...
2
by: junkmatred | last post by:
Please help guys, Picture1.hdc is returning a different value than GetDC(Picture1.hwnd) Look at the source code I've provided. This doesn't make any sense! I need help! Option Explicit...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...

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.