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 / C# / April 2008

Tip: Looking for answers? Try searching our database.

Bitmap[] property

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dany - 29 Apr 2008 15:22 GMT
If I set property in my user control like this

/////////////////////////////////////
private Bitmap im;

public Bitmap IM
{
   get
   {
       return im;
   }
   set
   {
       im= value;
   }
}
/////////////////////////////////////

everything works fine, but if I set it like this:

/////////////////////////////////////
private Bitmap[] im;

public Bitmap[] IM
{
   get
   {
       return im;
   }
   set
   {
       im= value;
   }
}
/////////////////////////////////////

I'm getting error when i try to add new bitmap to collection trough property
window:
Parameter is not valid.

can someone help, I dont want to limit number of bitmaps to user and I dont
want to initialize them on control start.

Thank you.
Ignacio Machin ( .NET/ C# MVP ) - 29 Apr 2008 15:35 GMT
>  If I set property in my user control like this
>
[quoted text clipped - 40 lines]
>
> Thank you.

Hi,

Can you give more details, what are you trying to do, what error are
you getting, etc
IIRC for a designable control you need to use ImageList, at least that
is what all other controls in the framework use
dany - 30 Apr 2008 06:46 GMT
On Apr 29, 10:22 am, "dany" <d...@dany.com> wrote:

Hi,

Can you give more details, what are you trying to do, what error are
you getting, etc
IIRC for a designable control you need to use ImageList, at least that
is what all other controls in the framework use

-----------------------------
Hi,

I would like to have array of bitmaps or images for my control, which user
can set at desing time trough property window of my control.

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.