You are on page 1of 59

PROJECT REPORT ON REMINDER APPLICATION SYSTEM

IN PARTIAL FULFILLMENT OF THE REQUIREMENT FOR THE AWARD OF THE DEGREE IN BACHELOR OF ENGINEERING (COMPUTER SCIENCE & ENGINEERING)

BATCH: 2008-2012 (OSS BASED PROJECT)

Submitted By:
HARISH KAUSHIK (08/IT/016) CHANDERPAL (08/IT/007)

Submitted To: Ms. Bhawna (Faculty and Project Guide) Mr. Pawan Bhadana (HOD-CSE/IT)

B.S. ANANGPURIA INSTITUTEOF TECHNOLOGY & MANAGEMENT ALAMPUR, FARIDABAD (HARYANA)

(MAHRISHI DAYANAND UNIVERSITY, ROHTAK)

ACKNOWLEDGEMENT
We take this opportunity to thank all those who have helped us in completing the project successfully. We sincerely thank Mr. S.S.Tyagi Principal of B.S.Anangpuria Institute of Technology and Management, Alampur for providing us a platform to build this project. We would also like to show our gratitude to Mr. Pawan Bhadana (H.O.D. of the institutes Computer and IT department) for providing us with well trained faculty and giving us all the required resources and a healthy environment for our carrying out our project work. We are highly obliged to Miss Bhawna (Faculty and Project Guide) for providing us continuous and invaluable guidance throughout the project. Her/his kind and elderly advice always inspired us in putting our best efforts to develop an efficient project.

2. HARISH KAUSHIK (08/IT/016) 3. CHANDERPAL (08/IT/007)

B.S. Anangpuria Institute of Technology & Management

CERTIFICATE
This is to certify that the project work entitled, Reminder Application System , submitted by the students of B.S. AND of the

ANANGPURIA MANAGEMENT

INSTITUTE (2008-2012) in

OF

TECHNOLOGY fulfillment

partial

requirement for the degree B.TECH. of M.D. University Rohtak , is a bonafid record of the work carried out by them under my supervision and is their original work.

Miss. Bhawna (Faculty and Project Guide)

Mr. Pawan Bhadana (H.O.D. CSE / IT)

INDEX
1. Profile of Saffron-e-services.. 2. Hardware and Software Configuration 3. Introduction to Microsoft Visual Studio 2010. 4. Introduction to .NET.. 5. Introduction to C#.............................................................. 6. Aim of Project. 7. Scope of the Project 8. Modular Diagram... 9. Coding.. 10. Snapshots.... 11. Bibliography

SAFFRON-E-SERVICES A PROFILE

Saffron-e-services helps its Global 2000 customers remain at the forefront of their industries with innovative uses of technology to operate their businesses more efficiently. We deliver flexible, custom Information Technology solutions that improve quality and reduce costs. More than any other company, we explore, develop and adapt new, better ways to do this. Our focus and priorities are considerably different from our competition. We are focused on the benefits new delivery models can deliver, not on forcing work to offshore locations. We seek out ways to improve YOUR efficiency. There is no one size fits all solution at Saffron-e-services. Your business is unique and so are the opportunities waiting to be discovered. Weve been working at this business for 6 years, creating custom solutions, improving our own efficiencies, which has enabled us to grow from a small, local company to a global one. Applying our innovations to our own operations has also given us unique insight into how to address our customers business issues. The depth of our experience enables us to guarantee many projects success at a fixed price. It is this combination of hands-on experience and relentless focus on business results that has given rise to our partner for life philosophy. We have structured our organization to give clients what they need, when they need it, and built in ways to uncover new efficiency opportunities for them before they realize it themselves. All in all, Saffron-e-services is a company devoted to exceeding the expectations of our customers, day in and day out. We are dedicated to

our mission to create new opportunities for our customers by harnessing the passion, talent, and innovation of new strategies.

Saffron-e-services has proven track record of designing and delivering high quality software solutions in the areas of enterprise applications, BPO workflow solutions, eBusiness applications, and software products. Saffron-e-services software services ensure on-time delivery of solution with high quality and security to customers. Saffron-e-services has designed and developed custom eBusiness solutions for customers and has successfully integrated such solutions to back-end ERP solutions. Saffron-e-services has core technology competencies in both Java and Microsoft technologies.

Technology Expertise Java, JSP, J2EE, RMI, EJB, Struts, JMS, JIA, Swing, VC++, VB, ASP, .Net, D2K, PL/SQL, XML, XSL, Coldfusion, PHP, Apache, Perl, Microsoft SQL, Oracle, Sybase, Postgresql, mySQL, Apache, IIS, Tomcat, JBoss Application Servers, BEA web logic Application Server, Oracle Application Server, Linux.

Web Services Testing Saffron-e-services testing services also encompasses Web Services testing. This is a challenging area for testers because it has many issues related to security, interoperability, and performance, requiring the creation of custom test harnesses. We've formalized a testing approach that provides a platform for automation of WSDL reading and sampling, creation of XML requests and validation of the responses, and

development and use of custom test harnesses to test complete functionality when consuming a Web Service. Saffron-e-services has extensive expertise in database consulting and providing services such as database design, implementation, management and tuning for Oracle, Microsoft SQL, Sybase and other commercial / open-source / Linux databases. Saffron-e-services has successfully provided pen-source / Linux platforms and solutions to organization resulting in a reduced total cost of ownership.

