Home All Groups Group Topic Archive Search About

Help referencing control backgorund image

Author
13 Dec 2006 12:07 PM
Marc
Hi,

The below code does not work..... Anyone know how this is done?   If i
say 'is nothing'  instead of is DrawCross () it works fine???

If ContextMenuStrip1.SourceControl.BackgroundImage is DrawCross ()
then
            msgbox ("test")

Author
13 Dec 2006 2:01 PM
Herfried K. Wagner [MVP]
"Marc" <marc_cro***@hotmail.com> schrieb:
> The below code does not work..... Anyone know how this is done?   If i
> say 'is nothing'  instead of is DrawCross () it works fine???
>
> If ContextMenuStrip1.SourceControl.BackgroundImage is DrawCross ()
> then

What's 'DrawCross'?

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>
Author
13 Dec 2006 2:55 PM
Marc
hi,


sorry i relaised i am trying to reference a procedure


Herfried K. Wagner [MVP] wrote:
Show quoteHide quote
> "Marc" <marc_cro***@hotmail.com> schrieb:
> > The below code does not work..... Anyone know how this is done?   If i
> > say 'is nothing'  instead of is DrawCross () it works fine???
> >
> > If ContextMenuStrip1.SourceControl.BackgroundImage is DrawCross ()
> > then
>
> What's 'DrawCross'?
>
> --
>  M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
>  V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>
Author
13 Dec 2006 3:14 PM
Herfried K. Wagner [MVP]
"Marc" <marc_cro***@hotmail.com> schrieb:
> sorry i relaised i am trying to reference a procedure

I suggest to post the implementation of this procedure because it's likely
that it's causing the behavior you describe.  Note that the 'Is' operator
will compare object identity (references).  It won't compare images if they
contain the same picture (pixel colors).

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>