Make cursor ignore form
- Hello i am doing a program for my frien i am allmost finnish but i have a few more thing to go.
I wonder how i could do so a form gets unclickable. I am doing a crosshair and when i test it out and put it on its place then when i trying to shoot the program inactivates.
i also wonder how i can make a forms startposition custom?
And sorry for my bad english
/ericborgsten
All Replies
...then when i trying to shoot the program inactivates.
did you mean your Form Hangs or Goes unresponsive ?
i also wonder how i can make a forms startposition custom?
Select Form | in Properties Pane see StartPosition Property. If you set it to Manual , Form will appear at position set by Location Property in same property pane .
Thanks
♦ My Blog ♦ My Facebook ♦ YOUR Place to have fun time ! ♦ Awesome RPG Action Game- no i mean that the game goes inactive.
btw thanks for the reply no i mean that the game goes inactive.
btw thanks for the reply
you can hide you mouse you won't the person to click .
Don't judge me, just Upgrade me. Thanks!
are you doing some really processor intensive work ? may be an infinite loop somewhere ? these things often cause the behavior like you have explained and proper remedy is to use threading.
Like, doing intensive work in thread and allow user to interact with Main form at the same time.
Here's one tutorial on how to use background worker class to do the same,
http://vb2010.wordpress.com/2009/08/29/working-with-background-workers/
Thanks
♦ My Blog ♦ My Facebook ♦ YOUR Place to have fun time ! ♦ Awesome RPG Action Game- no it dont doing any intensive work. its just two lineshapes togheter like a crosshair that opens with the ontop property then when i put them on the spot there the crosshair is for example in cs the mouse apears and when i click the game goes inactive untill u click again.
you can hide you mouse you won't the person to click .
how do you mean??
oh, now i got it little bit. Here's a code snippet that work in a way that I think you want it to be.
Start a new project, Put 2 buttons on it and replace the whole class with following.
Public Class Form1 Dim flag As Boolean Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load flag = True End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If flag Then MsgBox("Clicked") flag = False 'disables click End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click 'Allow Click flag = True End Sub End Class
Actually, I think you need to implement that IF block in your code which checks for flag.
Thanks
♦ My Blog ♦ My Facebook ♦ YOUR Place to have fun time ! ♦ Awesome RPG Action Game- that isnt working you see this is the only thing in the form
http://img21.imageshack.us/img21/2180/formdesign.jpg
and i also upload a picture of whats my problem
http://img35.imageshack.us/img35/1877/problemg.png
whn i trying to shoot the game window goes inactive
umm.. you're running a whole game inside that form ?
why ?
Edit:
err, no.
what do you want to achieve as final goal of this vb.net application ?
Thanks
♦ My Blog ♦ My Facebook ♦ YOUR Place to have fun time ! ♦ Awesome RPG Action Game- no im not doing that. when i dont have the form active the cursor isnt there but when i activate its there lika a program and when i click the form activates
ps im trying with showdialig but that dont work - i wanna do a crosshair for games like cs when you have sniper that not have a crosshair.
actually i allready done that but this is a huge problemthat i need to fix.
Oh !
You have to look at this thread.
http://social.msdn.microsoft.com/Forums/en-US/gametechnologiesdirectx101/thread/a7a8c1d6-3afe-4c47-a4ba-24976bd8d801
Thanks
♦ My Blog ♦ My Facebook ♦ YOUR Place to have fun time ! ♦ Awesome RPG Action Game- i cant get that working id read the thread but i cant open it in visual basic 2008 that i use. so i need to make a injection to the game??