Database Consulting Services A comprehensive and flexible service offering for database design, implementation and management for Oracle, Sybase, DB2, PostgreSQL and MSSQL databases. The delivery models offered are: onsite resident support, non-resident support, remote database support or e-mail / telephonic support. The areas of service includes pre-implementation database sizing, migration, performance tuning, disaster recovery planning / implementation, backup strategy planning/ implementation, cluster implementation, security review / implementation and high availability implementation

Open Source Consulting Saffron-e-services offers a range of professional services based on open source Linux platforms for remote server administration, firewall configuration, proxy configuration, desktop deployment, postgresql database administration, LDAP implementation, DHCP implementation, samba implementation, dial-in solutions, network backup solutions and load balancing solutions.

CORE FOCUS AREAS OF SOLUTION AND SERVICES: BPO Services Technical Support Operations E-Business Application Development Enterprise Application Development Database/Open-source Linux Consulting Software Products Development and Support

HARDWARE & SOFTWARE CONFIGURATION

SOFTWARE:Windows Operating System. Visual Studio 2010

HARDWARE:P.C. 256 MB RAM. INTEL CORE 2 DUO PROCESSOR. CD-R/W Hard disk 80GB

FRONT END: BACK END:

C# DATABASE CONNETIVITY

MICROSOFT VISUAL STUDIO 2010

Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop console and graphical user interface applications along with Windows Forms applications, web sites, web applications, and web services in both native code together with managed code for all platforms supported by Microsoft Windows, Windows Mobile, Windows CE, .NET Framework, .NET Compact Framework and Microsoft Silverlight. Visual Studio includes a code editor supporting IntelliSense as well as code refactoring. The integrated debugger works both as a sourcelevel debugger and a machine-level debugger. Other built-in tools include a forms designer for building GUIapplications, web designer, class designer, and database schema designer. It accepts plugins that enhance the functionality at almost every levelincluding adding support for source-control systems (like Subversion and Visual SourceSafe) and adding new toolsets like editors and visual designers for domain-specific languages or toolsets for other aspects of the software development lifecycle (like the Team Foundation Server client: Team Explorer). Visual Studio supports different programming languages by means of language services, which allow the code editor and debugger to support (to varying degrees) nearly any programming language, provided a language-specific service exists. Built-in languages include C/C++ (via Visual C++), VB.NET (via Visual Basic .NET), C#(via Visual C#), and F# (as of Visual Studio 2010). Support for other languages such as M, Python, and Ruby among others is available via language services installed separately. It also supports XML/XSLT, HTML/XHTML, JavaScript and CSS. Individual language-specific versions of Visual Studio also exist which provide

more limited language services to the user: Microsoft Visual Basic, Visual J#, Visual C#, and Visual C++. Microsoft provides "Express" editions of its Visual Studio 2010 components Visual Basic, Visual C#, Visual C++, and Visual Web Developer at no cost. Visual Studio 2010, 2008 and 2005 Professional Editions, along with language-specific versions (Visual Basic, C++, C#, J#) of Visual Studio Express 2010 are available for free to students as downloads via Microsoft's DreamSpark program.

A BRIEF HISTORY OF .NET FRAMEWORK


The .NET Framework (pronounced dot net) is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability (each language can use code written in other languages). The .NET library is available to all the programming languages that .NET supports. Programs written for the .NET Framework execute in a software environment (as contrasted to hardware environment), known as the Common Language Runtime (CLR), an application virtual machine that provides important services such as security, memory management, and exception handling. The class library and the CLR together constitute the .NET Framework. The .NET Framework's Base Class Library provides user interface, data access,database connectivity, cryptography, web application development, numeric algorithms, and network communications. Programmers produce software by combining their own source code with the .NET Framework and other libraries. The .NET Framework is intended to be used by most new applications created for the Windows platform. Microsoft also produces a popular integrated development environment largely for .NET software called Visual Studio Microsoft started development on the .NET Framework in the late 1990s originally under the name of Next Generation Windows Services (NGWS). By late 2000 the first beta versions of .NET 1.0 were released. Version 3.0 of the .NET Framework is included with Windows Server 2008 and Windows Vista. Version 3.5 is included with Windows 7, and can also be installed on Windows XP and the Windows Server 2003 family of operating systems.On April 12, 2010, .NET Framework 4 was released alongside Visual Studio 2010. The .NET Framework family also includes two versions for mobile or embedded device use. A reduced version of the

framework, the .NET Compact Framework, is available on Windows CE platforms, including Windows Mobile devices such as smartphones. Additionally, the.NET Micro Framework is targeted at severely resource-constrained devices.

WHY USE .NET?


In todays programming world, there are many high level languages to choose from, such as C, C++, Perl, Python, BASIC and Java. These are all excellent languages that are well suited to most programming tasks, but the following reasons make .NET on top of the list: Interoperability Because computer systems commonly require interaction between new and older applications, the .NET Framework provides means to access functionality that is implemented in programs that execute outside the .NET environment. Access to COM components is provided in the System.Runtime.InteropServices and System.EnterpriseServices namespaces of the framework; access to other functionality is provided using the P/Invoke feature. Common Language Runtime Engine The Common Language Runtime (CLR) is the execution engine of the .NET Framework. All .NET programs execute under the supervision of the CLR, guaranteeing certain properties and behaviors in the areas of memory management, security, and exception handling. Language Independence The .NET Framework introduces a Common Type System, or CTS. The CTS specification defines all possible datatypes and programming constructs supported by the CLR and how they may or may not interact with each other conforming to the Common Language Infrastructure (CLI) specification. Because of this feature, the .NET Framework supports the exchange of types and object instances between libraries and applications written using any conforming .NET language.

Base Class Library The Base Class Library (BCL), part of the Framework Class Library (FCL), is a library of functionality available to all languages using the .NET Framework. The BCL provides classes which encapsulate a number of common functions, including file reading and writing, graphic rendering, database interaction, XML document manipulation and so on. Simplified Deployment The .NET Framework includes design features and tools that help manage the installation of computer software to ensure that it does not interfere with previously installed software, and that it conforms to security requirements. Security The design is meant to address some of the vulnerabilities, such as buffer overflows, that have been exploited by malicious software. Additionally, .NET provides a common security model for all applications. Portability The design of the .NET Framework allows it theoretically to be platform agnostic, and thus cross-platform compatible. That is, a program written to use the framework should run without change on any type of system for which the framework is implemented. While Microsoft has never implemented the full framework on any system except Microsoft Windows, the framework is engineered to be platform agnostic, and cross-platform implementations are available for other operating systems Microsoft submitted the specifications for the Common Language Infrastructure (which includes the core class libraries, Common Type System, and the Common Intermediat Language), the C# language, and the C++/CLI language to both ECMA and the ISO, making them available as open standards. This makes it possible for third parties to create compatible implementations of the framework and its languages on other platforms.

WHY USE C#?

Microsoft Visual C# is Microsoft's implementation of the C# specification, included in the Microsoft Visual Studio suite of products. It is based on the ECMA/ISO specification of the C# language, which Microsoft also created. While multiple implementations of the specification exist, Visual C# is by far the one most commonly used.In most contexts, an unqualified reference to "C#" is taken to mean "Visual C#." The term Visual denotes a brand-name relationship with other Microsoft programming languages such as Visual Basic, Visual FoxPro, Visual J# and Visual C++. All of these products are packaged with a graphical IDE and support rapid application development of Windowsbased applications. Visual C# is currently used in development of Windows and Xbox Live games via Microsoft XNA, which allows game developers to create and share their games with other gamers. Visual C# is also heavily used by ASP.NET web sites and standalone applications based on the .NET Framework.

AIM OF PROJECT
A REMINDER APPLICATION SYSTEM database used for storing entries of events, quotes, etc. Each entry usually consists of a few standard fields. This project is made for every person to save the information about their events or any other important things he could forget. Using this project, we can add reminder in the computer. We can also modify the information as and when needed. We can view the reminder of a single event or all the events. The reminders can be searched on the basis of the date set for the reminder. The reminder can be deleted by the user as per the need. All the reminder from the address book can be deleted if the user wants to do so. It helps to keep a close track on any usual information which we could forget in simpler and faster manner.

SCOPE OF THE PROJECT

This project on Reminder Application System is a computerized system of maintaining the reminders of information about all the events or any other useful information. The system has the following advantages: 1. The proposed system is much faster than the manual system. 2. As the system is menu-driven, it is easier to keep reminder. The user just has to select an option from the various available and perform the task. 3. It is reliable because it is completely computerized and less manual work is needed. 4. The system keeps the reminders in a file which can be backed-up very easily.

INTRODUCTION
The Reminder Application System provides easy access to critical information, thereby enabling human beings to make better decisions on time. The Reminder Application System is developed in the C# language on Windows Operating System .The Reminder Application System provides the benefits of streamlining operations, enhanced administration and control, improved response, cost control and improved profitability. The Reminder Application System can be easily customized to the requirements of any human being.

BENEFITS
1. Reminder Application System helps in maintaining a totally secured database of Patients and business information. This information can be available at your fingertips. 2. Reminder Application System helps by information with better data access, faster data retrieval, higher quality data and more versatility in data display. 3. Reminder Application System helps in improving efficiency, both on the cost and the memory. This is achieved by avoiding duplications, repetitions, delays and confusions. 4. Reminder Application System helps to increase accuracy & completeness. 5. Reminder Application System helps as a good managerial tool to offer improved performance and enhanced functions. 6. Reminder Application System helps in gathering information to meet any challenges.

DISADVANTAGES
1. High risk, particularly if a software is not fully tested by the user and if implementation planning is not thorough 2. Limits the contingency options if things go wrong and can cause a lose in the information if unacceptable delays occur

MODULAR DIAGRAM

REMINDER APPLICATION Figure SYSTEM

EVENT

INFORMATION

DATE

DATE TEXT

TEXT

TIME INTERVAL

TIME

INTERVAL

PROJECT CODING
TaskbarNotifierDemo.csproj
Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2 003"> <PropertyGroup> <ProjectType>Local</ProjectType> <ProductVersion>8.0.50727</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{3F1E39A2-69ED-4E46-BA913840EF78F5F4}</ProjectGuid> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ApplicationIcon>App.ico</ApplicationIcon> <AssemblyKeyContainerName> </AssemblyKeyContainerName> <AssemblyName>TaskbarNotifierDemo</AssemblyName> <AssemblyOriginatorKeyFile> </AssemblyOriginatorKeyFile> <DefaultClientScript>JScript</DefaultClientScript> <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> <DefaultTargetSchema>IE50</DefaultTargetSchema> <DelaySign>false</DelaySign> <OutputType>WinExe</OutputType> <RootNamespace>TaskbarNotifierDemo</RootNamespace> <StartupObject> </StartupObject> <FileUpgradeFlags> </FileUpgradeFlags> <UpgradeBackupLocation> </UpgradeBackupLocation> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">

