How can I make my programme do the code respond to things if the programme is minimised?
Printable View
How can I make my programme do the code respond to things if the programme is minimised?
Do you mean that you want to detect when the form is minimised?
If so, simply use code like this in the Form_Resize event:
Code:If Me.WindowState = vbMinimized Then
'form has just been minimised
End If
no, I mean that the form will be able to respond to events even if it is minimize, like it will respond to a keypress event if it is minimized.
That isn't the way Windows works... keyboard/mouse input gets sent to the window which has the focus, and minimised windows aren't focussed.
What is it that you are actually trying to achieve?
There is an API that will check if keys are pressed. Running that in a timer can check certain things.
what is the api?
What event is it that you are trying to monitor?
Well, I'm trying to make a programme simular to the hypercam, and you have to press escape to stop videoing, except if the programme has focus all the time, I wont be able to click anything and therefore it would be pointless videoing.
How are you recording the desktop, that will depend on what you need to do.
there's an api for printscreen
Yes but that API wont record all the screen if they are playing a video/movie etc.
but how can I do it otherwise?
What kind of data are you needing to "capture"?
i dont know, just the image that is on the screen at the moment, as picture.
Will to capture every second or so is a resource drain and will slow down the users system. What or why are you trying to capture the screen this way?
just so I can record the screen, but anyway, How can I make it respond to the escape key even if it is minimized?