windows & gadgets without Repeat : Until
windows & gadgets without Repeat : Until
just wondering if i could openwindow or add a gadget and keep it displayed without using a Loop of repeat until ?
PUREBASIC is AWSUM
Re: windows & gadgets without Repeat : Until
Yes, you can use While .. Wend.
What do you need this for?

What do you need this for?
-
- Addict
- Posts: 4777
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: windows & gadgets without Repeat : Until
Trond wrote:Yes, you can use While .. Wend.

Re: windows & gadgets without Repeat : Until
Delay()
Note that the user has no chance of interacting with the window or the gadgets. And he can't close the window. :roll:
Note that the user has no chance of interacting with the window or the gadgets. And he can't close the window. :roll:
Trond wrote:What do you need this for?
Re: windows & gadgets without Repeat : Until
then there is no useTomS wrote:Delay()
Note that the user has no chance of interacting with the window or the gadgets. And he can't close the window. :roll:
PUREBASIC is AWSUM
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Re: windows & gadgets without Repeat : Until
Windows is about events, so you need an event loop.cybergeek wrote:without any kin of loop
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Re: windows & gadgets without Repeat : Until
Yeah, any GUI program (on any platform/OS) has at the very least a main (or outer) loop.
Maybe if you told us what you are trying to do we could help, but asking for how to make a GUI program without looping makes no sense at all.
What exactly are you trying to do that makes you think you can not use any form of looping?
(PS! A program without any looping would end almost immediately as well)
Maybe if you told us what you are trying to do we could help, but asking for how to make a GUI program without looping makes no sense at all.
What exactly are you trying to do that makes you think you can not use any form of looping?
(PS! A program without any looping would end almost immediately as well)
Re: windows & gadgets without Repeat : Until
WaitWindowEvent(Timeout) without the timeout value is what you might be looking for. It only does a loop when an event happens, no need for a delay() in the loop unless the windows activity is happening thousands of times per second in which case you can use 1 as a timeout value and it would be like doing a Delay(1).
Re: windows & gadgets without Repeat : Until
i create a complex dialog or control in PB to use with another application and embed it in a dll but when that app calls the dll the loop haults the execution!
PUREBASIC is AWSUM
Re: windows & gadgets without Repeat : Until
Either call the dll in a thread, or have a function in the dll which contains everything inside the loop (use WindowEvent()), then have a loop in the main application, and call the function in the dll several times every second.cybergeek wrote:i create a complex dialog or control in PB to use with another application and embed it in a dll but when that app calls the dll the loop haults the execution!
Re: windows & gadgets without Repeat : Until
the application is in another language
PUREBASIC is AWSUM
Re: windows & gadgets without Repeat : Until
So run the window in a thread in the dll.cybergeek wrote:the application is in another language
Re: windows & gadgets without Repeat : Until
If by 'halting execution' you are referring to non-GUI matters, then yes, such a dll will of course halt execution and then Trond's suggestions are the way to go. If, on the other hand, the host is running a GUI of it's own and this appears to freeze, then there is a problem with the host if the dll is running a PB event-loop.
A host written in PB which runs a GUI and which then loads a dll such as the one you are working with will potentially throw up certain problems due to the nature of PB's message retrieval mechanisms. You would generally be safer employing an API message retrieval loop within the dll in such cases.
A host written in PB which runs a GUI and which then loads a dll such as the one you are working with will potentially throw up certain problems due to the nature of PB's message retrieval mechanisms. You would generally be safer employing an API message retrieval loop within the dll in such cases.
I may look like a mule, but I'm not a complete ass.
Re: windows & gadgets without Repeat : Until
here is an example that halt a program in Autohotkey
http://www.autohotkey.net/~mohdumar/testdll.zip
http://www.autohotkey.net/~mohdumar/testdll.zip
PUREBASIC is AWSUM