please give me idea about effect. in android or windows vista a effect is used when any application window is open or closed. effect is like grow and shrink. very similar like jquery transfer effect. i can generate that effect like window size increment or decrement with in time but it flicker and not smooth like professional. so please guide how to generate that effect in windows application which look very professional. also tell me is there any free open source library to generate that kind of effect. please me with sample code.
thanks
Do you use winforms or WPF? Setting alpha or size with a timer in wpf will give you ugly flickering results.
you have to define an animation and apply it to your window.
For a short introduction on animations read this:
http://dotnetslackers.com/articles/wpf/IntroductionToWPFAnimations.aspx
If you want to animate the whole window you should read another article:
pavanpodila.spaces.live.com/blog/cns!9C9E888164859398!634.entry
It deals with some problems that can occur if you want to animate windows propertys.
Related
I've created my HoloLens application from the "Holographic DirectX 11 App (Universal Windows)" template. When I start the app, it shows a slate (a 2D window) in the HoloLens and I need to place it in the space. Then my app will work as a hologram (in an immersive view).
Before going to the immersive view, I want to check some conditions and show a message to the user, if the application cannot start.
Currently, my app does not have any XAML code.
It uses SharpDX library.
Can I write some text on the slate window?
I understand that this is an old question, but I will answer just in case somebody else needs to do something similar.
There are two possible ways to do that:
1) Perhaps the easiest way is to start your app as a XAML app and then, if everything is alright, to switch to DirectX mode, otherwise write your message on the main XAML window of the app. You could also provide a "Go Holographic" button for the user. There is a very good blog post here by Jonathan Antoine, which explains how to perform the switch between XAML and Holographic mode in detail- it also provides the source code
2) Another solution is to write your text to a DirectX texture and then paint that texture onto a rectangle in the 3D immersive mode. But that one is probably not exactly what you want since you'll need to switch to Holographic mode first and it is a fair amount of work
I've created a Launcher for my game and at the moment I'm very happy with it. Though it looks like a standard windows form, I've heard you can but through Google Searches found nothing. But is it possible to completely customize the windows form? E.g. like a WoW/Diablo Launcher?
If so are there any places to check out some tutorials or get started?
If you're using visual studio, there are many options regarding window styles and customizability. For example for my game launcher I simply turned off all of the windows boarders. I followed a video similar to https://www.youtube.com/watch?v=PiTnIc50tAA to get the basic game launcher then I customised it by turning off the property "Control Box" and setting minimize and maximize properties to false. I was able to achieve a custom game window. I hope this helps !
i am working on visual studio 2010.
i created my master form windows state is Maximized
my system resolution is 1366X768 ,,in one button click i am calling 5 forms together into my master form.. but in my system everything getting correct..
but i installed the same application in my client system,,that system resolution is 1024X768
but here my alignment is not getting proper..now my image is getting like this:
so how i can fit my windows form application in all resolution,,if any one know please help me to find out
You basically have two options:
1) Follow Microsoft's instruction on implementing auotscaling for Windows forms applications. (See http://msdn.microsoft.com/en-us/library/ms229605(v=vs.110).aspx)
2) Write your own code to scale the form based on resolution.
============================
Other factors to keep in mind.
If you app is translatable that can affect scaling
A user changing the Windows default font size can have the same affect.
Hope this helps.
how to give size of a control in window mobile app dynamically,because i have developed one application,when i used to run that application on different emulator's ,the size of that control's in that application differ's for different emulator.so could u plz help me that how we can handle such issue in windows mobile application in which iam using visual studio 2008 and windows mobile6 classical emulator
Your question is a bit ambiguous, but I'll take a stab at it.
Apparent control size (how big it looks to your eye) if affected byt a few things. The obvious are things like Dock and Achor properties, which are well documented online and are the same as for the desktop. What is less obvious is scaling. Some PDAs have a 240x320 display, while others may have 480x640 yet with the same physical dimension screen.
The platform can attempt to have your single Form code work for both by doing "pixel doubling" which essentially just doubles all of your size values. This tends to end up with graininess and I think it was turned off by default starting with WinMo 6.
To adjust this behavior, you can adjust your Form's AutoScaleMode property.
When you create a form in .Net it appears as a dialog box in a portrait layout.
No one normally likes to read sideways, or upside down, but I have a very valid reason to rotate the form.
Anyone knows how to do it on Windows Vista with C#?
Does it have to be in WinForms? This is very easy to do in WPF, using rotation transforms. Unfortunately, the WindowsFormsHost integration with WPF does not allow rotation transforms.
EDIT
I understand, now, that the form in question is out of the control of the poster. Writing the control in WPF won't fix the problem.
This would be a bit of extra work, but if you mainly just need the contents of the form to be rotated (and not the entire window including title bar, window controls etc., which I've never seen before), you could instead make an entirely owner-drawn usercontrol that was rotated 90 degrees, and drop it on an ordinary form. You wouldn't even have to adjust your drawing of everything, since you could do a RotateTransform on your Graphics object and then draw everything normally.
Or if you need the entire form rotated, you could make the form borderless and then do basically the same thing, drawing the title bar and windows controls yourself also.
Update: here's a link to an MSDN article that shows how to rotate the entire screen in C#:
http://msdn.microsoft.com/en-us/library/ms812499.aspx
This is for regular Windows (not Windows Mobile), so it should work for your porpoises, although it will rotate all of Windows and not just your application's form. Depending on how fast this works and your overall needs, you could rotate the screen 90 degrees when your application gets the focus, and then rotate it back to normal when your app loses focus.
Update 2: I just reread your question and comments. You're talking about rotating the window of a separate application in a separate process, so WPF will definitely not help you here. The MSDN link might be what you need. In your application, you would rotate the screen 90 degrees, then start the other application in a separate process. This would work best if you could force the separate application's window to be maximized, which you can do by P/Invoking the FindWindow and SendMessage APIs (you could also make the window always on top, which would put your computer into a sort of kiosk mode for this application). There's a version of the Process code that basically makes starting another application a blocking call, which means your app will wait for the shelled application to close before resuming. Once the app closes, you can put the screen back to its normal orientation.