Graphic file manipulation

KillerSpaz

Member
Joined
Aug 16, 2005
Messages
11
Programming Experience
5-10
OK, here's my idea:
Have a system that can load PNG files into picturebox's, and allow the user to position them with the mouse, and layer them appropriately.

I also would like the user to allow which file lays over others (zorder), but I can't find any valid method of doing so.

I've found SendToBack/BringToFront... but... yeah, that doesn't do the job needed.. UNLESS - I reverse loop on one (ie: SendToBack starting with topmost graphic, so all other graphics are sent to back behind it)

This seems really cheesy, but I can't think of any other way with the provided member functions..

HELP! This is the core of my app, and without it, it's worthless to make..
 
Excuse me, are you trying to make something like Photoshop's layers Panel?

panel.jpg


Cheers ;)
 
kulrom said:
Excuse me, are you trying to make something like Photoshop's layers Panel?

panel.jpg


Cheers ;)
Thanks for the response.. was wondering if ppl ever browsed these forums anymore..
Well, in the long run, SOMETHING like it would be nice... Right now i have 2 classes.

one manages an array of the other class..

I have used addhandler to hook a mouse down event on the instantiated picturebox. I can popup a right-mouse invoked menu without problems... works flawless, on this menu, there's 2 options for the image (reset size, delete, etc will be more)... this is only working as if the last image ever loaded was the only one that works, even if i click on the first image or what not.... also, it runs x amount of times, where x is the amount of pictureboxes loaded (and thus, runs as if it is object x; x times...) hope that doesn't confuse you..

I'm stuck. I'll post code later tonight when i get home.. right now i'm at work.. but i'd appreciate help.. I've gotten pretty far by myself i feel... now i co uld use some intervention :)

Thanks in advance, and i'll post that code later
 
Last edited:
OK, here's the code i'm dealing with that's kinda giving me aproblem...
VB.NET:
	Public Sub addIMG(ByVal picBoxInfo As PictureBox)
		Dim newPic As picInfo = New picInfo
		newPic.id = Me.lastId + 1
		newPic.picBoxInfo = picBoxInfo
		newPic.originalSettings.mySize = picBoxInfo.Size
		newPic.originalSettings.myLoc = picBoxInfo.Location
		Me.thePics.Add(newPic)

		AddHandler Me.hasID(newPic.id - 1).picBoxInfo.MouseDown,	 
		AddressOf newPic.selectBox
		AddHandler myFrmMain.resetSize.Click, AddressOf Me.resetSize
		AddHandler myFrmMain.remLayer.Click, AddressOf Me.remLayer

		newPic = Nothing
	End Sub
myFrmMain.resetSize and myFrmMain.remLayer are menu items on the actual menu....

I have an idea, but wanted to see what everyone else thought
 
Well i don't really want it done FOR me.. i think i can do most of it.. just this addhandler thing is driving me mad... if you could help me on that i'd appreciate it
 
OK, here it is!

For real this time.. Couldn't attache a rar file, had to go zip.
 

Attachments

  • manipulate images.zip
    15.2 KB · Views: 38
Back
Top