msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

picturebox (dynamic ..)

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Syntax
Author Message
Maxpayn



Joined: 19 Nov 2007
Posts: 1

PostPosted: Mon Nov 19, 2007 3:37 pm    Post subject: picturebox (dynamic ..) Reply with quote

Hi,

Can anyone help me with this problem.

I created 4 pictureboxes ... With an event handler (mouseenter, mouseleave)
i can let the picturebox grow (mouseEnter) and shrink (mouseleave) to default
height en width (separated)
I wish now that if i mouseenter a picturebox , he will grow (he already
does) and all the other pictureboxes shrink less then default height en width
...the problem is how to acces the others

I used the following code :

Private Sub pictures_MouseEnter(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Dim pic As PictureBox = sender
Select Case sender.name
Case "pictnieuw"
pic.Image = Image.FromFile("d:\iconen\nieuw48.png")
Lblnieuw.Visible = True
Case "pictsave"
pic.Image = Image.FromFile("d:\iconen\save48.png")
Lblsave.Visible = True
Case "pictsearch"
pic.Image = Image.FromFile("d:\iconen\search48.png")
Lblsearch.Visible = True
Case "pictdel"
pic.Image = Image.FromFile("d:\iconen\del48.png")
Lbldel.Visible = True

Private Sub pictures_MouseLeave(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Dim pic As PictureBox = sender
Select Case sender.name
Case "pictnieuw"
pic.Image = Image.FromFile("d:\iconen\nieuw32.png")
Lblnieuw.Visible = False
Case "pictsave"
pic.Image = Image.FromFile("d:\iconen\save32.png")
Lblsave.Visible = False
Case "pictsearch"
pic.Image = Image.FromFile("d:\iconen\search32.png")
Lblsearch.Visible = False
Case "pictdel"
pic.Image = Image.FromFile("d:\iconen\del32.png")
Lbldel.Visible = False
End Select
End Sub
Is this possible ?

(sorry for my broken English)

Luc

Archived from group: microsoft>public>vb>syntax
Back to top
View user's profile Send private message
Bob Butler



Joined: 04 Oct 2007
Posts: 1081

PostPosted: Mon Nov 19, 2007 4:13 pm    Post subject: Re: picturebox (dynamic ..) Reply with quote

"Maxpayn" wrote in message @microsoft.com...
> Hi,
>
> Can anyone help me with this problem.
>
> I created 4 pictureboxes ... With an event handler (mouseenter,
> mouseleave)
> i can let the picturebox grow (mouseEnter) and shrink (mouseleave) to
> default
> height en width (separated)
> I wish now that if i mouseenter a picturebox , he will grow (he already
> does) and all the other pictureboxes shrink less then default height en
> width
> ..the problem is how to acces the others
>
> I used the following code :
>
> Private Sub pictures_MouseEnter(ByVal sender As System.Object, ByVal e As
> System.EventArgs)


--
You need to ask in a newsgroup with "dotnet" in the name. This group is for
VB 6.0 and earlier and does not include VB.Net or VB 200x.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Syntax All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group