<OutputPath>bin\Debug\</OutputPath> <AllowUnsafeBlocks>false</AllowUnsafeBlocks> <BaseAddress>285212672</BaseAddress> <CheckForOverflowUnderflow>false</CheckForOverflowUnder flow> <ConfigurationOverrideFile> </ConfigurationOverrideFile> <DefineConstants>DEBUG;TRACE</DefineConstants> <DocumentationFile> </DocumentationFile> <DebugSymbols>true</DebugSymbols> <FileAlignment>4096</FileAlignment> <Optimize>false</Optimize> <RegisterForComInterop>false</RegisterForComInterop> <RemoveIntegerChecks>false</RemoveIntegerChecks> <TreatWarningsAsErrors>false</TreatWarningsAsErrors> <WarningLevel>4</WarningLevel> <DebugType>full</DebugType> <ErrorReport>prompt</ErrorReport> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <OutputPath>bin\Release\</OutputPath> <AllowUnsafeBlocks>false</AllowUnsafeBlocks> <BaseAddress>285212672</BaseAddress> <CheckForOverflowUnderflow>false</CheckForOverflowUnder flow> <ConfigurationOverrideFile> </ConfigurationOverrideFile> <DefineConstants>TRACE</DefineConstants> <DocumentationFile> </DocumentationFile> <DebugSymbols>false</DebugSymbols> <FileAlignment>4096</FileAlignment> <Optimize>true</Optimize>

<RegisterForComInterop>false</RegisterForComInterop> <RemoveIntegerChecks>false</RemoveIntegerChecks> <TreatWarningsAsErrors>false</TreatWarningsAsErrors> <WarningLevel>4</WarningLevel> <DebugType>none</DebugType> <ErrorReport>prompt</ErrorReport> </PropertyGroup> <ItemGroup> <Reference Include="System"> <Name>System</Name> </Reference> <Reference Include="System.Data"> <Name>System.Data</Name> </Reference> <Reference Include="System.Drawing"> <Name>System.Drawing</Name> </Reference> <Reference Include="System.Windows.Forms"> <Name>System.Windows.Forms</Name> </Reference> <Reference Include="System.Xml"> <Name>System.XML</Name> </Reference> </ItemGroup> <ItemGroup> <Content Include="App.ico" /> <EmbeddedResource Include="DisconnectCall 2.gif" /> <EmbeddedResource Include="AudioCall21.bmp" /> <EmbeddedResource Include="Close1.bmp" /> <EmbeddedResource Include="incomingcall.bmp" /> <EmbeddedResource Include="skin.bmp" /> <Compile Include="AssemblyInfo.cs"> <SubType>Code</SubType> </Compile> <Compile Include="Form1.cs"> <SubType>Form</SubType> </Compile> <Compile Include="TaskbarNotifier.cs">

<SubType>Form</SubType> </Compile> <EmbeddedResource Include="close2.bmp" /> <EmbeddedResource Include="Form1.resx"> <DependentUpon>Form1.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="skin2.bmp" /> <EmbeddedResource Include="skin3.bmp" /> <EmbeddedResource Include="TaskbarNotifier.resx"> <DependentUpon>TaskbarNotifier.cs</DependentUpon> <SubType>Designer</SubType> </EmbeddedResource> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <PreBuildEvent> </PreBuildEvent> <PostBuildEvent> </PostBuildEvent> </PropertyGroup> </Project>

TaskbarNotifier.cs
using using using using using using System; System.Drawing; System.Drawing.Imaging; System.Drawing.Drawing2D; System.Windows.Forms; System.Runtime.InteropServices;

