|
-
Sep 26th, 2001, 11:56 PM
#1
Thread Starter
PowerPoster
Image Control at run-time
Heya,
I am trying to write a prog that will allow someone to construct a big picture by dragging some preset 'tiles' into place.
The problem I am having is that I would like for them to be able to drag more than one tile to the same place (so that I don't have to include a tile for every possible combination of layouts).
I have tried several methods, to no avail, my closest attempt being one that works, but buggers up colours when some tiles are dragged over others.
Is it possible to create an Image control at runtime and display it on the form?
Or does anyone have another suggestion?
Cheers.
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
Sep 27th, 2001, 07:07 AM
#2
Retired VBF Adm1nistrator
Yeah just give it an Index = 0 and then Load more with higher indices
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Sep 27th, 2001, 08:23 AM
#3
Thread Starter
PowerPoster
I actually tried that, but the new controls never appeared.
I gave them pics, and set them to visible, and made sure they were in the right place, but they never showed up.
They were there, 'cause I got 'already loaded' errors when I was testing, but I couldn't see them, which kind of defeated the purpose...
I have found another way which was I think Controls.AddControl, and it will do for now, but it seemed weird that the Load method wouldn't work right?
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
Sep 27th, 2001, 09:39 AM
#4
Addicted Member
Some things to consider:
[list=1][*]Your forms scalemode is in pixels not twips hence when placing new control it buggers up[*]Have you used Control.zOrder to bring the control to the top?[/list=1]
Hope this helps
Who needs rhetorical questions anyway?
Bazza NET - The place you want to be!

-
Sep 27th, 2001, 05:53 PM
#5
Thread Starter
PowerPoster
The scalemode should only affect the location, and I am aware of that - I know the correct x,y to put controls, and yes I did use ZOrder.
It still didn't show up...?
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
Sep 28th, 2001, 02:21 AM
#6
Retired VBF Adm1nistrator
Try putting a picture in it
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Sep 28th, 2001, 02:43 AM
#7
Thread Starter
PowerPoster
done and done.
I can't have pictures in it at design-time, since it doesn't exist. At run-time I use Picture=LoadPicture(filename).
Same result.
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|