Windows 8 App / Loading screen - c#

Every application in Windows 8 starts from this kind of view
(below is camera application) :
My question is :
Is this possible to change programmatically this view for
progress bar (C# or XAML) or any other animation ?
Or is this view related with time computer need to start application so
we can not use resource of our app yet ?

You cannot change how the launch screen is displayed. You can only change the picture and color.
However, the way to extend the launch screen is to make sure your app's first action is to display another launch screen (typically identical to the first with an added progress bar) while the rest of the app is getting ready. This approach is described in this guide.
Please keep in mind that an extended load screen might not be the best user experience. After all the user is still waiting for the app to launch. I recommend that you optimize launch time to avoid using the extended launch screen if you can. I cover this in more detail in my book (sorry for the shameless plug).

That screen is displayed while the runtime is starting your application. Its an image as defined by your application, so to my knowledge, there is no way to inject logic.
However, you can make your app "start" fast (so that the runtime removes the "loading" image), then put up a splash screen while the rest of your content loads. The NFL for Windows 8 app does a good job of this, as do several other apps.

Related

How to be OnTop but not OnTop of a full screen application

So I have tried searching for the better part of a day for the answer to a simple question. I want my C# application to popup another winform on a timer and then close it after a delay. Simple enough, done and done. Now my issue is that I want it to actually be on top of other applications UNLESS they are full screen. By that I mean a true full screen application such as a game. I do not want to interfere with such an application since it should take priority over my application.
The issue is that I am using the 'OnTop' property on the popup form and, while it works perfectly for any other applications I have been testing it while playing a full screen game and the form, when it "Show()"s, takes the full screen application and drops it into windowed mode.
Is this the intended effect of the 'OnTop' property with full screen applications? If so is there a way that I can have my form popup on top of normal windowed windows and not interfere with full screen applications?
Any links, example, a kick in the general direction is great. The only hits that I come up with when searching for winforms involving full screen is people trying to get their application into full screen or having their application take focus away from another application.
Thanks on advance.
(I didn't post any code due to it just being a simple winform that is "formX:Show()" on a timer with the "onTop" property set)
(EDIT) So thanks to awilson53 for putting me on the right track I was able to find a method (albeit somewhat picky) to determine if an application is full screen. Seems kinda simple, and an "well duh", answer after all is said and done.
95% of the credit goes to the author of the article: http://www.richard-banks.org/2007/09/how-to-detect-if-another-application-is.html
~5% goes to awilson53 for getting me on the right track. :)
Check out this wrapper for the EnumWindows function. This will allow you to enumerate all open windows and determine their window state. You will want to check the EnumWindowItem.Maximized property, and if it is true set your OnTop property to false. If none of the EnumWindowItem's return Maximised you can set OnTop to true.

White Screen Issue in Silverlight OOB

I've a Silverlight Application built with Silverlight 4 to and which works in Out of Browser mode. When I launch the application, there is a white screen appearing for some time. I did some googling, which referred me to a blog post by Mike Wolf, but then the link was removed. So I thought of getting the window handle and hide the window and showing something else till the loading is complete. But I understand we can't do pinvoke from Silverlight 4. But is, there some way I could avoid the white screen?
Maybe you are trying to call a webservice in the constructor of your application class (app.xaml.cs). As far as i know this isn't possible.

my C# winform needs to detect when other applications enter/exit/run-in TRUE fullscreen, prefer by events

my C# winform application needs put itself in standby mode during time other application runs in true fullscreen mode (not only maximized), like video games, video movies, powerpoint.
I need a method to detect if currently there is other application in fullscreen.
Is there a possibility to register to events which will fire when other application enters/exits fullscreen?
for both needs, I'll appreciate to have code snippets.
According to this question "full screen mode" is not that special, just create the right type of window and the OS will treat it as full screen. Once you know that, you can see here how to detect such windows.

Screensaver Hides Desktop

we would like to build a screensaver that shows the desktop and the running applications but prevents user input by showing the login screen. The idea was to build a windows app with no window or a transparent window. However, as soon as the screensaver gets activated the desktop and all applications are hidden from the screen.
Is it possible to start the screensaver without hiding the desktop?
Thx,
bja
Is it possible for you to implement this as something other than a screensaver? I'm assuming that the Windows API does have a method that allows you to tell how long the computer has been idle (otherwise, how does the stuff that manages screensavers do it?), so if you use that you could just set up your application such that it's continuously running as a background process, and will pop up a modal dialog box (or your idea of a transparent window) or something that prompts for the user's login info when the computer has been idle for a certain amount of time.
Why can't you just grab an image of the screen when the SS kicks off. Then use that as the backdrop of your SS.
Vista has a bubbles screen saver that just starts putting bubbles on the screen. Not sure how they do it.
You are better off just creating a full-screen application with a transparent window that starts up on a timer like a screensaver. The screensaver functionality while similar to what you are doing, functions much differently.
As an alternative suggestion, you could always use a service (or background app) to gather the information you want these monitoring tools to display, or even just to grab periodic screenshots of the (hidden) desktop, and then have your screensaver query that app to get the data it needs to display.
That way, you get the benefit (the secure desktop, the usual Windows login sequence, etc.) of a screensaver, but still get to display what you need to.

Reset Taskbar Flash in C#

I have an application where the taskbar flashes if an event has occurred. This is working perfectly, and was relatively easy to implement using a Win32 API described below:
http://blogs.x2line.com/al/archive/2008/04/19/3392.aspx
However, when I stop the flashing, sometimes the application is stuck in the "highlighted" state in the taskbar. This only gets reset by clicking on the application in the taskbar, minimizing it, then re-maximizing it. Is there a way to clear this from being highlighted without any user interaction?
Maybe instead of flashing it you could put an overlay icon on it - one line of code from C# with the Code Pack. Then when you want to clear it you could take the overlay icon away - again one line of code. Windows 7 only, however.
Can you post the code that you are using to "Stop" the flashing?
Have you also considered using a different flag such as:
// flash until the window comes to the foreground
FLASHW_TIMERNOFG = 12;
You will still need to click on the applicaiton to get the flash to stop, but you should not have to minimize then re-maximize the app to get the flash to stop.
You can include the FlashTaskbar snippet and use the following code
FlashWindow(Form.Handle, FlashMode.FLASHW_STOP)

Categories