namespace CustomUIControls { /// <summary> /// TaskbarNotifier allows to display MSN style/Skinned instant messaging popups /// </summary> public class TaskbarNotifier : System.Windows.Forms.Form

{ #region TaskbarNotifier Protected Members protected Bitmap BackgroundBitmap = null; protected Bitmap CloseBitmap = null; protected Point CloseBitmapLocation; protected Size CloseBitmapSize; protected Bitmap AnswerBitmap = null; protected Point AnswerBitmapLocation; protected Size AnswerBitmapSize; protected Bitmap RejectBitmap = null; protected Point RejectBitmapLocation; protected Size RejectBitmapSize; protected Rectangle RealTitleRectangle; protected Rectangle RealContentRectangle; protected Rectangle WorkAreaRectangle; protected Timer timer = new Timer(); protected TaskbarStates taskbarState = TaskbarStates.hidden; protected string titleText; protected string contentText; protected Color normalTitleColor = Color.FromArgb(255, 0, 0); protected Color hoverTitleColor = Color.FromArgb(255, 0, 0); protected Color normalContentColor = Color.FromArgb(0, 0, 0); protected Color hoverContentColor = Color.FromArgb(0, 0, 0x66); protected Font normalTitleFont = new Font("Arial", 12, FontStyle.Regular, GraphicsUnit.Pixel); protected Font hoverTitleFont = new Font("Arial", 12, FontStyle.Bold, GraphicsUnit.Pixel); protected Font normalContentFont = new Font("Arial", 11, FontStyle.Regular, GraphicsUnit.Pixel); protected Font hoverContentFont = new Font("Arial", 11, FontStyle.Regular, GraphicsUnit.Pixel); protected int nShowEvents;

protected protected protected protected protected protected

int nHideEvents; int nVisibleEvents; int nIncrementShow; int nIncrementHide; bool bIsMouseOverPopup = false; bool bIsMouseOverClose = false;

protected bool bIsMouseDown = false; protected bool bKeepVisibleOnMouseOver = true; // Added Rev 002 protected bool bReShowOnMouseOver = false; // Added Rev 002 #endregion #region TaskbarNotifier Public Members public Rectangle TitleRectangle; public Rectangle ContentRectangle; public bool CloseClickable = true; public bool AnswerClickable = true; public bool RejectClickable = true; protected Label lblText; public bool EnableSelectionRectangle = true; public event EventHandler CloseClick = null; //public event EventHandler ContentClick = null; #endregion #region TaskbarNotifier Enums /// <summary> /// List of the different popup animation status /// </summary> public enum TaskbarStates { hidden = 0, appearing = 1, visible = 2, disappearing = 3 }

#endregion #region TaskbarNotifier Constructor /// <summary> /// The Constructor for TaskbarNotifier /// </summary> public TaskbarNotifier() { // Window Style FormBorderStyle = FormBorderStyle.None; WindowState = FormWindowState.Minimized; base.Show(); base.Hide(); WindowState = FormWindowState.Normal; ShowInTaskbar = false; TopMost = true; MaximizeBox = false; MinimizeBox = false; ControlBox = false; InitializeComponent(); timer.Enabled = true; timer.Tick += new EventHandler(OnTimer); } #endregion #region TaskbarNotifier Properties public TaskbarStates TaskbarState { get { return taskbarState; } } public bool KeepVisibleOnMousOver { get { return bKeepVisibleOnMouseOver;

} set { bKeepVisibleOnMouseOver = value; } } public bool ReShowOnMouseOver { get { return bReShowOnMouseOver; } set { bReShowOnMouseOver = value; } } #endregion #region TaskbarNotifier Public Methods [DllImport("user32.dll")] private static extern Boolean ShowWindow(IntPtr hWnd, Int32 nCmdShow); public void Show1(string strTitle, int nTimeToShow, int nTimeToHide) { this.Visible = true; WorkAreaRectangle = Screen.GetWorkingArea(WorkAreaRectangle); titleText = strTitle; lblText.Text = titleText; nVisibleEvents = nTimeToShow; CalculateMouseRectangles(); // We calculate the pixel increment and the timer value for the showing animation int nEvents; if (nTimeToShow > 10)

{ nEvents = Math.Min((nTimeToShow / 10), BackgroundBitmap.Height); nShowEvents = nTimeToShow / nEvents; nIncrementShow = BackgroundBitmap.Height / nEvents; } else { nShowEvents = 10; nIncrementShow = BackgroundBitmap.Height; } //We calculate the pixel increment and the timer value for the hiding animation if (nTimeToHide > 10) { nEvents = Math.Min((nTimeToHide / 10), BackgroundBitmap.Height); nHideEvents = nTimeToHide / nEvents; nIncrementHide = BackgroundBitmap.Height / nEvents; } else { nHideEvents = 10; nIncrementHide = BackgroundBitmap.Height; } switch (taskbarState) { case TaskbarStates.hidden: taskbarState = TaskbarStates.appearing; SetBounds(WorkAreaRectangle.Right BackgroundBitmap.Width - 17, WorkAreaRectangle.Bottom 1, BackgroundBitmap.Width, 0); timer.Interval = nShowEvents;

timer.Start(); // We Show the popup without stealing focus ShowWindow(this.Handle, 4); break; case TaskbarStates.appearing: Refresh(); break; case TaskbarStates.visible: timer.Stop(); timer.Interval = nVisibleEvents; timer.Start(); Refresh(); break; case TaskbarStates.disappearing: timer.Stop(); taskbarState = TaskbarStates.visible; SetBounds(WorkAreaRectangle.Right BackgroundBitmap.Width - 17, WorkAreaRectangle.Bottom BackgroundBitmap.Height - 1, BackgroundBitmap.Width, BackgroundBitmap.Height); timer.Interval = nVisibleEvents; timer.Start(); Refresh(); break; } } /// <summary> /// Hides the popup /// </summary> /// <returns>Nothing</returns> public new void Hide() { if (taskbarState != TaskbarStates.hidden) {

timer.Stop(); taskbarState = TaskbarStates.hidden; base.Hide(); } } public void SetBackgroundBitmap(Image image, Color transparencyColor) { BackgroundBitmap = new Bitmap(image); Width = BackgroundBitmap.Width; Height = BackgroundBitmap.Height; Region = BitmapToRegion(BackgroundBitmap, transparencyColor); } public void SetCloseBitmap(Image image, Color transparencyColor, Point position) { CloseBitmap = new Bitmap(image); CloseBitmap.MakeTransparent(transparencyColor); CloseBitmapSize = new Size(CloseBitmap.Width, CloseBitmap.Height); CloseBitmapLocation = position; } #endregion #region TaskbarNotifier Protected Methods protected void DrawCloseButton(Graphics grfx) { if (CloseBitmap != null) { Rectangle rectDest = new Rectangle(CloseBitmapLocation, CloseBitmapSize); Rectangle rectSrc; if (bIsMouseOverClose) {

