add #PB_Event_ActivateProcess and #PB_EventDeactivateProcess

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
gurj
Enthusiast
Enthusiast
Posts: 693
Joined: Thu Jan 22, 2009 3:48 am
Location: china
Contact:

add #PB_Event_ActivateProcess and #PB_EventDeactivateProcess

Post by gurj »

add #PB_Event_ActivateProcess and #PB_Event_DeactivateProcess

for as this:

Code: Select all

For a=0 To 3:m+50
 OpenWindow(a,m,m,150,100,"",#PB_Window_MinimizeGadget)
Next
ourThreadID = GetCurrentThreadId_() 

Repeat:Select WaitWindowEvent()
   
  Case #PB_Event_CloseWindow:Quit = 1
  Default:foregroundThreadID = GetWindowThreadProcessId_(GetForegroundWindow_(), 0) 
   If (foregroundThreadID <> ourThreadID) 
    Debug 9
    ;...
   EndIf 
EndSelect:Until Quit = 1
my pb for chinese:
http://ataorj.ys168.com
User avatar
gurj
Enthusiast
Enthusiast
Posts: 693
Joined: Thu Jan 22, 2009 3:48 am
Location: china
Contact:

Re: add #PB_Event_ActivateProcess and #PB_EventDeactivatePro

Post by gurj »

Code: Select all

ourThreadID = GetCurrentThreadId_() 
For a=0 To 3:m+50
 OpenWindow(a,m,m,150,100,"",#PB_Window_MinimizeGadget)
Next
de1=1
Repeat:Select WaitWindowEvent()
   
  Case #PB_Event_CloseWindow:Quit = 1
  Default:foregroundThreadID = GetWindowThreadProcessId_(GetForegroundWindow_(), 0) 
   If (foregroundThreadID <> ourThreadID)
    If de1>0:de1=0:de0=1:ElseIf de0=1:de0=2:Debug 0:EndIf
    Else
    If de0>0:de0=0:de1=1:ElseIf de1=1:de1=2:Debug 1:EndIf
   EndIf 
EndSelect:Until Quit = 1
my pb for chinese:
http://ataorj.ys168.com
Post Reply