/
Forside
/
Teknologi
/
Udvikling
/
VB/Basic
/
Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn
*
Kodeord
*
Husk mig
Brugerservice
Kom godt i gang
Bliv medlem
Seneste indlæg
Find en bruger
Stil et spørgsmål
Skriv et tip
Fortæl en ven
Pointsystemet
Kontakt Kandu.dk
Emnevisning
Kategorier
Alfabetisk
Karriere
Interesser
Teknologi
Reklame
Top 10 brugere
VB/Basic
#
Navn
Point
1
berpox
2425
2
pete
1435
3
CADmageren
1251
4
gibson
1230
5
Phylock
887
6
gandalf
836
7
AntonV
790
8
strarup
750
9
Benjamin...
700
10
tom.kise
610
use a variable to declare an object
Fra :
Ini
Dato :
04-02-04 10:16
Hi,
On a form I put 25 images. Depending on an action one of the images has to
become visible.
ImageXX.Visible = True
Every action gives me a number corresponding with te image that must get
visible, like:
14 --> Image14.Visible = True
17 --> Image15.Visible = True
etc.
Now I wonder if there's a smart way to writ code to make an image visible,
like:
Result = 14
ImageResult.Visible = True
I tried this one and several others in syntax but they don't work.
Anyone an idea?
Thanks,
Ini
Peter Lykkegaard (
04-02-2004
)
Kommentar
Fra :
Peter Lykkegaard
Dato :
04-02-04 12:57
"Ini" <ini@ini.myweb.nl> wrote in message
news:bvqd8n$dor$1@news4.tilbu1.nb.home.nl...
>
> Every action gives me a number corresponding with te image that must get
> visible, like:
>
> 14 --> Image14.Visible = True
> 17 --> Image15.Visible = True
> etc.
>
Take a look at control arrays
- Peter
Steen Alcor (
06-02-2004
)
Kommentar
Fra :
Steen Alcor
Dato :
06-02-04 09:46
Hi
Try this
Private Sub ShowImage(lngX As Long)
Dim imgTemp As Image
For Each imgTemp In Me
imgTemp.Visible = False
If imgTemp.Name = "Image" & lngX Then imgTemp.Visible = True
Next imgTemp
End Sub
"Ini" <ini@ini.myweb.nl> skrev i en meddelelse
news:bvqd8n$dor$1@news4.tilbu1.nb.home.nl...
>
> Hi,
>
> On a form I put 25 images. Depending on an action one of the images has to
> become visible.
>
> ImageXX.Visible = True
>
> Every action gives me a number corresponding with te image that must get
> visible, like:
>
> 14 --> Image14.Visible = True
> 17 --> Image15.Visible = True
> etc.
>
> Now I wonder if there's a smart way to writ code to make an image visible,
> like:
>
> Result = 14
> ImageResult.Visible = True
>
> I tried this one and several others in syntax but they don't work.
>
> Anyone an idea?
>
> Thanks,
>
> Ini
>
>
>
Søg
Alle emner
Teknologi
Udvikling
VB/Basic
Indstillinger
Spørgsmål
Tips
Usenet
Reklame
Statistik
Spørgsmål :
177580
Tips :
31968
Nyheder :
719565
Indlæg :
6409081
Brugere :
218888
Månedens bedste
Årets bedste
Sidste års bedste
Copyright © 2000-2024 kandu.dk. Alle rettigheder forbeholdes.