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++ / February 2005

Tip: Looking for answers? Try searching our database.

forms application in vc++.net doubt

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sanjeeva Reddy - 12 Feb 2005 09:30 GMT
Hi,

I am new to VC dot net.

I shall be thakful if you can reply one of my query.
how to change the size of images in imagelist in listview control
vc++.net(forms application).

Thanks and Regards,
Sanjeev
Antti Keskinen - 12 Feb 2005 16:09 GMT
Hi !

I'm assuming you're using .NET Framework, because you're using Windows
Forms. In that case, a ListView class has three properties called
LargeImageList, SmallImageList and StateImageList, each related to a
specific display mode of the ListView.

Each of these properties is an ImageList class. This class has ImageSize
property (type Size), that determines the size of the images in this image
collection. Changing this parameter determines the size of the images in the
list. Know that the images themselves are located in ImageList::Images
property, which is of ImageList::ImageCollection type.

Code examples are always the best, so here you go. This is a C++/CLI
example, because that language is much more flexible with .NET Framework
than Managed C++. The only thing this affects in the sample code is the
creation process of the System::Drawing::Size object. In Managed C++, this
is done in a different manner.

<code snip>

MyListView->SmallImageList->ImageSize = gcnew System::Drawing::Size( 200,
200 ); // Sets small image size to 200, 200
MyListView->LargeImageList->ImageSize = gcnew System::Drawing::Size(100,
100); // Sets large image size to 100, 100

</code snip>

Hope this helps

-Antti Keskinen

> Hi,
>
[quoted text clipped - 6 lines]
> Thanks and Regards,
> Sanjeev

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.