Changing Z order of window

Windows specific forum
chippy73
User
User
Posts: 59
Joined: Wed Feb 16, 2005 6:11 pm
Location: S.W.Wales

Changing Z order of window

Post by chippy73 »

I am trying to hide a dos window behind my PB window but it refuses to budge!

This what I am doing.....

Code: Select all

Case #Gadget_Form1_ButtonTX
            RunProgram("C:\dosprog.exe,"")
            hDosWin = FindWindow_(#Null,"c:dosprog")
            SendMessage_(hDosWin, #WM_CLOSE, 0, 0)
            hDosWin = FindWindow_(#Null,"c:dosprog")
            SendMessage_(hDosWin, SetWindowPos_(hDosWin,#HWND_BOTTOM,10,10,50,50,0),0,0)
The reason I am closing a window is that it generates 2 dos windows. Tried putting delays but didn't do anything. Maybe the repeat...until loop is going too fast?

Any ideas as to moving the Z order behind my PB window would be most welcomed.

Alan
PB v3.94 PVXP v2.13 JaPBe v2.5.4.22
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

Maybe this will help:
viewtopic.php?t=14302
--Kale

Image
Henrik
Enthusiast
Enthusiast
Posts: 404
Joined: Sat Apr 26, 2003 5:08 pm
Location: Denmark

Re: Changing Z order of window

Post by Henrik »

chippy73 wrote:
The reason I am closing a window is that it generates 2 dos windows. Tried putting delays but didn't do anything. Maybe the repeat...until loop is going too fast?
Alan
Well thats a mess, make sure that it dosn't happen in the first place
Maybe do the Runprogram and stuff from a procedure
Or eventually flush a event if nothing else workes

To the Z order thing, bringing your pb-app HWND_TOPMOST might be an alternative.

Henrik
chippy73
User
User
Posts: 59
Joined: Wed Feb 16, 2005 6:11 pm
Location: S.W.Wales

Post by chippy73 »

Henrik,

Thanks for your comments, all noted.

Alan
PB v3.94 PVXP v2.13 JaPBe v2.5.4.22
chippy73
User
User
Posts: 59
Joined: Wed Feb 16, 2005 6:11 pm
Location: S.W.Wales

Post by chippy73 »

I stopped the dos screen popping up twice with the runprogram command by detecting if the left button had been clicked. like this.....

Code: Select all

Case #Gadget_Form1_ButtonTX
            If EventType() = #PB_EventType_LeftClick
            RunProgram(..................)
Should have done that in the first place anyway.

Alan
PB v3.94 PVXP v2.13 JaPBe v2.5.4.22
Post Reply