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
Solved

Image control inconsistent size

Posted on 2000-05-11
3
153 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
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
Ashron earned 50 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA error replacing data 6 40
How to incorporate an error traping routing to existing code in VB6 11 45
using web browser with BING 40 131
How to Add / Edit Windows Menu 4 67
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

856 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