Many friends may have encountered this problem: delphix switches out of ALT + tab in full screen mode, and then returns to the original window, the page becomes blank. This is intolerable for gamers.
The fire man searched a lot of materials for this and found that delphix had such a problem. However, most of them solved the problem by blocking Alt + TAB. It is estimated that this is a small bug of delphix.
However, the fire people do not like to use this method to solve the problem, which makes the user quite inconvenient. After many tests, the fire personnel found conditions for such problems and methods to avoid such problems (however, they could not completely solve them. Due to limited time, they could not explain the reasons, hope that experts can further study and give theoretical explanations) and share with friends:
Download the following routine:
Click to download this file
After this routine runs, everything works normally. However, after switching out Alt + tab and returning to the original window, the page will become blank. To avoid this error, the Fire found the following two methods:
1. Set dxdraw. Options: = dxdraw. Options + [doflip]. However, if other VCL controls (such as tedit) exist on the form, the VCL control cannot be properly displayed.
2. Set: dxdraw. autosize: = false. In addition, to display dxdraw at the correct resolution, add:
Program code: |
[Copy code to clipboard] |
Dxdraw. surfacewidth: = dxdraw. display. width;
Dxdraw. surfaceheight: = dxdraw. display. height;
This method was tested on the popular legend 2 program.
Reference content: You can also use the following method after testing by a user:
The key is to restore the window to the window mode after ALT + tab:
Dxdraw. Finalize;
Dxdraw. Options: = dxdraw. Options-[dofullscreen];
Dxdraw. initialize;
When the window is activated, it is set to full screen mode as follows:
Dxdraw. Finalize;
Borderstyle: = bsnone;
Dxdraw. Options: = dxdraw. Options + [dofullscreen];
Initdxdraw;
Original article:
Http://www.huasoft.net/huosoft/blogview.asp? Logid = 39 & cateid = 2