.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

Application Architecture in Windows Forms 2.0-Single-MDI Applications

Posted By: Amit Mehra     Posted Date: January 10, 2010    Points: 2   Category :Windows Application
Consider an MDI application like Microsoft Excel; files opened from the file system (by double-clicking) are all opened as separate child windows within the parent Excel window.7 For the first instance of an MDI application to open a new child window to display the file that was passed to the second instance of the application, the second instance must be able to communicate with the initial instance.

View Complete Post

More Related Resource Links

Application Architecture in Windows Forms 2.0

Applications have special support in Windows Forms. For starters, you can manage and tailor your application's lifetime, and, when the work flow is disrupted by an unhandled exception, you can choose from several methods of response. Then, there are several application models that you can employ, including Single Document Interface (SDI) and Multiple Document Interface (MDI) applications, each of which can support either multiple-instance or single-instance mode, the former the VS05 default and the latter requiring special consideration. All applications, however, can discover and use a wide variety of information about the system and environment they execute in.

Windows Forms: Give Your .NET-based Application a Fast and Responsive UI with Multiple Threads


If your application performs any non-UI processing on the thread that controls the user interface, it may make the app seem slow and sluggish, frustrating users. But writing multithreaded apps for Windows has long been restricted to C++ developers. Now with the .NET Framework, you can take advantage of multiple threads in C# to control the flow of instructions in your programs and isolate the UI thread for a fast and snappy user interface. This article shows you how. Also, it discusses the pitfalls of multiple threads and presents a framework for safe concurrent thread execution.

Ian Griffiths

MSDN Magazine February 2003

Windows Forms: A Modern-Day Programming Model for Writing GUI Applications


To write GUI applications for Microsoft .NET you'll use Windows Forms. Windows Forms are a new style of application built around classes in the .NET Framework class library's System.WinForms namespace. They have a programming model all their own that is cleaner, more robust, and more consistent than models based on the Win32 API or MFC, and they run in the managed environment of the .NET Common Language Runtime (CLR). This article details what Windows Forms are all about, from the programming model to Microsoft Intermediate Language and the JIT compiler. Two applications using forms, event handlers, anchors and persistence are built step by step.

Jeff Prosise

MSDN Magazine February 2001

How to add Sharepoint dll reference to Windows Forms application project in Visual Studio 2010?

Hi,I am using Windows Forms application template in Visual Studio 2010 Beta. I created this for some R & D work. Now I am using Sharepoint object model in application. When I am trying to add Sharepoint dll reference from .NET tab, I can not see Windows Sharepoint Services there Which was available in Visual Studio 2005.Also If I am add this sharepoint dll from ISAPI folder (14 Hive), it is added succesfully, but it is not taking actually in project and showing me an error during running mode that theError 12 The type or namespace name 'SharePoint' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) Please suggest me how to add Sharepoint dll reference in Windows forms application in Visual Studio 2010?

Windows Forms application Stopped Working message in Windows Vista



A Windows Forms application developed with VB2008 Express that has been successfully run on two Windows XP systems and a Windows 7 system fails to run on two of two Windows Vista systems tried so far.


Attempting to run the app on a Windows Vista system results in a system dialog box titled, Microsoft Windows, with the message, A problem caused the program to stop working correctly.  Windows will close the program and notify you if a solution is available.  A single button at the lower right of the dialog contains the text, Close Program.
The initial form of the application never displayed and the dialog above appeared with little delay after attempting to start the program.

The program uses an SQL Server Compact Edition 3.5 database and the program is compiled to include the following .DLL files so the user does not need to install SQL ServerCE.

The Load event of the initial form causes a DataSet to be filled from the SQL CE DB.

I have the System Informa

I need a dynamic connection string for my windows forms application.


Hello folks


I am brand new to forms applications and visual studio 2008 I am building a forms application to connect to a 3rd party's sdf file. There is no password or username required to connect however the 3rd party app installs the sdf in the users folder for me I am on windows 7 but I have clients on xp.


I went to add a data connection and chose sql ce file and browsed out to my location and it connects and works. But I need this connection string to be for whoever is logged into there laptops or computers no matter the operating system version xp,vista,7.


Data Source=C:\User\username\AppData\Roaming\PS\GES\surve.sdf


Can someone tell me how to do that. Also please explain in words a new borne could understand cause like I said I am new to this.


Thank you


How to make the windows forms application install only 1 time and be used only 1 time only



I have a need to create an applicaiton that can be installed 1 time only be a user. The application can also be used only 1 time. (on a given PC)

The user may or may not be and administrator.

How can I do this (without registry alteration if possible)?

Thanks much.


SQL Server 2005 random login failures for windows forms application


One of our VS .NET 2008 windows forms applications runs from multiple client machines. The application randomly has login failures from random machines and from random places in the code. The login works almost every time but about once every fifteen minutes an error shows up in SQL Server error logs from a random user. We are running a clustered SQL Server 2005 system and the database is in 2005 (90) mode.

The following error appears in the SQL Server error logs:

Login failed for 'App_Login'. [CLIENT: XXX.XXX.X.XXX] Error: 18456, Severity: 14, State: 16.

The following error is what the client sees:

How to hide SQL Server password from user in an Windows Forms Application?


Using - VS 2005, SQL Server 2005 Express, Windows Forms Application


I am unable to find a way that hides the password to connect to database in case of a Windws Forms Application.

- app.config is accessible to the user, so connection strings an be read.

- app.config can't be encrypted as in case of ASP.NET applications

- hardcoding the password in the application in connectionstring still makes it possible to be discovered by a user

Vibhor Agarwal

Please tell me if a Windows Forms Application is appropriate for my needs:


Because A. I am a total newbie to this and I don't want to get halfway through my project only to realize that I should be writing an ASP.Net Web Application or a WPF Application and I need to completely redo my code.

So: what I want to create is a desktop app with several different buttons on the main form. Clicking on each of those different buttons will query some database tables (I guess I'll be using SQL Server Express Edition since it's free and easy and the database tables shouldn't be more than 1 GB.) The results of these SQL select queries will form the basis of several professional reports that the user will see. I guess the reports will be Crystal Reports, since that comes pre-installed with Visual Studio and there's a lot of documentation on it, so most problems I run into should be easy to solve.

This is a Windows Forms Application, right?

Unable to set cookies when accessing WCF from Console or Windows Forms Application


Hi all,

I am trying to consume wcf service from a console application. WCF service is hosted in IIS 7.0 and its secured using SSL. I have added the service reference in the console app. While making a call to the service i have to pass cookies with the call. Usually in silverlight or web application, i can find cookiecontainer object for every wcf service object. But i cant find it in console app environment. I have set AllowCookies=true in the app.config file.

any help would be appreciated


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.

MVC architecture in ASP.Net using C# and Microsoft Data Access Application block

The Model-View-Controller (MVC) pattern separates the modeling of the domain, the presentation, and the actions based on user input into three separate classes [Burbeck92]:

Model. The model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller).

View. The view manages the display of information.

Controller. The controller interprets the mouse and keyboard inputs from the user, informing the model and/or the view to change as appropriate.
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