15 Replies - 1121 Views - Last Post: 26 December 2012 - 10:21 AM
#1
Minimized another application
Posted 25 December 2012 - 11:17 AM
I need a help with checking if another application or games is minimized!
So if i minimize my game screen or exp. notepad application my vb application will sey me "app is minimized"
DO you have some idea for that?
Thank you!
Replies To: Minimized another application
#2
Re: Minimized another application
Posted 25 December 2012 - 11:19 AM
#3
Re: Minimized another application
Posted 25 December 2012 - 11:28 AM
#4
Re: Minimized another application
Posted 25 December 2012 - 11:29 AM
(Side note - see.. this is your original thread.. it doesn't needed a second one so I closed the other).
#5
Re: Minimized another application
Posted 25 December 2012 - 11:36 AM
Edit: forgot to mention you need to import: System.Runtime.InteropServices
This post has been edited by lucky3: 25 December 2012 - 11:38 AM
#6
Re: Minimized another application
Posted 25 December 2012 - 11:40 AM
my internet was blocked for a short time so I might accidentally post two times the same question! sorry
lucky3, on 25 December 2012 - 11:36 AM, said:
Edit: forgot to mention you need to import: System.Runtime.InteropServices
could you explain a little better, I'm doing it for the first time!
Thank you!
#7
Re: Minimized another application
Posted 25 December 2012 - 11:44 AM
<System.Runtime.InteropServices.DllImport("user32.dll")>
Public Shared Function FindWindow(
ByVal lpClassName As String,
ByVal lpWindowName As String) As IntPtr
End Function
You can use it then with something like this:
Dim WindowHandle As IntPtr = FindWindow(Nothing, "Notepad")
#8
Re: Minimized another application
Posted 25 December 2012 - 12:04 PM
I would appreciate it if you could give me a example!
I know rule is: Don't tell us to give you code!
but if you could make exception!
maybe when i minimize notepad msgbox will say it!
Thank you.
#9
Re: Minimized another application
Posted 25 December 2012 - 12:07 PM
Quote
but if you could make exception!
You get an exception and what do I tell the next person that wants an exception? What about the missed learning opportunity?
#10
Re: Minimized another application
Posted 25 December 2012 - 12:09 PM
This post has been edited by Neph1x: 25 December 2012 - 12:10 PM
#11
Re: Minimized another application
Posted 25 December 2012 - 12:11 PM
Open new Notepad window, that would remain untitled (don't save it and name it for this example to work).
Then open up new console project, and paste this code to it. If your notepad window is not minimized, the code will do it for you:
Edited the code. I agree with modi
This post has been edited by lucky3: 25 December 2012 - 12:12 PM
#12
Re: Minimized another application
Posted 25 December 2012 - 12:32 PM
#13
Re: Minimized another application
Posted 25 December 2012 - 12:51 PM
#14
Re: Minimized another application
Posted 25 December 2012 - 04:37 PM
#15
Re: Minimized another application
Posted 26 December 2012 - 12:14 AM
|
|

New Topic/Question
Reply




MultiQuote






|