FMX rendering issue on both Windows and Android - firemonkey

Have a simple FMX form with a small image and under 10 standard components (buttons, panels, labels).
There is a considerable delay between the form's onActivate and onPaint. usually on windows about 4 seconds, and Android is completely stuck and never gets to onPaint!
There is no code running between the procs nor execution of threads nor timers.
What could be going on in the background between those 2 processes?

Related

Receiving high precision WM_MOUSEWHEEL events with Logitech mouse on Windows 10

To improve scrolling in my application, I recently added support for high-resolution scrolling wheel events. According to the documentation this is pretty straightforward: The handler for WM_MOUSEWHEEL should support arbitrary values as opposed to just +/- 120.
Examples of applications doing this properly are Firefox and Chrome on Windows.
I am using a Logitech mouse with a high-res wheel (MX Master 3), but I noticed that all the events I am receiving are just +/- 120. However, I could find two pretty weird work-arounds:
Rename my program to Firefox.exe
Focus on Firefox (with my app in the background), move the mouse over and scroll there
The second trick works with other things as well. For example, it makes the Windows 10 Settings app scroll smoothly. Here's a demo of the difference in action (first 4 seconds focused, then unfocused with Firefox having focus): https://www.youtube.com/watch?v=gb1FUtyLxUg&feature=youtu.be
I assume the driver is doing this for compatibility with older apps that can't handle anything that isn't 120. But is there a way for my app to opt-in to get the better events? Or does the Logitech driver simply hardcode a bunch of browsers and everyone else is out of luck?

Automatically open and position eight webpages across four 3840 x 2160 screens (Windows 10)

I need to find a way to trigger the opening and positioning of eight live webpages across four screens. I am currently using this AHK Workspaces - Window Management AutoHotkey Script, but I am finding that it's inconsistent. The hotkey trigger will only work half the time and the webpages don't always open to the pre-defined positions. I feel this script would be perfect for multiple application windows, including a web browser, but since I'm trying to trigger multiple webpages (all currently Firefox, but I'm flexible), it's becoming messy. I'm open to writing my own code to get this working, but I don't know where to start and would really appreciate some advice.
Essentially, once I have this first phase working, I'll want to develop a second phase with four webpages across the four screens (one webpage per screen, all maximised). Then I'd want to set it to a schedule, where the first phase is triggered and runs for 45 minutes, then the second phase is triggered and runs for 15 minutes and so on.
Any help or guidance would be truly appreciated. Thank you!
I am not sure to understand fully what you are trying to achieve.
My recommendation would be to create a basic Winform app, that run fullscreen with 4 WebBrowser controls and code to manage the refresh. cf. https://learn.microsoft.com/fr-fr/dotnet/framework/winforms/controls/webbrowser-control-windows-forms
You could also create display a single webpage on each screen containing an iframe that displays the target contents, and some JavaScript code to manage the rolling.
cf. https://www.w3schools.com/html/html_iframe.asp

Navigation.PushAsync on Android impact on button events

I have a Xamarin cross-platform app with a several "PushAsync" flows with button navigation which work perfectly with iOS and UWP, but when on Android, after the initial push, the new buttons on the next page, even though the "XAML" includes enabled "true" arguments, are disabled. What is needed to enable them that is compatible to the two other OS's?
I have changed the sequences of pages to test if the pages will respond.
I expect the pages to proceed to the next page in the flow like they do in iOS and UWP.
The page was not truly blocked, but delayed in presenting itself by other treads which were looping and consuming CPU cycles. Are you using multiple threads? Can you give them a lower priority and raise the priority of the delayed thread? Or just take them off line? Do so, and see if that enables the page to load.

DirectX Performance Issue maximized window

I develop a test application with directx 11 und fl 10.1.
Everything is working as expected and fine, but when I maximize the window with my graphics in it, the time per frame increases drastically. like 1ms to 40ms.
NVS 300 graphics card
Windows 7 32-bit
Application that draws few sinuses with direct3d, c# via sharpdx
Windows forms with a control and sharpdx initialized swapchain, programmed to change backbuffer on resize event (would occur without that too though)
I used a System.Stopwatch to find the issue at the code line:
mSwapChain.Present(1, PresentFlags.None);
where the time it needs when maximized increases by a lot suddenly.
any clues?
In my specific case, switching to windows classic theme with aero disabled solved the issue. Because the frame performance got worse if the windows start button started to lay over the resized window.

Progressbar loading delay on SplashScreen page in Wp7

In my app, have long running process in background before loading the app. So that i developed splashscreen with progressbar in popup. Popup is open and closed is workign well. It doest not give any problem. But progressbar in splashscreen, not loaded quickly when popup opened, some second delay happend. Progressbar always in visible mode and Isdeterminate also true mode.
I don't know why delay happend for progressbar.
This problem happend only in windows phone 7.1 only.
Pls Help me.
Thanks
I think, you try to draw the same Splash Screen image but with Progress Bar on top after application has been launched. Probably, your hard loading work performed on UI thread, so it freeze Progress Bar also. Try to move all work to background thread and if you have complex layouts (in ListBox, for example), try to add items with some delay to give UI thread time to update anything else.
The splashcreen is shown whilst the phone unpacks the .XAP file, loads the assemblies, starts the Silverlight runtime and renders your first page. Until this happens, you application is not executing, so you cannot display a progress bar or perform any other tasks. Hence the delay.
The only think you can do is work to reduce the XAP size and make your initial UI as simple as possible so that the first page renders quickly.

Resources