|
-
Sep 20th, 2007, 03:24 PM
#1
Thread Starter
Hyperactive Member
[2005]form_close method?
Hello again. I have a problem. I have a program that has a form that uses the arrow keys to move an image box. Then I have a timer function that checks to see where the image box is. If the image box that you move is inside another image box then it hides the form(frm1) and shows another form (frm2). Now that you have the background, my problem is when i try to close frm2 it reopens itself because the image is still in the other picture box even though you can't see it. that is why I am wondering if there is a form_close function or some way to make something like it? Thank you in advance.
Last edited by bagstoper; Sep 20th, 2007 at 03:28 PM.
-
Sep 20th, 2007, 03:53 PM
#2
Re: [2005]form_close method?
How do you open form2? On the timer.tick event?
-
Sep 20th, 2007, 04:03 PM
#3
Thread Starter
Hyperactive Member
Re: [2005]form_close method?
Yes the exact code is...
Code:
If player.Left >= PictureBox1.Left And player.Left <= PictureBox1.Left + PictureBox1.Width - player.Width And player.Top >= PictureBox1.Top And player.Top >= PictureBox1.Top + PictureBox1.Height - player.Height Then
frm_inn.Show()
Me.Hide()
End If
-
Sep 20th, 2007, 07:21 PM
#4
Re: [2005]form_close method?
i don't know what's the point...
but to solve this you have at least two options:
- you can move the picture box in the form1 to another position....
- you can stop the timer
As i said, i don't know what's the point...
If you can give some more details.
-
Sep 20th, 2007, 07:23 PM
#5
Re: [2005]form_close method?
By the way, you want to return to form1 or close the application?
And yes there's a form_closing method. You can put there all the actions, that you need to be performed when you close the form.
Last edited by mickey_pt; Sep 20th, 2007 at 07:30 PM.
Reason: Add info
-
Sep 20th, 2007, 09:09 PM
#6
Thread Starter
Hyperactive Member
Re: [2005]form_close method?
umm i am making a RPG game and so far you move a dot on the screen with the arrow key and if the image is inside the second one the it shows the for that goes with that image. like if there was a picture of an inn on the form and you moved the image into it the it will show frm_inn and so on. and thank you for your help i cant believe i didnt think of that.
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
|