| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: identify an image in |
> > If I understand the game you are creating correctly, I would
probably
> > cheat and use two control arrays of ImageBox'es... one for the
pictures
> > as you do now and the second for the cover side. I would place index
0
> > of the cover side array over index 0 of the display array, index 1
of
> > the cover side array over index 1 of the display array, etc. Either
set
> > the cover side ImageBox'es over the display ones at design time or
use
> > the ZOrder method to do so at run-time. Then I would simply show the
> > image of the underlying ImageBox by setting the covering ImageBox's
> > Visible property to False. To cover the image, set the Visible
property
> > back to True. Use the fact that the indexes of the display and cover
> > ImageBox control arrays are the same (pick it up from the respective
> > Click events). As for registering which image is opened and should
be
> > closed, I would use variables declared with form-wide scope; that
is,
> > declare the variables in the form's (General)(Declarations) section.
Two
> > for the currently opened images (store their Index values in them)
and
> > another one to track the number of open images. If the number of
open
> > images is two when a covering ImageBox is clicked, use the stored
Index
> > values to set the Visible properties to False for those control
array
> > elements.
> >
> > Rick - MVP
> >
>
> Interesting and workable solution! One question however. How can I
retrieve
> the stored index values you are mentioning.
Whenever you click on a member of a control array, the Index value of
that control is automatically available in the event via the Index
argument... simply assign it to a designated form-wide global variable.
To see what I am saying, load your project into VB and double click on
one of the controls that is in your control array. You will be taken to
the code window and one of the event procedures will be showing. Look
what is between the parentheses in the procedures header line... you
will see an parameter named Index. VB loads that up with the index value
of the control array member when the procedure's code is running and is
available to you for your use.
Rick - MVP
---
þ RIMEGate(tm)/RGXPost V1.14 at BBSWORLD * Info{at}bbsworld.com
---
* RIMEGate(tm)V10.2áÿ* RelayNet(tm) NNTP Gateway * MoonDog BBS
* RgateImp.MoonDog.BBS at 11/17/04 4:26:20 PM
* Origin: MoonDog BBS, Brooklyn,NY, 718 692-2498, 1:278/230 (1:278/230)SEEN-BY: 633/267 270 5030/786 @PATH: 278/230 10/345 106/1 2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.