[thelist] question concerning c# dynamically changing what isin a picturebox

Lightning oktellme at earthlink.net
Mon Aug 14 21:16:20 CDT 2006


Sorry- no joy.

I should have mentioned that CloseElevatorDoor is a method, and when I 
replace with brackets, I get a message it is looking for parens.
:(
Laura
----- Original Message ----- 
From: "Peter Brunone (EasyListBox.com)" <peter at easylistbox.com>
To: <thelist at lists.evolt.org>; <thelist at lists.evolt.org>
Sent: Monday, August 14, 2006 9:38 PM
Subject: Re: [thelist] question concerning c# dynamically changing what isin 
a picturebox


>
> Hi Laura,
>
>   The problem is quite simple once you realize what's going on.  In 
> C-based languages (this includes Java and Javascript), you indicate an 
> element of an array or collection with brackets rather than with 
> parentheses.
>
> pbxFloor0.BackgroundImage = myElevator.CloseElevatorDoor[i].ToString();
>
>   This still bites me every once in a while.
>
> Cheers,
>
> Peter
>
> From: "Lightning" oktellme at earthlink.net
>
> pbxFloor0.BackgroundImage = myElevator.CloseElevatorDoor(i).ToString();
>
> where pbxFloor0 is a picture box, and
> myElevator.CloseElevatorDoor(i).ToString() returns an image name.
>
> The error message says "BackgroundImage denotes a property where a method
> was expected".
>
> I tried to hardcode the image name, and got the sqame message.
>
> What am I doing wrong?
>
> I looked thru the methods and found
> pbxFloor0.BackgroundImage.GetThumbnailImage, but I don't understand what 
> it
> says about the abort delegat.
>
> thanks for any help.
>
> Laura
> -- 
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt ! 




More information about the thelist mailing list