.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

size of window on desktop

Posted By:      Posted Date: September 04, 2010    Points: 0   Category :WPF
i have read all the threads related to this but all i am getting is the size of the canvas in the window, i want the size of the window currently showing on desktop please help me out?   thanks

View Complete Post

More Related Resource Links

Aero Glass: Create Special Effects With The Desktop Window Manager


In this article we introduce the Desktop Window Manager, the new interface that manages how windows are rendered on the Windows Vista desktop.

Ron Fosner

MSDN Magazine April 2007

Lock the window size to uniform in wpf

I have a window that contain a ViewBox. The ViewBox's Streach property is set to Uniform. And I want to set the window size to be uniform! that means the Height And Width properties are relative to each other.

Saving and restoring WPF Window size and position

I have a WPF window.  I want to do a very common thing:  Save the window size and position on close and restore them on open. I tried a C# approach and a XAML approach. I prefer the XAML but I'l take advise on either.  Here's the XAML I've tried: Title ="PVIEW" ResizeMode="CanMinimize" BorderThickness="0" WindowStartupLocation="CenterScreen" WindowStyle="SingleBorderWindow" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Loaded="Window_Loaded" Closing="Window_Closing" Closed="Window_Closed" SizeChanged="Window_SizeChanged" Height="{Binding Source={x:Static self:Properties.Settings.Default}, Path=LastWindowHeight, Mode=TwoWay}" Width="{Binding Source={x:Static self:Properties.Settings.Default}, Path=LastWindowWidth, Mode=TwoWay}" Top ="{Binding Source={x:Static self:Properties.Settings.Default}, Path=LastWindowTop, Mode=TwoWay}" Left ="{Binding Source={x:Static self:Properties.Settings.Default}, Path=LastWindowLeft, Mode=TwoWay}"> ... In Settings, I also created four entries, (all doubles) with the same names as the Path names above with all their values set to 0. Then I added this line to Window_Closing:  "Properties . Settings . Default.Save(

How can I change the WPF window title bar size through Interop services

Hi all,      I want to use my custom title bar in my custom window. In that need a title bar with more height than default widow title bar height. How can I achieve this through window Interop services???? Thanks in Advance.. Suresh.

Window size

hi friends,
How can I change the Window size when a window opens
I put a url in Hyperlink and target is Blank now hen the Navigate url opens I want to change the Sixe of the Window , project is as i said and do not want to make popup window !

All the best

Something changes my window's size


Hi there

Im using windows 7 and visual studio 2008 c#

Can someone explain me why the size of my windows form changes by itself? Let me explain a little bit more.

I create a simple windows forms application with form1 and just a label showing me the actual size of the form:

label1.Text = String.Format("Width = {0}, Height = {1}", this.Width, this.Height);

i give it the size of 800, 600 in the form's property SIZE

i run the applicacion

In windows 7 i get 800,600 good, but  i run it on windows server 2008 or in windows xp and i get 594,478 ???

i give it the size of 1024,768

In windows 7 i get 1024,768 ok, but in windows server 2008 or in windows xp and i get 762,614 ???

i give it the size of 1280,800

In windows 7 i get 1280,800 ok, but in windows server 2008 or in windows xp and i get 779.639 ???

Does anybody knows why?

Help most appreciated



How to take a screenshot of a Full Size window in C#


Hi I am trying to create an application in C#.net that captures the screenshot of the current active including the area that has to be scrolled using scroll bars.I found the following code to take screenshot. TO be very clear I want the code to take screenshot of the active window including the area that is not displayed and is only revealed by using scroll bars. Any help is greatly appreciated.Thank you


public class ScreenShot
    /// <summary>
    /// Captures the screenshot of the entire desktop
    /// </summary>
    /// <returns>Image object containing the screenshot of the desktop</returns>
    private Image CaptureDesktop()
      return CaptureWindow(User32.GetDesktop

Drag and drop the dockable window to the desktop



I am using MDI Container in which am using Dockable Container. In Dockable Container, I have used multiple windows which are docked.

Now, when user drag the dockable window then it will be undock and allow user to drop it to the desktop. Also this window is shown in the taskbar.

Can anybody tell me, what should I do for it?

Adjust application window size per screen resolution on different computers


I have built an  application which calls two dialog boxes defined in a .rc file.

When this application was run on a computer with a screen resolution of 600 x 800

the dialog boxes were not fully displayed.  How can I automatically adjust for different screen resolutions?

Reduce ASP.NET Page size and complexity using JQuery

This is my first post on asp.net blog. ASP.NET Ajax and JQuery are two different ajax framework. In this post I will show, how we can enhance gridview using ASP.NET Ajax and JQuery. I also compare the implementation of these frameworks. In next posts i will explain more about JQuery and ASP.NET Ajax and also tell you "How to combine the power of both framework". My Future post will related to ASP.NET and related frameworks.

Modal popup window in ASP.Net

A Masked div or modal popup window is a child window created from the parent window which prevents the user from interacting with parent window before he returns to the parent application.

Control your Pocket PC with your desktop

My Mobiler is a Free tool that allows you to use your desktop keyboard, mouse and monitor to navigate and control your Windows Mobile Pocket PC. With it you can view your Windows Mobile screen on your desktop PC. This makes it easy to "control your Windows mobile device with a desktop keyboard and mouse". Moreover, you can drag and drop files from your desktop to your windows mobile device, Cut and paste text from your desktop PC to your Windows mobile device and capture your windows mobile screen or even stream capture from your desktop PC.

Set Custom Paper size in C#.net 3.5


Dear All,

I have to set custom paper size 6X8 inches

plz tell sugest me code how to do it.

in C#.net 3.5

i m using Asp.net 3.5 Crystal report

i have to do it programiticlly



lossing focus from model pop up window controls


hi i using a model pop up window with some textbox but when i click on textbox of model pop up focus move to back to page textbox control plz help me 

Can't get an Icon to show for Desktop shortcut and Program Menu



I've created a SetupWizard, but can't get it to show the Icon for the shortcut on desktop and program menu. The installation goes fine without any errors, the only problem is the icon.

I've made a shortcut of my exe file in the Application Folder and dragged the shortcut to the Desktop folder, then on the shortcut properties, I assigned it an icon picture located in Application Folder.

Any suggestions will be very much appreciated.


Open PopUp Window From Error httpModule


I would like to open a popup window from the assembly to present the information to the user. Does anyone know if this is possible, I am presently doing the following:

        WriteLine("body {font-family:""Verdana"";font-weight:normal;font-size: .7em;color:black; background-color:white;}")
        WriteLine("b {font-family:""Verdana"";font-weight:bold;color:black;margin-top: -5px}")
        WriteLine("H1 { font-family:""Verdana"";font-weight:normal;font-size:18pt;color:red }")
        WriteLine("H2 { font-family:""Verdana"";font-weight:normal;font-size:14pt;color:maroon }")
        WriteLine("pre {font-family:""Lucida Console"";font-size: .9em}")

Create a user friendly pop up window


Hello friends I am new to asp.net programming. While working with windows form(windows application) i have created a window for editing purpose(just like popup window ) which contains three bounded dropdown list a button and a gridview. After making selections from the drop down when we press button the corresponding result should display in a grid.After that when you click on the grid row it will load the corresponding datas in my form. i want to create such control in asp.net . i have to use jquery or ajax.And this pop up window i have to use more than twenty times in my application.am using VS2008 ASP.NET and C# 3.5 . Plese suggest me what to do. Thanks in advance

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend