.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

Posted By: Amit Mehra     Posted Date: January 10, 2010    Points: 2   Category :Windows Application
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.

View Complete Post

More Related Resource Links

Application Architecture in Windows Forms 2.0-Single-MDI Applications

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.

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

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


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.

High-Performance .NET Application Development & Architecture

It has always been a goal of project architects to plan an effective strategy from the ground up in regards to an new application. All relevant factors are taken into consideration with respect to the application, from its design and layout to a functional website infrastructure. Pre-.NET strategies and design guidelines still effective now were developed with Microsoft's DNA (Distributed interNet Application) platform. This model successfully served the purpose of architecting N(any number of)-Tier (levels) applications. In its basic sense, as in most robust, distributed applications, you'll architect 3 main layers or Tiers: presentation, business rules and data access.

Application architecture in asp .net

Application Architecture is the most important process of developing a good application. Some people tends to jump into coding without any architecture laid. Later we see those people changing the architecture and finally the application had to be developed from the scratch with the correct architecture.

In this article I will describe some details about how you can improve the architecture of you application. This article is targeted to the beginner's audience.

Application Architecture: An N-Tier Approach - Part 1


Free Trial: SQL Backup Pro
Sponsored by Red Gate
Exceptional DBAs make the most of their office hours. That's why they love Red Gate SQL Backup Pro. Its faster, smaller, secure SQL Server backups mean more time spare to accomplish more tasks and professional training. Make time to be an Exceptional DBA. Download it now! »

Free Trial: SQL Toolbelt
Sponsored by Red Gate
The SQL Toolbelt is a set of twelve powerful and intuitive tools that will help you burn through SQL Server chores with astonishing speed and accuracy. Download it now! »

Download: SQL Backup Evaluation Center
Sponsored by Red Gate
Download the T-SQL scripts in the SQL Backup Evaluation Center to compare Red Gate SQL Backup Pro's compressed backups with the size of backups created using native SQL Server. Download it now! »

Autodesk Inventor®
Go Beyond 3D To Digital Prototyping With Autodesk Inventor. Learn How.
Virtualization Solutions
Optimize, Simplify, & Save Today. Learn About Microsoft Solutions.
Microsoft SQL Server® 2008 - Free Trial
Download the Free 180-day Trial of SQL Server® 2008 Enterprise Edition!
Hot Careers in Internet Marketing
Get prepared for your new career with online degrees from Full Sail University!
Microsoft Te

Solidify Your C# Application Architecture with Design Patterns

design pattern can solve many problems by providing a framework for building an application. Design patterns, which make the design process cleaner and more efficient, are especially well-suited for use in C# development because it is an object-oriented language. Existing design patterns make good templates for your objects, allowing you to build software faster. This article describes several popular design patterns you can use in your own applications, including the singleton, the decorator, the composite, and the state classes, which can improve the extensibility of your applications and the reuse of your objects.

Windows Presentation Foundation and your architecture

Windows Presentation Foundation (WPF) is a new client user interface technology that ships as part of the .NET 3.0 Framework. Architects have long faced the challenge of selecting an appropriate presentation tier technology for their applications. In recent times, if you are developing for the Windows platform, it was at least a fairly short list. You either built a web application, a smart client, a mobile device, or some combination of those depending on your target audience. Which one you picked gave you a fairly short list of practical options in the .NET space - ASP.NET, Windows Forms, and Compact Framework respectively.

How to programmatically add controls to Windows forms at run time by using Visual C#

Create a Windows Forms Application
Start Visual Studio .NET or Visual Studio 2005 or a later version, and create a new Visual C# Windows Application project named WinControls. Form1 is added to the project by default.
Double-click Form1 to create and view the Form1_Load event procedure.
Add private instance variables to the Form1 class to work with common Windows controls. The Form1 class starts as follows:
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