Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

graphic order

Posted on 1998-11-13
10
Medium Priority
?
147 Views
Last Modified: 2010-04-30
hello, basically i have loads of image controls on a form
as an array
image(1)
image(2)
etc..
if i click on one of the images, i want it to come one step forward, not all the way to the top.

someone suggested bringing all the controls to the top succesively, but that wouldn't work because i want all the other controls to remain at their current position apart from the control that will take anothers place which in turn will take it's place..
P.S, The Controls are created at run time so i don't know how many there are...
please help, i am willing to do anything....

help..
thankx
0
Comment
Question by:cybermoonlight
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 2

Author Comment

by:cybermoonlight
ID: 1444827
Edited text of question
0
 

Expert Comment

by:Upland
ID: 1444828
What do you mean by 'one step forward'? Are they all overlapping?
0
 

Expert Comment

by:Upland
ID: 1444829
What do you mean by 'one step forward'? Are they all overlapping?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:cybermoonlight
ID: 1444830
hello, well to explain myself better..here goes.

There are a number of image controls on a form
they are created at run time by the user

they contain images loaded through the loadpicture function.

as the user adds images, the newest image is at the very top of the Zorder, on top of all other images...

mayber you know photoshop, if you do, then you will know what i mean when i mention the word "layers"
i want to right click on an image have a popupmenu appear
and then be able to select either: -bring to top

0
 
LVL 2

Author Comment

by:cybermoonlight
ID: 1444831
hello, well to explain myself better..here goes.

There are a number of image controls on a form
they are created at run time by the user

they contain images loaded through the loadpicture function.

as the user adds images, the newest image is at the very top of the Zorder, on top of all other images...

mayber you know photoshop, if you do, then you will know what i mean when i mention the word "layers"
i want to right click on an image have a popupmenu appear
and then be able to select either: -bring to top
                                                     -bring forward
                                                     -send backwards
                                                     - send to back
so for the first one it would be
NewImage(index).zorder
and the last one would be
newimage(index).zorder 0

but what about the other ones,?
if the user selects bring forward, i want a function to do the following
for i = 0 to newimage.count - 1
newimage(i).zorder
next
this way all i would have to  do is change the index of the image control i want to bring forward and the index of the one i want to take it's place.

This could work fine, but i haven't tried it yet, if you have an idea please tell me about it...

the problem is each image control has special properties that the user sets, so if i change the index of the image control, it will take on the properties of the image it superseded...
do you see what i mean now???

please someone help!!!
0
 

Expert Comment

by:Upland
ID: 1444832
So how do you click on a picture that is not on the top? If they are on top of each other (like PS Layers) then there will only be one picture visible!
Maybe I am just being stupid?!
0
 
LVL 2

Author Comment

by:cybermoonlight
ID: 1444833
hello again, tahnks for bearing with me..
okay if one picture is obscuring another one, all i would have to do in photoshop would be
- layer
      Send Backwards
either way, i need a function to bring a control forward, not on top of all other controls, just like in photoshop, forward one step...

thankx
0
 
LVL 13

Accepted Solution

by:
Mirkwood earned 400 total points
ID: 1444834
The only thing that is important is the order in which you call the zorder function and whether the argument of zorder is 0 or 1.
Here are three example. Example 2 & 3 have the same effect but do it different

' Show ascending
Private Sub Command1_Click()
    Dim i As Integer
    For i = 0 To Picture2.Count - 1
        Picture2(i).ZOrder 0
    Next
End Sub

' Show descending
Private Sub Command2_Click()
   Dim i As Integer
    For i = 0 To Picture2.Count - 1
        Picture2(i).ZOrder (1)
    Next
End Sub

' Show descending alternative method
Private Sub Command2_Click()
   Dim i As Integer
    For i = 0 To Picture2.Count - 1
        Picture2(Picture2.Count - i - 1).ZOrder (0)
    Next
End Sub


0
 
LVL 2

Author Comment

by:cybermoonlight
ID: 1444835
mirkwood, this is not what i wanted but it doesn't matter, i have found a way already.....at least you tried, none else even attempted it and for that i'm awarding you the points....thanks
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 6799784
Howdy cybermoonlight,

It appears that your e-mail address <cough> elsewhere is no longer valid.... can you sort that?

Pino
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question