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

Images from files shrink?

I created a BMP file called 'map.bmp' that is 50x50 pixels in size. I then
execute the following code:

Image_List = gcnew ImageList() ;
Image_List->Images->Add( Image::FromFile( "map.bmp" ) ) ;

button = gcnew Button() ;

button->ImageList = Image_List ;

button->ImageIndex = 0 ;

I also make sure the button's dimensions are 50x50. What happens though is
that the image in 'map.bmp' is displayed at a much smaller size and in the
middle of the button, something like 17x17 in size!

Why is this happening? I've tried saving the image in both 24 and 32 bit
formats, no difference between the two...

In general, how do I affect the displayed SIZE of an image in a button's
image list so that it matches the button size?

HELP!

[==Peter==]




Sep 28 '07 #1
1 1013
Figured it out. The ImageList has a property called ImageSize. This sets the
display size of its images.

"Peter Oliphant" <po*******@roundtripllc.comwrote in message
news:u9**************@TK2MSFTNGP02.phx.gbl...
>I created a BMP file called 'map.bmp' that is 50x50 pixels in size. I then
execute the following code:

Image_List = gcnew ImageList() ;
Image_List->Images->Add( Image::FromFile( "map.bmp" ) ) ;

button = gcnew Button() ;

button->ImageList = Image_List ;

button->ImageIndex = 0 ;

I also make sure the button's dimensions are 50x50. What happens though is
that the image in 'map.bmp' is displayed at a much smaller size and in the
middle of the button, something like 17x17 in size!

Why is this happening? I've tried saving the image in both 24 and 32 bit
formats, no difference between the two...

In general, how do I affect the displayed SIZE of an image in a button's
image list so that it matches the button size?

HELP!

[==Peter==]





Sep 30 '07 #2

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

Similar topics

4
by: Gregory | last post by:
Hello, I've managed to build two web pages, one that can display images with associated text data in a table, and one that can resize and display images without the text. I'd like to resize the...
1
by: R Camarda | last post by:
Help, I have a database that has a data file of 2GB and a log file of 31GB. In enterprise manager, when I choose shrink it says there is 30GB of unused space. When I shrink the database, it does...
6
by: Robert J. O'Hara | last post by:
I'm one of those people who practices what some consider "dull" and others consider "elegantly conservative" page design. I appreciate good traditional typography and standards-compliant liquid...
6
by: Jens | last post by:
I have a database file LEAR_Index(yes, it hold index data) from a have have recently removed a bunch of data. It is about 120 Gb, 100Gb of which is not used. I wan´t to shrink the file to lean...
1
by: Xah Lee | last post by:
The following is a program to generate thumbnail images for a website. Useful, if you want to do that. It is used to generate the thumbnails for my “Banners, Damsels, and Mores” project...
7
by: chrisse_2 | last post by:
Hey, I currently have images in records linked to my database which print out on a report. Each of the images is a different size. What i would like to be able to do is have the image control...
9
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web...
2
by: William | last post by:
I've been tasked with taking over the support for a client's SQL Server database. I'm not a DBA by profession, I'm a software developer who uses SQL Server as a database designer. The clients...
0
by: Michael Kugler | last post by:
Is there an easy way to shrink an image isometric to a predefined size. Right now i'm doing it with imgae.GetThumbnailImage() but that's not isometric. I know it is possible to create a new...
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
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.