if (bIsMouseDown) rectSrc = new Rectangle(new Point(CloseBitmapSize.Width * 2, 0), CloseBitmapSize); else rectSrc = new Rectangle(new Point(CloseBitmapSize.Width, 0), CloseBitmapSize); } else rectSrc = new Rectangle(new Point(0, 0), CloseBitmapSize); grfx.DrawImage(CloseBitmap, rectDest, rectSrc, GraphicsUnit.Pixel); } } protected void CalculateMouseRectangles() { Graphics grfx = CreateGraphics(); StringFormat sf = new StringFormat(); sf.Alignment = StringAlignment.Center; sf.LineAlignment = StringAlignment.Center; sf.FormatFlags = StringFormatFlags.MeasureTrailingSpaces; SizeF sizefTitle = grfx.MeasureString(titleText, hoverTitleFont, TitleRectangle.Width, sf); SizeF sizefContent = grfx.MeasureString(contentText, hoverContentFont, ContentRectangle.Width, sf); grfx.Dispose(); // Added Rev 002 //We should check if the title size really fits inside the pre-defined title rectangle if (sizefTitle.Height > TitleRectangle.Height) {

RealTitleRectangle = new Rectangle(TitleRectangle.Left, TitleRectangle.Top, TitleRectangle.Width, TitleRectangle.Height); } else { RealTitleRectangle = new Rectangle(TitleRectangle.Left, TitleRectangle.Top, (int)sizefTitle.Width, (int)sizefTitle.Height); } RealTitleRectangle.Inflate(0, 2); // Added Rev 002 //We should check if the Content size really fits inside the pre-defined Content rectangle if (sizefContent.Height > ContentRectangle.Height) { RealContentRectangle = new Rectangle((ContentRectangle.Width (int)sizefContent.Width) / 2 + ContentRectangle.Left, ContentRectangle.Top, (int)sizefContent.Width, ContentRectangle.Height); } else { RealContentRectangle = new Rectangle((ContentRectangle.Width (int)sizefContent.Width) / 2 + ContentRectangle.Left, (ContentRectangle.Height - (int)sizefContent.Height) / 2 + ContentRectangle.Top, (int)sizefContent.Width, (int)sizefContent.Height); } RealContentRectangle.Inflate(0, 2); } protected Region BitmapToRegion(Bitmap bitmap, Color transparencyColor) { if (bitmap == null)

throw new ArgumentNullException("Bitmap", "Bitmap cannot be null!"); int height = bitmap.Height; int width = bitmap.Width; GraphicsPath path = new GraphicsPath(); for (int j = 0; j < height; j++) for (int i = 0; i < width; i++) { if (bitmap.GetPixel(i, j) == transparencyColor) continue; int x0 = i; while ((i < width) && (bitmap.GetPixel(i, j) != transparencyColor)) i++; path.AddRectangle(new Rectangle(x0, j, i - x0, 1)); } Region region = new Region(path); path.Dispose(); return region; } #endregion #region TaskbarNotifier Events Overrides protected void OnTimer(Object obj, EventArgs ea) { switch (taskbarState) { case TaskbarStates.appearing:

if (Height < BackgroundBitmap.Height) SetBounds(Left, Top nIncrementShow, Width, Height + nIncrementShow); else { timer.Stop(); Height = BackgroundBitmap.Height; timer.Interval = nVisibleEvents; taskbarState = TaskbarStates.visible; timer.Start(); } break; case TaskbarStates.visible: ////timer.Stop(); ////timer.Interval = nHideEvents; //// Added Rev 002 //if ((bKeepVisibleOnMouseOver && !bIsMouseOverPopup) || (!bKeepVisibleOnMouseOver)) //{ // taskbarState = TaskbarStates.disappearing; //} //taskbarState = TaskbarStates.disappearing; // Rev 002 //timer.Start(); Refresh(); break; case TaskbarStates.disappearing: // Added Rev 002 if (bReShowOnMouseOver && bIsMouseOverPopup) { taskbarState = TaskbarStates.appearing;

} else { if (Top < WorkAreaRectangle.Bottom) SetBounds(Left, Top + nIncrementHide, Width, Height - nIncrementHide); else Hide(); } break; } } protected override void OnMouseEnter(EventArgs ea) { base.OnMouseEnter(ea); bIsMouseOverPopup = true; Refresh(); } protected override void OnMouseLeave(EventArgs ea) { base.OnMouseLeave(ea); bIsMouseOverPopup = false; bIsMouseOverClose = false; Refresh(); } protected override void OnMouseMove(MouseEventArgs mea) { base.OnMouseMove(mea); bool bContentModified = false; if ((mea.X > CloseBitmapLocation.X) && (mea.X < CloseBitmapLocation.X + CloseBitmapSize.Width) && (mea.Y > CloseBitmapLocation.Y) && (mea.Y <

CloseBitmapLocation.Y + CloseBitmapSize.Height) && CloseClickable) { if (!bIsMouseOverClose) { bIsMouseOverClose = true; Cursor = Cursors.Hand; bContentModified = true; } } else { if (bIsMouseOverClose) bContentModified = true; bIsMouseOverClose = false; Cursor = Cursors.Default; } if (bContentModified) Refresh(); } protected override void OnMouseDown(MouseEventArgs mea) { base.OnMouseDown(mea); bIsMouseDown = true; if (bIsMouseOverClose) Refresh(); } protected override void OnMouseUp(MouseEventArgs mea) { base.OnMouseUp(mea); bIsMouseDown = false; if (bIsMouseOverClose) {

Hide(); if (CloseClick != null) CloseClick(this, new EventArgs()); } } protected override void OnPaintBackground(PaintEventArgs pea) { Graphics grfx = pea.Graphics; grfx.PageUnit = GraphicsUnit.Pixel; Graphics offScreenGraphics; Bitmap offscreenBitmap; offscreenBitmap = new Bitmap(BackgroundBitmap.Width, BackgroundBitmap.Height); offScreenGraphics = Graphics.FromImage(offscreenBitmap); if (BackgroundBitmap != null) { offScreenGraphics.DrawImage(BackgroundBitmap, 0, 0, BackgroundBitmap.Width, BackgroundBitmap.Height); } DrawCloseButton(offScreenGraphics); grfx.DrawImage(offscreenBitmap, 0, 0); } #endregion protected void InitializeComponent() { this.lblText = new System.Windows.Forms.Label();

