[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Image control inconsistent size

Posted on 2000-05-11
3
Medium Priority
?
160 Views
Last Modified: 2010-05-02
I've got a form of set size/fixed borders. I have a number of bitmaps on the form in image controls. They all look hunky dory on my screen, but sometimes when the app is run elsewhere, the graphics are all shorter and narrower than they appear on my screen, which throws things off center and makes me look bad. :-(

I'm assuming this is a screen resolution issue. But I can't mandate the user's screen resolution. So I need to find another way around this.

The image controls each have the .Stretch set to false. Would resetting this to true do it? (I know. I could try it and see. But I don't have consistent access to any of the computers that I've seen it not work on, so I have to fix it without being able to verify that the fix works.)

Any input would be greatly appreciated. Thanks! -- b.r.t.
0
Comment
Question by:BarryTice
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
Ashron earned 200 total points
ID: 2801789
Hi BarryTice.
The answer is yes, setting the Stretch property of the Image control will resize it to the size of the image you load in it, but it won't resize the size of it's container ( frame, form, so on). Unfortunatly, this control doesn't provide the Resize Event. You can easyly figure a way to work around. For example, you could define the SetImage Function, who would load the image into the Control, and then resize its container. Another way you could do it is to use the PictureBox control, which provides the Resize Event. You would code the same in both procedure, but the last has the advantage of updating the size of it's container even if you access the control directly.

The code in the resize event would look like something like this :

private sub pic_Resize()
  ' The pic is in a form
  me.move me.left, me.top, pic.width + 200, pic.height + 200
end sub

Here I use the Move so there is only one Resize Message sent to the From. The 200 value is a random value out of my imagination. You'll have to test it to fit your need.

Hope this help

0
 
LVL 7

Author Comment

by:BarryTice
ID: 2801983
Ashron --

Thanks for the response, but I'm not sure what the resize event would have to do with this. I'm not attempting to resize the graphic, only to not have it appear smaller on some screens.

The graphics in the images are set at design time. They are never changed at run time. Therefore, resize doesn't come into play, that I understand.

Please clarify this, if you would be so kind.

-- b.r.t.


 
0
 
LVL 7

Author Comment

by:BarryTice
ID: 2810710
Well, I'm still not sure what you had intended with the resize events. But setting .Stretch to True did the trick, so I guess that's the answer. (I got access to one of the computers it has blown up on in the past to check it. Unfortunately, that requires kicking the coworker off long enough to do it, which meant she couldn't get any work done while I was testing. :-( )

So, for the long and short of it, I guess you gave me more information than I needed, and I can't fault you for that. Here's your "A" and your first 200 points.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question