PC Review Forums Newsgroups Microsoft DotNet Microsoft VB .NET Help referencing control backgorund image

Reply

Help referencing control backgorund image

 
Thread Tools Rate Thread
Old 13-12-2006, 12:07 PM   #1
Marc
Guest
 
Posts: n/a
Default Help referencing control backgorund image


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")

  Reply With Quote
Old 13-12-2006, 02:01 PM   #2
Herfried K. Wagner [MVP]
Guest
 
Posts: n/a
Default Re: Help referencing control backgorund image

"Marc" <marc_crosby@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/>
  Reply With Quote
Old 13-12-2006, 02:55 PM   #3
Marc
Guest
 
Posts: n/a
Default Re: Help referencing control backgorund image

hi,


sorry i relaised i am trying to reference a procedure


Herfried K. Wagner [MVP] wrote:
> "Marc" <marc_crosby@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/>


  Reply With Quote
Old 13-12-2006, 03:14 PM   #4
Herfried K. Wagner [MVP]
Guest
 
Posts: n/a
Default Re: Help referencing control backgorund image

"Marc" <marc_crosby@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/>

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off