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

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

Contract the Screen.PrimaryScreen.WorkingArea.Height

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :Windows Application
Hello. I have been developing a Windows Form Application that works as an alert system for my computer, and the form is docked at the bottom of my screen. What I want to do is contract the Screen.PrimaryScreen.WorkingArea.Height by the height of my Windows Form. That way, instead of me having to move my icons from underneath of my application, they will automatically be moved by the operating system due the the contracted Screen.Primary.Screen.WorkingArea.Height.

Here is what I want:


Here is an example of exactly how big I want the working area.  The red rectangle around visual studio represents the working area I want.


I played with some of the properties in the Screen.PrimaryScreen.WorkingArea class and was not able to reach success with my approaches as each time I tried something it gave me compiler errors saying that the properties were either not accessable or are cannot be used like variables.

If anyone knows how to contract the height of the Screen.PrimaryScreen.WorkingArea, please, let me know.

Thank you in advance,
Dave S. Anderson
Owner of DCOM Productions

View Complete Post

More Related Resource Links

determine the screen height within javascript and set a property on an iframe


I have a webform  that has a header and iframe,  what I need to do is on load detemine the users screen height and then  set the height on the iframe. Can someone explain  or show me an example of how to do this.

Thanks in advance.

how to fix the height of the table to be same as the screen size?

hi,iam trying to have my web page design inside a table that fills the screen in width and height.i tried like this<table  border="0" cellspacing="0" cellpadding="0"                         style="width:100%; height:100%; margin-right: 0px; margin-left:0;margin-top:0; margin-bottom: 0px;">            <tr> etc...the table width is filling 100 % but the height is not expanding to the bottom of the screen.my aim is to have a column in the table that looks like a left pane and it will contains dynamically added controls so if there is controls or no the column will have the height of the screenthanks for the help

Screen Height and Width


Hi all

I am displaying image on page load event.  I have difrent sizes image i want to get screen.width and screen.height values by javascript on page load event and then using to get particular size's image on page load event in asp.net with c#.

If browser not support javascript then default size will display.

Plz help to resolve this


Snap It! - How to take screen shot using .Net

We all would have used snap shots (screen shots) to illustrate bugs or behavior or something that others could understand by seeing them. For taking snap shots we just hit the "Print Screen" key and copy it to Ms Paint and save it. Ever wondered how to programmatically take a snap shot? Then this article is for you.

PDA Keyboard v1.0 Light Edition - Full Screen Keyboard

The default keypad on Windows Mobile is not at all finger friendly, there is no way you can use it with your fingers. I have trouble using the stylus with it too. But there are many freeware option available to make the SIP ( Software Input Panel - check the Glossary ) finger friendly. Some of these are HTC Diamond keyboard, Blimkeys, PocketCM Keyboard and then now we have PDA Keyboard v1.0 Light Edition from pdamedia.biz. When you hit the blue button it goes into fullscreen mode , then you can use both your hands for typing.

Setting Screen Resolution



  I am developing a website in asp.net.How can i make my web pages view same in different screen resolutions.I am using 1024*768 resolution

An endpoint configuration section for contract 'xxx' could not be loaded because more than one end



I'm trying to test calling a webservice, I've found several free ones on http://webserviceshare.com, but none of them work for me.  Some of them give example calling code in C# which I've translated to VB.NET, they're typically just two to four lines, I don't think I've translated them incorrectly.

On that I've tried is US Zip Validator.  I added a Service Reference to http://www.webservicemart.com/uszip.asmx?WSDL, called ZipService.

I then call it like so:

            Dim myZipService As ZipService.USZipSoapClient = New ZipService.USZipSoapClient()
            Dim myCity As String = myZipService.ValidateZip("27707")

I get the following error on the first line of code:

"An endpoint configuration section for contract 'ZipService.USZipSoap' could not be loaded because more than one endpoint configuration for that contract was found. Please indicate the preferred endpoint configuration section by name."

A page with information on this web service (including C# source code) is at:


Could not find default endpoint element that references contract 'CurrencyProxy.CurrencyServiceSoap



I created 2 projects in my solution:

  1. Classic asp.net web service (asmx)
  2. Class library project which references service
  3. web site project which references class library project
  4. Windows app project which references service.

Both projects were created in 3.5 framework and in Visual Studio 2008 Beta 2.

I added web service reference to Class library project. When it asked for namespace I typed "CurrencyProxy". Projects build ok, but when I run web app, Class library throws an error: Could not find default endpoint element that references contract 'CurrencyProxy.CurrencyServiceSoap' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

I believe it has something to do with app.config in Class library project. Here is part from app.config:

<binding name="CurrencyServiceSoap" closeTimeout=

Upload a Print Screen?


Is it possible to Print Screen and then immediately Paste into a .NET app and upload to a server?  I'd like to skip the step of the user having to first paste the screen into an image program and save as a jpg, gif, etc.  Thanks!

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?

Contract-First Web Services: Schema-based Development with Windows Communication Foundation


Schema- first contract-first modeling of Web Services gives you the ability to model your contracts with an XML-centric mindset. This process keeps you focused on universally acceptable types and the hierarchical data structures that can be represented in XML.

Christian Weyer, Buddhike de Silva

MSDN Magazine October 2009

Usability in Practice: The Tao of Screen Design


This article describes methods for designing screens in a user interface and the technology frameworks that support screen design.

Ambrose Little, Charles B. Kreitzberg

MSDN Magazine September 2009

Class To Contract: Enrich Your XML Serialization With Schema Providers In The .NET Framework


The Microsoft .NET Framework 1.x provided minimal options for mapping classes to schemas and serializing objects to XML documents, making this sort of mapping quite a challenge. The .NET Framework 2.0 changes all this with Schema providers and the IXmlSerializable interface.

Keith Pijanowski

MSDN Magazine June 2006

Service Station: Techniques for Contract-First Development


In my May 2005 column, I discussed contract-first development and appropriate times to use it (see Service Station: Contract-First Service Development). In this second part, I'm going to focus on some techniques for contract-first development within the ASMX framework.

Aaron Skonnard

MSDN Magazine June 2005

Service Station: Contract-First Service Development


In one of my previous columns on Service Orientation (SO), I introduced the concept of "contract-first" service development (see Service Station: SOA: More Integration, Less Renovation). Over the next two installments of this column, I'm going to cover the topic in depth.

Aaron Skonnard

MSDN Magazine May 2005

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