How to get render window back on main screen? - directx

I've opened a v4 patch that's kind of old. It defaults to fullscreening when I open the patch. When I ALT+ENTER to exit fullscreen, it disappears. I'm assuming it is going to a monitor that is no longer connected.
Is there a command in the vvvv IDE to position the DirectX window back on the main screen?

I assume that the patch window is still visible. There is a node called 'Window.' Run the help file and find the render window that ahould be in the list if you cycle throuh getslice. You can then move the point on the IObox around and it should reappear on you main screen. Technically its probably just slightly unclickacble off screen but I appreciate the annoyance of this.

Related

Can I have the build dialog in the center of the screen?

Ever since Delphi XE2 (or even before) the build dialog appears in the bottom right corner of the screen.
Because I'm a curious fellow I'd like to see what's going on.
But that's hard when it's way there in a corner.
If I move the dialog to the correct centered position the IDE does not register/remember this and keeps on putting in in the corner every time it compiles.
Is there a way/hack to make this dialog appear in the center of the screen?
You have enabled background compilation: Tools | Options | Environment Options | Background compilation.
The designers presumed that you did that because you did not want the compilation progress to disturb you, and stop you being able to see the editor window. The whole point of background compilation is for you to be able to carry on working in the IDE whilst compilation progresses. If the dialog was shown in the middle of the IDE window then you would not be able to see what you were working on.
If you disable background compilation then the dialog will appear in the centre of the monitor.

Delphi, chromium, tabs and flash trouble

