![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jan 2006
Posts: 11
Rep Power: 0
![]() |
adding an image control at run time
In my project I need to display images that the user will open in the form(in thumbnail form).. and the user can open as many images he/she wants. My problem is how can I dynamically create an image control at run time so that the number of the images that can be opened and displayed will not be fixed. Can anyone help me?
|
|
|
|
|
|
#2 |
|
Newbie
Join Date: Feb 2006
Location: Bedford
Posts: 2
Rep Power: 0
![]() |
what you mean? like there are many images and when the go mouse over one of them it goes bigger?
i havent got the code atm, but you would use something like this pic1 being the first pic Private Sub Form_Load()
pic1.Height = "2675"
pic1.Width = "2775"
End Sub
Private Sub pic1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If pic1.Height = "2655" Then
pic1.Height = "4455"
ElseIf pic1.Height = "4455" Then
pic1.Height = "4455"
End If
If pic1.Width = "2775" Then
pic1.Width = "4455"
ElseIf pic1.Width = "2775" Then
pic1.Width = "4095"
End If
End Sub |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Feb 2006
Posts: 12
Rep Power: 0
![]() |
put un image control on form at run time and set it's index to 0
put thins code for runtime load image1(1) image1(1).left = 20 image1(1).top = 30 image1(1).visiable = true your mean is that? |
|
|
|
|
|
#4 | |
|
Newbie
Join Date: Jan 2006
Posts: 11
Rep Power: 0
![]() |
Quote:
yup! thank you very much
__________________
ice |
|
|
|
|
|
|
#5 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
This might give you a problem: image1(1).visiable = true
Our machines aren't as adaptive as we.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|