.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

Window size

Posted By:      Posted Date: October 16, 2010    Points: 0   Category :ASP.Net
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

View Complete Post

More Related Resource Links

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(

size of window on desktop

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

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.

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

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.

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 

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

problem in consuming WCF service through Window application


I have a silverlight application and WCF service all made in VS 2010 , i had hosted my site to web server which contain Window 2008 and IIS 7.0

now the problem is i have another application which is a window application developed in VS2008 , when i try to add the service reference it gives me error


The document at the url was not recognized as a known document type.

The error message from each known type may help you fix the problem:

- Report from 'DISCO Document' is 'There was an error downloading 'http://dev_qa.emspa.com/HRDev3/Service.svc?disco'.'.

  - The request failed with HTTP status 400: Bad Request.

- Report from 'WSDL Document' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

- Report from '' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

- Report from 'XML Schema' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

Metadata contains a reference that cannot be resolved: ''.

Content Type application/soap+xml; charset

Reduce Image Size


How to reduce the image weight using asp.net, without lose of image quality and image pixels. For example i have an image with the size of 4 MB (3024*2045), so how to reduce the image weight ie 4 MB to 1 MB without lose quality in the same pixels ie(3024 * 2045) using asp.net.

Detect Browser Screen Size??


Hi Everyone,  I need to detect the size of the user's screen for mobile devices (especially the BlackBerry). I've read a lot of pages that seem to refer me to the Request.Browser object, but I'm finding that this object doesn't have the correct values. For example, I have a BlackBerry and when I use the Request.Browser to get the screen size, it tells me it is 640x480. Well, I know it's not that big since an image of 300px wide just barely fits. Also, when I run on my desktop browser, it also says my screen is 640x480. I can assure you, it is not 640x480! ha!

  How does anyone reliably get the browser's screen size?? Do I have to revert to some kind of JavaScript? If so, where can I read more about it? Will it be any more reliable? Someone must have an idea about this. Thanks in advance!!

Obtain mobile device screen size



I am trying to get the screenHeight and width:


 // Get MobileCapabilities from current Request.Browser
        MobileCapabilities currentCapabilities = (MobileCapabilities)Request.Browser;
        // get a property of the  browser 
        Response.Write(currentCapabilities.ScreenPixelsHeight +  " <br>");
        Response.Write(currentCapabilities.ScreenPixelsWidth  + " <br>");


 but this is always show that the Height is 480 & the width is 640

I am trying on HTC with Opera Mobile 9.5

Any Advice?

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