.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

Outside border of a window in Windows 7

Posted By:      Posted Date: September 26, 2010    Points: 0   Category :WPF


I have a defaut window with WindowStyle="None" and in Windows 7 I get a pretty big border - this not happens in XP. How can I get the width of this border?



View Complete Post

More Related Resource Links

Windows UI: Our WinMgr Sample Makes Custom Window Sizing Simple


Programmers using Visual Basic have always had an advantage over C++ programmers when it comes to component and window sizing. There are many third-party Visual Basic-based solutions to this age-old problem, but unfortunately, there are few elegant alternatives for the C++ crowd, short of using a full-fledged windowing toolkit. This article explains how to circumvent the tedious task of hardcoded pixel arithmetic. It starts by introducing a window sizing rules system, and then moves on to show how CWinMgr, a data-driven class, can intelligently manage an MFC application's window sizing.

Paul DiLascia

MSDN Magazine July 2001

Windows Workflow : Activity Binding Properties Window Ellipses button not visible for one property

I have created a custom activity, when I am using this activity in workflow designer I am not getting the ellipsis button to select a property.  I am getting the ellipses button for first property LongValue while not getting the option for "NavigationUrl" property. This is the code for my custom activity. public partial class SetLongAsResult: Activity {         public SetLongAsResult() { InitializeComponent(); }         public static DependencyProperty LongValueProperty = DependencyProperty.Register("LongValue", typeof(long), typeof(SetLongAsResult));           public static DependencyProperty NavigationUrlProperty = DependencyProperty.Register("NavigationUrl", typeof(string), typeof(SetLongAsResult));           [Description("long value to be returned")]         [Category("Set Result Data")]         [BrowsableAttribute(true)]         [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]         public long LongValue         {             get             {         

how to open 2 different windows from different buttons with window.open or...

Hello, I'm trying to open 2 different windows from different buttons with window.open Do not manage... Annyone  who knows how? I need code xample...   Is it posible to set ID for this window.open ?   Thanks

Launch window forms app from windows service

I have a windows forms app that is used to manage settings for a windows service. When the service starts I want to launch the forms app. I'm using Process.Start("myWindowsApp") and I can see the app running in the task manager processes but the windows aren't displayed. My guess is that it's because the service is running under the localsystem account but what do I need to do to make the windows forms app work properly? SteveR

Windows 7 window.open() and - target issue



In Windows 7 when I use window.open(url, "_MyWindow") a new browser window opens every time I click.

Expected behaviour is - URL is replaced in the browser window with the same target attribute (_MyWindow) if it's already open.

Any suggestion/workaround is greatly appreciated.

All works fine in any other OS/IE config, even on XP/IE8.




same issue appears using <a href=http://www.microsoft.com target="_MyWindow">Open link</a>

Anoying Windows login popup window


HI all,

I have an application that uses Active Directory to validate users as well as populate a couple doopdown list, the application is connected to sql database on a seperate server.


When I first published the application I got an error from Active Directory I eventually found out that I had to embed a username and password within the code for active directory to work.  When i sorted out this problem I got one with my SQL and again used a username and password to allow connection to the database.


My new problem is when a user other than me logs in the windows popup windwo appairs requiring user name and password to login. The program is writen for windows authontetation but form where I check the person loged onto the computer and check username against active directory. After the person clicks the "OK" button a couple time they then have to click the close to exit the screen.

the user can look at a page but if they try any kind of processing they are required to log in again and this time they are not verified. 


I would like to get rid of the popup box and let the validation gor though like it dose in my location.


My IIS permision is set to windows authontecATION.


Can not display the value in combo box from main windows in another secondary window.


Hi All.

I have a problem : I have main windows with bind to sql combo box. I want to display at the start of second windows selected value from main win combo box in combo box which located in second windows. I have code that does this but I'm having trouble when I bind combo box from second windows to sql. More than I have this code that displays the selected value from main windows but everytime first row in sql table because a code is selectedIndwx = 0 ;

How can I change the code to display the selected value from the main window and bind combo box at the same time.

there is a code.

Main window.

private void button3_Click(object sender, RoutedEventAr

SQL Server Management Stduio 10.0 (SSMS) Window Menu Listing Open Windows


In SSMS for 2008 the windows menu listing of open files is inconsistent.

When only windows that have previously been saved to a file are opened the Window menus lists as follows:
File Name - Connection (Username(spid)) - This is perfect since the file name is at the front and it's easy to identify a window

However, when an unsaved window is open (typically named SQLQueryX.sql) along with these saved windows the Window menu lists as follows:
File Name - Connection (Username(spid)) - Only for the first (active) window
C:\...\Connection (Username(spid)) - For remaining windows - this is annoying since we can't easily identify the windows by file name

How can I call the windows authentication window from C# code?





I have a windows application which tries to get information from the internet. But the connection to the internet can only be established through a proxy server.

Normally, the users who use the application log in with their credentials and that should automatically connect to the proxy server. But, for example, when you try opening Internet Explorer which is set up to use a proxy, it pops up the log-in window to authenticate to the proxy server, in case it is not saved.

My problem is, if it is saved, I can take the default credentials and proxy server using

System.Net.WebProxy.GetDefaultProxy(); (I know this is deprecated, but it works for me. I would appreciate a more elegant solution).



But, in case it is not saved, I want to pop-up the windows authentication window like the IE does. Is it possible to that? If yes, I would appreciate a little help, otherwise I have to write my own authentication window.

Please respond asap.

Thanks in advance.

Dos window flashes when installing SQL Server 2008 R2 on a Windows 7 Ultimate 64 machine - then does

I downloaded the iso for SQL Server 2008 R2 but it will not install on my Windows 7 Ultimate or Windows Home Premium  (I upgraded to Windows 7 Ultimate when I could not get it to install on the Home Premium - but still the same issue)

Does any one have a clue or seen this before?

How to Restrict Windows Credentials Prompt Window for the Application


Hi All,

We have created an Intranet Web Application with Windows Authentication.

That asking a prompt to get Username and Password each time when we access the application.

How can we restrict that prompt other than IE --> Security --> Custom Level --> User Authentication. (Because, with this option we need to set these settings in each and every user's system)

Thanks in Advance,

Sateesh N.


Crystal Report load failed on Windows 7, VB.NET window application

I've a window application that load crystal report perfectly fine on Windows Vista. But when I tried to run the application on Windows 7, it gives me inconsistent behavior: sometimes the report will load, sometime I will just see the blue wheel, sometime it gives report load failed exception.

My application was developed with VS 2005 with Framework 2.0 and CR 10.
My Windows vista is install with framework 2.0, 3.0 and 3.5. 
Windows 7 is also came with 2.0, 3.0 and 3.5 by default.

I do notice one difference between Windows 7 and Vista. 
When a call is made to the report, a temp rpt is created in C:\Users\<user>\AppData\Local\Temp folder.
In Vista, no matter how many times the report is called in a session, only 1 rpt file will be created.
In Win 7, every call to the report will created 1 rpt file.
This is the only difference I see so far. Could this be the cause of report load failure? 
If so, what's the workaround?

An extract of my code as follow:


Convert System.Window.Forms.Keys into WPF (system.windows.input.key)



I am trying to add some short cuts to my WPF app. I read an xml file which especifies the shortcut key with it is system.windows..forms.keys value (e.g: 114, that will be F4)

The idea of having to create a switch to return the right key based on it is value it is, to say the least, horrendous, so before I start doing that :( ... does anyone knows how I can convert that value into a system.windows.input.key? Any help will be appreciated.



Cannot open windows .net form in powerpoint slide show window


We have successfully created .NET addin in PowerPoint. On the click of this addin, we have opened a .net Form where there are three buttons(say Login and etc). On the click of Login button, we opened Login form. This works perfectly in PowerPoint.  But when we have slide show window, on the click on Login button, Login form gets opened on main PowerPoint window, but not on SlideShow window. This works properly on winXP m/c. We are facing this issue on win7 m/c. Please help me.

Thanks in advance.

Windows Service Applications Tutorials

You can easily create services by creating an application that is installed as a service. For example, suppose you want to monitor performance counter data and react to threshold values. You could write a Windows Service application that listens to the performance counter data, deploy the application, and begin collecting and analyzing data.

Serving Silverlight Apps from Windows Mobile

Even if mobile dev is not my every day work, thanks to the .Net Compact Framework, it's still .Net programming.

Here is the scenario:

You come back home, you have a windows mobile phone wifi capable and you want to quickly get access to your phone pictures from your home network.
You just activate the Wifi, run my app and then browse to the provided link from any computer on the network.

Getting Started with Windows SharePoint Services

Of all of the capabilities of SharePoint, I thought I would start with the most basic installation - as a corporate intranet. It is likely that we will need to discuss some of the elements of SharePoint as we go along, so this also gives us the opportunity to review these elements for future reference.

Before going into too much detail, I would like to point out that you can try the core SharePoint framework (known as Windows SharePoint Services or WSS) for free. On Microsoft's Web site you can download a trial version of Virtual PC 2004 (VPC). Using VPC, you can install the Windows 2003 Evaluation Kit and the WSS add-on. This combination will give you 45 days to evaluate the setup.
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