[fpc-pascal] Windows programming tutorials for FPC
james at productionautomation.net
Sat Nov 3 21:20:32 CET 2018
>And you can't just pop up a dialog window without having a window/form in the first place.
That’s probably my problem… My idea of just calling up the windows-API to get the save-as dialog probably won’t work without a form, even though I was able to get message boxes working
>In general, the logic of a GUI based program (regardless if Windows, macOS, Linux, etc) simply is different from a console program. Your console program main loop simply pretty much just becomes a procedure within the GUI main loop.
This logic difference is what is most confusing to me. I just don’t know where to put my main program and I don’t know how to output things to some kind of text box. I don’t want the user to do anything at all unless it’s necessary… so if everything is set up correctly, the program opens, does it’s thing, writes some status stuff to a text box and closes, no buttons to push or anything…. If I get a GUI program to work, I guess I can put a percentage complete barograph somewhere. If there’s an error, I need to stop and wait for acknowledgement of the error, or if the output file was not specified, I want the Save-As box to just open up on it’s own with out anyone pushing any buttons, and when the save-as box is closed the process completes on it’s own and the program exits without any further user intervention.
I’ve been tinkering with Lazarus, and I managed to get a form with some buttons based on the examples, and I did make one button open the save-as box… but I’m clueless on how to make the save-as box only come up when needed and by a programming command, not because someone pushed a button. I still can’t figure out how to write my writeln’s into a text box of some sort. I get the idea… instead of a sequential program the executes from beginning to end, everything kind of all happens at the same time
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal