In the figure (fig.1 and fig.2) the two input windows side by side (I need only the graphical one), I was able, in the old version, to use different cursor and selecting and moving elements of graphical window.
Though you might need to adjust colors (or the loading/saving of images)
Are you saying that the attached picture of bad quality ? I can see both without problem.
1) The program uses “graphical output” and at the start the program opens 2 windows (in DOS mode), the first one can accept keyboard input and the second one is for the graphical program (the only one I expect to have !). This seems that implies keyboard input cannot received by the “graphic windows”, but it works fine if I insert input on the on the first windows. I need to input directly on the graphic window”!You have a console application. So that second (actually the first) is a console window.
You have a console application. So that second (actually the first) is a console window.
If you don't want a console window you can enable gui application.
The graphic window is opened by the initgraph call.You have a console application. So that second (actually the first) is a console window.Actually, he seems to have two console windows; only the second one is in "graphic" mode*. As to how he did that ... it's anyone guess :o
If you don't want a console window you can enable gui application.
You have a console application. So that second (actually the first) is a console window.
If you don't want a console window you can enable gui application.
Actually, he seems to have two console windows; only the second one is in "graphic" mode*. As to how he did that ... it's anyone guess :o
But I agree. Using a real Windows-window and using a canvas would be much simpler. Especially when dealing with mouse-events.
added PtcGraph also to my unit GraphPV, now there is an exception at the execution, if I ignore the graphical window accept the char inputs, but still two windows !
the error was "the project raised the exception TPCTError : cannot recycle because it is not already open";
but for the mouse functionality ?
However, soon I'll post here the minimal code to reproduce the effect I see (it is quite easy, very few raws of code)
In DOS the orignal progam works in this way (it was a demo for univesity student in the engineering faculty)
- start
- open a "Logo" windows
- wait for "Readln;" to move on
- start the graphical interface
- here just typing a letter a command is executed or..
- ..by mouse I can select some element and move it around in the final position
I soon as possible I'll post here the minimal code to reproduce what is happening.
Thanks madguy.I guess, suggestions above are right. You just need Graph and Crt modifications, that support Windows. I've never used PtcGraph/PtcCrt, but, I guess, it's right suggestion. You just need to do two things: 1) Switch application type to GUI, so console window will disappear 2) Find a reason, why it throws exception. According to exception text, you try to use something before initializing it properly.
I understood that in your workaround console windows is still there and I need keyboardinput. Do you have some code to show ?
Following the suggestion of rvk, and removing the intermediate readln; all works fine, I jump in the online graphical (no console window or maybe it is hidden ) windows and accepting char input command, however this approach raises the exception I cited above, I need to intercept it and just ignore. I'll double check later if this works on release mode.
As already comment it is just a tentative to resume a dead code full rewritten now as standard windows application.