Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / What can cause BlueGui to disappear?

Author
Message
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Sep 2004 01:36
I have a window, which is a child of the main application. In a simple test, it works fine.

In a more complicated project, it "disappears". I see it for a split second, then it goes and never returns. I have tried to SHOW WINDOW every cycle as a safety net, to no avail.

In the simple version, I added CLS to the loop. This doesn't kill it, it's quite happy.

The main project is 9000+ lines, so tracking it down could be a problem. Any ideas on what could be causing this? Simple example in box below



BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 16th Sep 2004 01:38
Try adding this:

BRING GADGET TO FRONT GadgetID

EZrotate!
Tokamak Physics Wrapper!
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Sep 2004 01:48
Where did you find that? I knew what I wanted to do, but couldn't find the opcode anywhere!

Is there a way to check if it's not at the front? If I put this in the main loop, I see it, but it's a horrible flickering epileptic inducing nightmare.

More to the point, what is sending it to the back? And is it the of the DB environment, or the back of the Windows environment? It should be a child of the main DB window, and there are no other gadgets to hide it.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 16th Sep 2004 02:54 Edited at: 16th Sep 2004 02:55
Is your app running in Fullscreen Exclusive mode? If so you will need to change it to Windowed Fullscreen.

Unforunately you cannot have windows controls in a fullscreen DirectX environment.

In any case, you should not need to use BRING GADGET TO FRONT (Under "General Commands" in the help files) each loop - not a good idea!


BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games.
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Sep 2004 03:49
I've tried Windowed Fullscreen, Windowed Desktop, and Windowed.

Can other things affect it, such as DRAW TO FRONT?

The weird thing is, I used to have a debug PANEL gadget, and this has also stopped working.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Sep 2004 07:13
Aaaaaah!

I've tried every type of window style, none of them are working. I can detach it from the main app, and it works (ie no parent), but that is no good to me. I need it to be part of the application window.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 16th Sep 2004 07:20
Can you step through the application in a debugger and let me know where the gadgets disappear?


BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games.
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Sep 2004 17:00
It's a tough one. This is my upgrade of Magic World. There are SYNCs everywhere, and when I add extra ones, it kills the program.

I can WAIT KEY anywhere and the Window stays, I guess it must be a SYNC that kills it.

I shall give it a go, I realise this is the only way to get to the bottom of it.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 17th Sep 2004 04:07
OK...it gets weirder...

I can create the Window and gadgets, as you see in the source above.

Immediately after I can display a message (as in TCA's message DLL, shows a standard windows message box). The Window is still visible.

I can then send a second message, as the next line of code, and the Gadget window has vanished!

Further info: I can put the message code anywhere. It doesn't have to be the next code after creating the gadget. But as soon as the screen has updated once, the Window gadget disappears.

help!!!

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 17th Sep 2004 05:25
Have you tried using the blue gui messagebox commands? ERROR MESSAGE and QUESTION MESSAGE.


it's cool to hate
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 17th Sep 2004 06:19
I've broken into the code using various methods, just to see what is happening. I think the bottom line is, the very first display kills the Window.

I will try the BlueGUI messages anyway, just on the off chance it gives any more clues.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 17th Sep 2004 06:32
No...BlueGUI error message does exactly the same. I guess it is calling the same API.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 17th Sep 2004 06:51
Its very odd, try calling RESET GUI just before the main loop, and make sure there are NO DBPro window commands in the main loop, ie.

SHOW WINDOW
SET WINDOW TITLE
SET WINDOW LAYOUT

etc.


BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games.
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 17th Sep 2004 17:57
I have solved the problem!

Your suggestions above got me thinking, Rob.

Firstly - RESET GUI doesn't exist in my version. I only d/loaded it a couple of weeks ago.

The first thing I do in my program is initialise a few things. The second thing I do is SETUP GUI(). Before I create any Gadgets, I do various other things, including set display mode and set window position. There's a whole host of other things in between too.

So, I have moved the SETUP GUI() to run just before I create Gadgets. And now it works!

So it's not quite a problem with window commands in the loop, it's a problem with window commands after the SETUP GUI()

Thanks for all the help.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 17th Sep 2004 18:59
Yup, its a series of issues in DBPro.

In pseudo-code, the reason for the problem is that my plugin makes some modifications to the DBPro window, when you call the DBPro window commands, they lose those modifications.


BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games.
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 17th Sep 2004 20:31
Is there any way to reinstate the Gadgets properly once this has happened? There may be cases where you want to change the window. fortunately, I don't, so it's just a question right now.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 17th Sep 2004 20:49
Try using RESET GUI, its not in the keywords file but I think its still in the version you have.


BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games.
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 17th Sep 2004 23:32
I tried:

RESET GUI
RESETGUI
RESET GUI()
RESTGUI()

no luck. I don't actually need it now I have fixed my problem, just wanted to let you know it doesn't seem to exist

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 18th Sep 2004 01:57
Anyhow, I have definately implemented this command under v2.


BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games.

Login to post a reply

Server time is: 2024-03-28 23:03:53
Your offset time is: 2024-03-28 23:03:53