|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Global ImageListI do not want to setup and create my ImageList over and over again on
different forms in my project. Is there any ways to achieve it? so that I will be more easy to manage my ImageList as well as minimize the performance overhead. Thanks~ Windy,
Than you don't use them as objects however global in your program. That can be using a module, however I prever a Shared Class. \\\ Public mySharedValues as class mImageList as Imagelist Public shared Property myImageList() as ImageList Get return mImageList End Get Set (value as ImageList) mImageList = value End Set End Property End Class //// You can use your images now as \\\ mySharedValues.myImageList /// To see how to use it, just open the + in the designer and copy the code about the imagelist that the designer created. You have to type less than I do most goes automaticly by the IDE, so watch typos or whatever, I hope this helps, Cor Show quoteHide quote <Windy> schreef in bericht news:OKM7vKjJGHA.3000@TK2MSFTNGP14.phx.gbl... >I do not want to setup and create my ImageList over and over again on >different forms in my project. > Is there any ways to achieve it? so that I will be more easy to manage my > ImageList as well as minimize the performance overhead. > > Thanks~ > Hi Cor,
I still have some difficulties on creating the Image, cannot use design view to help creating them? Thanks a lot. Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> ¼¶¼g©ó¶l¥ó·s»D:u9DiCWjJGHA.3***@TK2MSFTNGP10.phx.gbl... > Windy, > > Than you don't use them as objects however global in your program. That > can be using a module, however I prever a Shared Class. > > \\\ > Public mySharedValues as class > mImageList as Imagelist > Public shared Property myImageList() as ImageList > Get > return mImageList > End Get > Set (value as ImageList) > mImageList = value > End Set > End Property > End Class > //// > You can use your images now as > \\\ > mySharedValues.myImageList > /// > > To see how to use it, just open the + in the designer and copy the code > about the imagelist that the designer created. > > You have to type less than I do most goes automaticly by the IDE, so watch > typos or whatever, > > I hope this helps, > > Cor > > <Windy> schreef in bericht news:OKM7vKjJGHA.3000@TK2MSFTNGP14.phx.gbl... >>I do not want to setup and create my ImageList over and over again on >>different forms in my project. >> Is there any ways to achieve it? so that I will be more easy to manage my >> ImageList as well as minimize the performance overhead. >> >> Thanks~ >> > > <Windy> schrieb:
>I do not want to setup and create my ImageList over and over again on You could pass around a reference to the image list at runtime, but you >different forms in my project. > Is there any ways to achieve it? so that I will be more easy to manage my > ImageList as well as minimize the performance overhead. cannot assign the image list to controls on multiple forms at design time. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> Herfried,
> I know that I am with my answer in contradiction from a message I made > You could pass around a reference to the image list at runtime, but you > cannot assign the image list to controls on multiple forms at design time. > yesterday. However OOP should still not be a religion in my opinion. :-) CorHi Herfried, Cor
Thanks you for the information <Windy> ¼¶¼g©ó¶l¥ó·s»D:OKM7vKjJGHA.3***@TK2MSFTNGP14.phx.gbl... Show quoteHide quote >I do not want to setup and create my ImageList over and over again on >different forms in my project. > Is there any ways to achieve it? so that I will be more easy to manage my > ImageList as well as minimize the performance overhead. > > Thanks~ >
What am i missing to raise a javascript alert
Application.Exit or End VB2005 pro Graphics Sending a message to another computer -how? Better way to go from ArrayList to Object() Printing at bottom of page XML Comments and ComponentModel.Description attribute Convert from C# to VB.Net lost user control Unable to cast object of type 'System.Data.DataSet' to Typed DataSet |
|||||||||||||||||||||||