So I have this project in which I need to have few tabs (TPageControl) with flash pages running and grab a screenshot of them from time to time without switching active tab.
First I tried TChromiumOSR but the flash is not visible in it, kind of works if I click on a page's button that opens a popup with flash maximized. so it doesn't look like a problem with flash but rather with frames or sth. anywas a no-go.
then I've tried TChromium, everything works alright but I don't know how to grab a screenshot of a control that is on non-active TTabSheet without switching tabs.
using latest dcef3 trunk
any ideas? thanks
edit: It turned out that flash not being visible in OSR is an old chromium bug. It's actually playing but not visible if embedding code has "wmode" set to something else than 'transparent'. I've managed to change that property through js. To actually see the change, flash object needs to be removed from DOM and added again:
chr1.browser.GetFrame(str[i]).ExecuteJavaScript('document.getElementsByName("wmode")[0].value="transparent";', '', 0);
chr1.browser.GetFrame(str[i]).ExecuteJavaScript('document.getElementsByName("wmode")[1].value="transparent";', '', 0);
chr1.browser.GetFrame(str[i]).ExecuteJavaScript('var wtf = document.getElementById("gameApp2");', '', 0);
chr1.browser.GetFrame(str[i]).ExecuteJavaScript('document.getElementById("gameApp2").remove();', '', 0);
chr1.browser.GetFrame(str[i]).ExecuteJavaScript('document.body.appendChild(wtf);', '', 0);
If the tab is not being shown (it's not the front one), it doesn't get drawn (this is an operating system thing). If it's not being drawn, there's nothing there for a screenshot to capture.
If your requirement is to capture a Flash page without it being displayed, you're going to have to find another way to do it.
Assuming your Chrome is still based on WebKit, I know WebKitGTK has its own snapshot engine, if it carries down deep enough, perhaps you can tap into that for your captures.
At one point, there was a behavioural issue with TPageControl that until a tab had been selected, none of its children had valid handles created. I do not know if that is still the case, but if it is, it may complicate your desire to not switch tabs.
Assuming the control HAS a valid window handle, you might create a TBITMAP, lock its canvas, grab the Canvas's handle (DC) and fake a WM_PAINT to the control to get it to render to your bitmap.

Is Flash Player "Low quality" setting only about anti-aliasing?

It not just my curiosity, recently I've received a bugreport concerning one of my AS3 applications. This bug can be reproduced only if the quality in flash player is set to LOW (HIGH/MEDIUM - everything is ok). The bug changes the application behaviour, but it's a mystery for me, why it happens only for LOW quality while quality is said to influence rendering and visual appearance, not the code or behaviour.
Briefly, I have a menu panel (MovieClip) with several items (also MovieClips). Very simple, it appears on a screen after a MouseEvent and a user moves a cursor from one element down to another. When the cursor reaches the edge of the second item, the menu suddenly disappears.
In my code panel hiding is set on mouse click or mouse out.
Personally, I think, that the problem is in Tweener, I have to use that old piece of code. The menu panel is shown when mouse is above a user icon, and concurrently with the help of Tweener I produce some simple effects on this icon.
I have explored adobe and firefox (my app is for web browsers and the bug is reported for firefox) bugtrackers, but so far I have found nothing. Maybe misbehaviour of flash player 11 with Arrays, already fixed... I've run out of ideas.
From the docs:
LOW
Specifies low rendering quality: graphics are not anti-aliased, and bitmaps are not smoothed.
If it only happens when rendering it set to low, then it's probably a timing issue - i.e., the bug has always been there, but because you're wrapping up rendering earlier, you can trigger then bug. Is the bug reporter's computer a slow one? Is there a lot happening at once? Is the menu being removed, set to invisible, or repositioned?
Like #jeremynealbrown said, try and separate out your class to a simple project to make sure there's nothing wrong with your logic there.
Another method, override the removeChild() method, and visible and x and y properties to see which one is setting it, then put traces before all calls that call these to see what's triggering it.
If you think the problem is in Tweener, add a MOUSE_OVER listener to the menu panel that calls something like removeAllTweens(), no matter the state of the menu panel. If the bug doesn't happen anymore, this will show you that it's related to the tween engine.

Windows appearing off edge of screen (Delphi)

Windows in my application are popping up off the edge of the screen, and this of course is a problem because some of the windows are modal and can't be dismissed (you don't even know they are there).
I'm using the TurboPower Orpheus component which remembers the location and size of each form, then restores it when the form is shown again. It saves the size and placement in an INI file.
What can I do to prevent windows from ever showing off the side of the screen?
It's common for this sort of thing to happen if you use multiple monitors and then disconnect one, such as when undocking a laptop. Or if you dock a laptop to a screen with a higher resolution. Or use remote desktop, etc..
The remedy is to override the "remember my position" behavior with a sanity check, to see if the left+width exceeds the width of the screen (Screen.Monitors array, actually - thanks guys), and vice-versa for the top+height.
Ideally, you "bump" by subtracting the difference, so you're butting up against the edge that the window wanted to straddle.
Also, see if there are updates to Orpheus that fix this. If not, you can get the source, make the correction (optional), and contribute it back to the project. It's OSS, as I recall.
You may want to give a look at their DefaultMonitor property and read the code from TCustomForm.SetWindowToMonitor to see how to deal with positioning relatively to Screen.Monitors.
Use DefaultMonitor to associate a form with a particular monitor in a multi-monitor application. The following table lists the possible values:
Value Meaning
dmDesktop No attempt is made to position the form on a specific monitor.
dmPrimary The form is positioned on the first monitor listed in the global screen object's Monitors property.
dmMainForm The form appears on the same monitor as the application's main form.
dmActiveForm The form appears on the same monitor as the currently active form.
Note: DefaultMonitor has no effect if the application does not have a main form.
To recall the previous position of a form, without having it suddenly in an area which is no longer available (due to a plugged off screen or changed resolution), you just call
TForm.MakeFullyVisible;
That's it. See the documentation.

Zoom to full screen?

How to activate/use this feature in D2010 ?!?
I have checked Zoom to full screen in Tools > Option > Editor Option > Display clicked Ok button but nothing happened. Ok, i said to myself, let's see what the help has to say about this. I pressed F1 key, wait a little, help's coming up but as i have expected, it has no idea about this, ironically: the help didn't help. Google did find some old blog posts which provided some outdated information like double click on the editor tab or pressing F5 will do the thick. But, that's not the case, so i'm asking here maybe somebody has more information about this.
That option controls whether the code editor, when zoomed, will zoom to occupy the entire screen. If that option isn't set, then maximizing the edit window will leave space at the top of the screen for the main IDE application window. If you never maximize the editor window, then that setting has no effect. It might also only have an effect when you're using the "classic undocked" layout mode.

Resources