this.SuspendLayout(); // // lblText // this.lblText.BackColor = System.Drawing.Color.Transparent; this.lblText.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblText.ForeColor = System.Drawing.Color.Orange; this.lblText.Location = new System.Drawing.Point(2, 9); this.lblText.Name = "lblText"; this.lblText.Size = new System.Drawing.Size(380, 87); this.lblText.TabIndex = 0; this.lblText.Text = "L"; this.lblText.Click += new System.EventHandler(this.lblText_Click); // // TaskbarNotifier // this.ClientSize = new System.Drawing.Size(381, 105); this.Controls.Add(this.lblText); this.Name = "TaskbarNotifier"; this.Load += new System.EventHandler(this.TaskbarNotifier_Load); this.ResumeLayout(false); } private void TaskbarNotifier_Load(object sender, EventArgs e) { }

private void lblText_Click(object sender, EventArgs e) { } } }

Program.cs
using System; using System.Collections.Generic; using System.Windows.Forms; namespace AlwaysIAMWITHYOUDEAR { static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new frmNewAlert()); } } }

Form1.cs
#region "Using" using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Globalization; using CustomUIControls; using System.IO; using System.Security; using Microsoft.Win32; #endregion #region "namespace AlwaysIAMWITHYOUDEAR" namespace AlwaysIAMWITHYOUDEAR { #region "frmNewAlert" public partial class frmNewAlert : Form { #region "Global Declaration" public DataTable dt = new DataTable("AlertTable"); public DataSet ds = new DataSet(); public DataColumn dc;// = new DataColumn(); TaskbarNotifier taskbarNotifier1; static int Flag = 0; String path = Environment.CurrentDirectory + @"\Muhil.xml"; #endregion #region "Constructor frmNewAlert()" public frmNewAlert()

{ InitializeComponent(); taskbarNotifier1 = new TaskbarNotifier(); taskbarNotifier1.SetBackgroundBitmap(new Bitmap(GetType(), "BackGround1.bmp"), Color.FromArgb(255, 0, 255)); taskbarNotifier1.SetCloseBitmap(new Bitmap(GetType(), "Close1.bmp"), Color.FromArgb(255, 0, 255), new Point(580, 4)); System.IO.FileInfo fi = new System.IO.FileInfo(path); if (fi.Exists) { ds.ReadXml(path); } if (ds.Tables.Count <= 0) { dc = new DataColumn(); dc.DataType = System.Type.GetType("System.String"); dc.ColumnName = "DateTime"; dc.Caption = "Date and Time "; dt.Columns.Add(dc); dc = new DataColumn(); dc.DataType = System.Type.GetType("System.String"); dc.ColumnName = "AlertMessage"; dc.Caption = "Message to be display"; dt.Columns.Add(dc); ds.Tables.Add(dt); } timer1.Enabled = true; } #endregion #region"SetBall" private void SetBall()

{ notifyIcon1.ShowBalloonTip(2000, "reminder application", "Always I Am With You Dear", ToolTipIcon.Info); //RegistryKey rkStartUp = Registry.CurrentUser; //RegistryKey StartupPath; //StartupPath =rkStartUp.OpenSubKey(@"Software\Microsoft\Windows\Curr entVersion\Run", true); //if (StartupPath.GetValue("AlwaysIAMWITHYOUDEAR") == null) //{ // StartupPath.SetValue("AlwaysIAMWITHYOUDEAR",Application .ExecutablePath,RegistryValueKind.ExpandString); //} } #endregion #region "frmNewAlert_Load" private void frmNewAlert_Load(object sender, EventArgs e) { checkValid(); SetBall(); fnComboFill(comboBox4, 1, 12); fnComboFill(comboBox5, 0, 60); comboBox6.Items.Add("AM"); comboBox6.Items.Add("PM"); fnDatGridBind(); if (dataGridView1.ColumnCount > 0) { dataGridView1.Columns[0].ReadOnly = true; }

} #endregion #region "sdfd" void checkValid() { if (ds.Tables[0].Rows.Count > 10) { MessageBox.Show("Thank You. "); Flag = 1; this.Close(); } }

#endregion

#region "fnComboFill" private void fnComboFill(ComboBox cmb, int start, int end) { int i; for (i = start; i <= end; i++) { if (i < 10) { cmb.Items.Add("0" + i); } else { cmb.Items.Add(i); }

} } #endregion #region "fnDatGridBind" private void fnDatGridBind() { dataGridView1.DataSource = ds.Tables[0]; if (dataGridView1.RowCount > 0) { dataGridView1.Columns[0].Width = 150; dataGridView1.Columns[1].Width = 330; } } #endregion #region "btnSave_Click" private void btnSave_Click(object sender, EventArgs e) { if ((comboBox4.SelectedIndex >= 0) && (comboBox5.SelectedIndex >= 0) && (comboBox6.SelectedIndex >= 0)) { if (textBox3.Text.Length != 0) { String s1 = comboBox4.SelectedItem + ":" + comboBox5.SelectedItem + " " + comboBox6.SelectedItem; String tmpdate = dateTimePicker1.Value.ToShortDateString() + " " + s1; DateTime dt1 = DateTime.Parse(tmpdate);//, CultureInfo.InvariantCulture); if (dt1 <= DateTime.Now)

{ MessageBox.Show("Select Date and Time should be greater than the Current Date Time"); } else { fnCheck(1, dt1); Clear(); } } else { MessageBox.Show("Should enter message"); } } else { MessageBox.Show("Select Proper Timings"); } } #endregion

private void Clear() { textBox3.Text = ""; // fnComboFill(); } #region "timer1_Tick"

private void timer1_Tick(object sender, EventArgs e) { DateTime dt = DateTime.Now;

fnCheck(0, dt);

} #endregion private void fnCheck(int flag, DateTime dt) { DataView dv = new DataView(); dv = ds.Tables[0].DefaultView; dv.Sort = "DateTime Asc"; DataRowView[] rows = dv.FindRows(dt); if (flag == 1) { if (rows.Length > 0) { MessageBox.Show("Already Alert created on this time , Choose other timmings"); } else { DataRow dr = ds.Tables[0].NewRow(); dr["DateTime"] = dt.ToString(); dr["AlertMessage"] = textBox3.Text.Trim(); ds.Tables[0].Rows.Add(dr); ds.WriteXml(path); fnDatGridBind(); checkValid(); }

} else { String d; if (rows.Length > 0) { d = rows[0][1].ToString(); taskbarNotifier1.Show1(d, 500, 500); ds.Tables[0].Rows.RemoveAt(dv.Find(rows[0][0])); ds.WriteXml(path); fnDatGridBind(); } } } #region "toolStripMenuItem1_Click" private void toolStripMenuItem1_Click(object sender, EventArgs e) { Show(); WindowState = FormWindowState.Normal; SetBall(); } #endregion #region "toolStripMenuItem2_Click" private void toolStripMenuItem2_Click(object sender, EventArgs e) { this.Close(); } #endregion #region "notifyIcon1_MouseDoubleClick"

private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e) { Show(); WindowState = FormWindowState.Normal; SetBall(); } #endregion #region "frmNewAlert_Resize" private void frmNewAlert_Resize(object sender, EventArgs e) { if (FormWindowState.Minimized == WindowState) { Hide(); } } #endregion #region "frmNewAlert_FormClosing" private void frmNewAlert_FormClosing(object sender, FormClosingEventArgs e) { if (Flag == 0) { DialogResult dr = MessageBox.Show("If you close the application, no alert to be display, Do you want to close the application?", "Alerts", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dr == DialogResult.No) { e.Cancel = true; Hide();

SetBall(); } else { MessageBox.Show("Thank You", "Information"); } } } #endregion

#region "fnDeletePreviousRecord" private void fnDeletePreviousRecord() { ds.ReadXml(path); } #endregion private void button1_Click(object sender, EventArgs e) { fnDeletePreviousRecord(); } private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { String cDir; cDir = Environment.CurrentDirectory + @"\Doc1.htm"; System.Diagnostics.Process.Start("iexplore", cDir);

} private void dataGridView1_KeyUp(object sender, KeyEventArgs e) { if ((e.KeyCode == System.Windows.Forms.Keys.Enter) || (e.KeyCode == System.Windows.Forms.Keys.Tab)) { CurrencyManager gridCurrencyManager = (CurrencyManager)this.BindingContext[dataGridView1.Data Source, dataGridView1.DataMember]; //MessageBox.Show(gridCurrencyManager.Count.ToString()) ; gridCurrencyManager.EndCurrentEdit(); dataGridView1.DataSource = gridCurrencyManager; ds.AcceptChanges(); ds.WriteXml(path); fnDatGridBind(); } else if (e.KeyCode == System.Windows.Forms.Keys.Delete) { ds.AcceptChanges(); ds.WriteXml(path); fnDatGridBind(); } } private void textBox3_KeyUp(object sender, KeyEventArgs e) { if (e.KeyCode == System.Windows.Forms.Keys.Enter)

{ btnSave_Click(sender, e); } } private void dataGridView1_RowsRemoved(object sender, DataGridViewRowsRemovedEventArgs e) { } private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { } private void Panel1_Paint(object sender, PaintEventArgs e) { }

} #endregion } #endregion

Form1.cs

MAIN MENU

ENTER THE MESSAGE, SET TIME, DATE

OUTPUT

IMAGE FOR ALARM

BIBLIOGRAPHY Books
1. C# Programming Language (Covering C# 4.0), The 4th Edition (Microsoft .NET Development Series) BY:- Anders Hejlsberg 2. Professional C# 4.0 and .NET 4 BY:- Bill Evjen, Karli Watson 3. Illustrated C# 2008 (Windows.Net) BY: - Daniel Solis

Websites
1. www.csharp411.com 2. www.csharpfriends.com 3. www.sitepoint.com/asp-dot-net-introduction

You might also like