Now that is a quality cheat!
InputBox really modal on all process [Resolved]
Re: InputBox really modal on all process [Resolved]
lol.
Now that is a quality cheat!
Now that is a quality cheat!
I may look like a mule, but I'm not a complete ass.
- Kwai chang caine
- Always Here

- Posts: 5530
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: InputBox really modal on all process [Resolved]
Hello RASHAD
I have do like you say to me, compile the code and run by shortcut
There are a splendid stringgadget in the middle of the screen with the exit button.
Bu when i move a window over the stringgadget, he disappear behind the window moved
He is strange this CROSOFT, asking to not loose focus on an application, is when even not, a so miraculous demand
I have do like you say to me, compile the code and run by shortcut
There are a splendid stringgadget in the middle of the screen with the exit button.
Bu when i move a window over the stringgadget, he disappear behind the window moved
He is strange this CROSOFT, asking to not loose focus on an application, is when even not, a so miraculous demand
The happiness is a road...Not a destination
Re: InputBox really modal on all process [Resolved]
Hi srod
KCC
Sorry KCC I just tested it with XP
It does not work
Be tuned
KCC
Sorry KCC I just tested it with XP
It does not work
Be tuned
Egypt my love
- Kwai chang caine
- Always Here

- Posts: 5530
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: InputBox really modal on all process [Resolved]
No problem.....it's already good to have tried
I come back when i have finish my EEEPC waltz
I come back when i have finish my EEEPC waltz
The happiness is a road...Not a destination
Re: InputBox really modal on all process [Resolved]
Code: Select all
Define hCurrentDesktop.l, sNewDesktopName.s, hNewDesktop.l
hCurrentDesktop = GetThreadDesktop_(GetCurrentThreadId_())
sNewDesktopName = Hex(Random(10000000))
hNewDesktop = CreateDesktop_(sNewDesktopName, #Null, #Null, 0, #GENERIC_ALL, #Null)
If (hNewDesktop <> #INVALID_HANDLE_VALUE)
;********************
;New desktop successfully created
;********************
SetThreadDesktop_(hNewDesktop)
Define Info.STARTUPINFO
ClearStructure(@Info, STARTUPINFO)
Info\cb = SizeOf(STARTUPINFO)
Info\dwFlags = #STARTF_USESHOWWINDOW
Info\lpDesktop = @sNewDesktopName
Info\wShowWindow = #SW_SHOW
Define ProcessInfo.PROCESS_INFORMATION
ClearStructure(@ProcessInfo, PROCESS_INFORMATION)
If (CreateProcess_(@FileName, 0, 0, 0, 0, #NORMAL_PRIORITY_CLASS, 0, 0, @Info, @ProcessInfo))
;********************
;Process created, switch current desktop
;********************
If (ProcessInfo\hThread)
CloseHandle_(ProcessInfo\hThread)
EndIf
SwitchDesktop_(hNewDesktop)
;********************
;Wait for process to exit
;********************
WaitForSingleObject_(ProcessInfo\hProcess, #INFINITE)
CloseHandle_(ProcessInfo\hProcess)
EndIf
;********************
;Switch to original desktop
;********************
SwitchDesktop_(hCurrentDesktop)
CloseDesktop_(hNewDesktop)
EndIf
You don't have to create another process though... you could just switch the current process to the new desktop.
Registered PureBasic user since 4.50
- Kwai chang caine
- Always Here

- Posts: 5530
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: InputBox really modal on all process [Resolved]
Hello FLOWER
Thanks for your code but, you surely don't know KCC, .....the programmer who coding slower that his shadow
How i can use your skyrocket
I have try to launch it with match...but he don't do anything
Thanks for your code but, you surely don't know KCC, .....the programmer who coding slower that his shadow
How i can use your skyrocket
I have try to launch it with match...but he don't do anything
The happiness is a road...Not a destination
Re: InputBox really modal on all process [Resolved]
That's right, it doesn't do anything until you tell it to...Kwaï chang caïne wrote:Hello FLOWER
Thanks for your code but, you surely don't know KCC, .....the programmer who coding slower that his shadow
How i can use your skyrocket
I have try to launch it with match...but he don't do anything
For example, you could add
Code: Select all
Define FileName.s
FileName = "C:\Windows\System32\Notepad.exe"Registered PureBasic user since 4.50
Re: InputBox really modal on all process [Resolved]
Hi again
Code: Select all
Global x,y,W,H
ExamineDesktops()
Procedure Fake(Image,x,y,WW,WH)
hImage = CreateImage(Image,WW,WH)
hDC = StartDrawing(ImageOutput(Image))
BitBlt_(hDC,0,0,WW,WH,GetDC_(GetDesktopWindow_()),x,y,#SRCCOPY)
StopDrawing()
ProcedureReturn hImage
EndProcedure
WW = DesktopWidth(0)
WH = DesktopHeight(0)
OpenWindow(0,0,0,W,H,"",#PB_Window_Invisible|#PB_Window_BorderLess)
ImageGadget(0,0,0,W,H,Fake(1,0,0,WW,WH))
StringGadget(1,WW/2-100,WH/2-12, 200,24,"",#ES_CENTER)
ButtonGadget(2,WW/2-40,WH/2+30,80,22,"Exit")
DisableGadget(0,1)
SetWindowState(0,#PB_Window_Maximize)
Repeat
Select WaitWindowEvent()
Case #PB_Event_Gadget
Select EventGadget()
Case 1
Case 2
Q =1
CloseWindow(0)
EndSelect
EndSelect
Until Q =1
Egypt my love
- Kwai chang caine
- Always Here

- Posts: 5530
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: InputBox really modal on all process [Resolved]
Thanks a lot at you two !!!
You are two angels !!!!
I try to put this jewel in my code now
@FLOWER
I have try your code and you have right....my desktop disappears and i have the mouse pointer into the notepad
I have search all my icons behind my screen ..turn it and no icons too
So i have close the notepad and all the littles icons come back in my screen
You are a magician but without rabbit and hat
@RASHAD
Youuu !!! you are malicious
You have take a photo of my screen and put on, a stringgadget
So i believe clic on my desktop...and i clic in the air
Kcc have add important line at your "malicious" code
Very "intelligent" KCC
Again thank at you two, and for your hard work,....
I give you this,...... directly of my french heart

I wish you a very good day
You are two angels !!!!
I try to put this jewel in my code now
@FLOWER
I have try your code and you have right....my desktop disappears and i have the mouse pointer into the notepad
I have search all my icons behind my screen ..turn it and no icons too
So i have close the notepad and all the littles icons come back in my screen
You are a magician but without rabbit and hat
@RASHAD
Youuu !!! you are malicious
You have take a photo of my screen and put on, a stringgadget
So i believe clic on my desktop...and i clic in the air
Kcc have add important line at your "malicious" code
Code: Select all
SetActiveGadget(1)Again thank at you two, and for your hard work,....
I give you this,...... directly of my french heart

I wish you a very good day
The happiness is a road...Not a destination
Re: InputBox really modal on all process [Resolved]
Kwaï chang caïne wrote:
@FLOWER
I have try your code and you have right....my desktop disappears and i have the mouse pointer into the notepad![]()
I have search all my icons behind my screen ..turn it and no icons too![]()
![]()
So i have close the notepad and all the littles icons come back in my screen![]()
You are a magician but without rabbit and hat![]()
Actually you could first take a screenshot, then creating a layered window showing that screenshot on the new desktop, and set it as the bottom-most window.
That's pretty much how User Account Control in Vista and 7 did it.
A new desktop ensure no task manager or other top-most window will disrupt your program
For just to switch the current desktop and show a window, you could comment out some of the code and add your window procedure.
Registered PureBasic user since 4.50
- Kwai chang caine
- Always Here

- Posts: 5530
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: InputBox really modal on all process [Resolved]
Again thanks FLOWER...i "torture" your code like you have say, for making my try 
The happiness is a road...Not a destination

