You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
Use the MOD operator to control the Doevents, something like:
Code:
IF I MOD 2 = 0 THEN DIALOG DOEVENT
INCR I
If code takes a while to perform, one must include some kind of
DOEVENTS inside it, to allow other things to happen in Windows.
So, you message pump isn't broken, it's only very busy and selfish..
FUNCTION PBMAIN
DIM FileDataStore(50)
DIALOG NEW 0, " Convert TS Ascii Data ", 130, 10, 110, 35, 0 TO hDlg
CONTROL ADD BUTTON, hDlg, 101, "Run", 10, 5, 40, 14, 1
CONTROL ADD BUTTON, hDlg, 102, "Quit", 60, 5, 40, 14, 0
CONTROL ADD LABEL, hDlg, 114, "Line Info", 2, 23, 109, 12, ' Info
DIALOG SHOW MODAL hDlg CALL MainCB
END FUNCTION
'¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤'
Fiairly straightforeward. So I hit the run button and it starts bombing thru 300 lines of data in a file.
Then i realize that I forgot something and i need to quit the app. So I pust the QUIT button and nothing happens. No messages are processed like button pushes.
So I added a DIALOG DOEVENTS and that "fixed" the broen pump, but now it crawls thru the code. It takes about 10x longer.
How do fix the pump without slowing the code pls
Is there a hand pump for sneaky one shot btn push emegencys?
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: