I have an design idea about the appearence of a small program , which is basically a windows form with a combo and one button.What i would like to do is the following.When i click on the .exe of the program to start it , i would like to have an non-standart start up o开发者_高级运维f the window.To be more specific i will give you an example - i click on the .exe , upon which some dots appear in a random matter all over the screen , after those points appear they start moving in a spiral way so finally they merge into the standart square windows form shape.So my question is - is there a free API or anything similar with the help of which its easily doable or there would be a lot of work needed from myself to create those API's ?
Thanks in advance
This will be extremely difficult to do.
It will also be very annoying for the end-users.
In short I see two options:
Render your form to a bitmap and render peices of the bitmap to a full-screen layered window. You'll have to call
UpdateLayeredWindow
repeatedly to get the animation working but that should be a good lead. I could see getting 10-20 fps with this method.Take a screenshot of the desktop, create a full screen borderless topmost window, render the screenshot, then render your animation on top. This will prevent any other windows from recieving input while the animation is playing.
Either way your users will hate you.
As SLaks has already said, that will be pretty annoying for the end-users.
If you ask whether it is doable, I would say yes, everything is doable in programming, it all depends on the effort you're ready to put into.
As a very simple algorithm, here are some steps I would go through for your achievement:
- Create a
System.Windows.Forms.Form
; - Set
Form.ShowInTaskBar
= false
; - Set the
Form.TransparencyKey
property; - Set the
Form.ControlBox
= false
; - Set
Form.TopMost
= true
; - Drop a
PictureBox
control on yourForm
; - On the
Form.Load
event, take a screenshot of the current desktop and set it as the image of yourPictureBox
. - Then, build an
animated GIF
, and superpose it to your form.
You will most likely appreciate, I guess, the following link which discusses about C# Winforms Animation
.
Disclaimer: This is an arbitrary algorithm off the top of my head. Besides, I illustrated the steps I would go through in order to achieve such objective, though I have never ever performed WindowsForms animation.
Althouth this might be cool to program, users are conservatives and "always anxious" about program startups, so, as already mentioned, this might become pretty annoying for the end-users.
I hope this helps you through anyway!
精彩评论