Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / September 2007

Tip: Looking for answers? Try searching our database.

Images from files shrink?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peter Oliphant - 28 Sep 2007 17:21 GMT
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==]
Peter Oliphant - 30 Sep 2007 15:04 GMT
Figured it out. The ImageList has a property called ImageSize. This sets the
display size of its images.

>I created a BMP file called 'map.bmp' that is 50x50 pixels in size. I then
>execute the following code:
[quoted text clipped - 21 lines]
>
> [==Peter==]

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.