This article is the third part from the series Creating Accounting Applications with C#. If you haven’t read the first and second parts, please have a look before continuing with this.
- Creating Accounting Application with C# - Part One
- Creating Accounting Application with C # - Part Two
In the previous article, we started our application development by creating the main window in MDI format. In this article, we will add some additional features to the form.
Flow of the article
- Open another window from Main Form as MDI child
- Forms used in this project and their use
- Storing data in Properties.Settings
- List of Properties.Settings.Default variables we used in this projects
Open another window from Main Form as Mdichild
First of all, let us add a form to the project. To add a new form to the project, put the cursor on the project name shown on the Solution Explorer. Right-click the mouse >> Add-New Item.
Or from the menubar, you can add the same by clicking Project >> Add Window Form.

Then, press on Windows Forms >> Window Form. After giving a suitable name, press OK button.

We have added a new form to our project. Now, we have to write the code to open the newly created form from the Main Window.

We can create an event. By creating an event, we are applying an action to the control. Firstly, select Firm and then double-click on Company Details. The system will automatically create an event for us.
Then, declare the form as given below.
- CompanyDetails companyDetails;
Next, we can write full code as given below.
- CompanyDetails companyDetails;
- privatevoid companyDetailsToolStripMenuItem_Click(object sender, EventArgs e) {
- if (companyDetails == null) {
- companyDetails = newCompanyDetails();
- companyDetails.MdiParent = this;
- companyDetails.FormClosed += newFormClosedEventHandler(companyDetails_FormClosed);
- companyDetails.Show();
- } else {
- companyDetails.Activate();
- }
- }
- void companyDetails_FormClosed(object sender, FormClosedEventArgs e) {
- companyDetails = null;
- }
Here, with the ‘If statement’, we check whether the form is opened or not. If the result is null, we have to declare the class and if the result is not null, we just activate the CompanyDetails window. To get this type of result, we programmatically put an event as of Form Closed event.
- companyDetails.FormClosed += newFormClosedEventHandler(companyDetails_FormClosed);
And in the event, we assign the value to null.
- void companyDetails_FormClosed(object sender, FormClosedEventArgs e)
- {
- companyDetails=null;
- }
Sometimes, we have to open the same window as multiple. For this, we remove the inline event as the code given below.
- saleEstimate = newSalesEstimate();
- saleEstimate.MdiParent = this;
- saleEstimate.Show();
Then, we need to mention the MDI parent. Here, the MDI parent is the Main window. So, we put the code like below.
- companyDetails.MdiParent = this;
As mentioned above, let us create forms wanted in this project. The various types of form and their uses have been mentioned below.
Forms used in this project and their use
| SL No | Form Name | Remarks |
| 1 | Account Creation | To add New Account and edit and delete existing ledger account. |
| 2 | Account Group | To Add New Account Group and edit and delete existing account group |
| 3 | Activation | For Activation Purposes. By this window, we can manage our customers' subscription |
| 4 | Admin Settings | To set the admin property settings of the application |
| 5 | Application Settings | To customize the settings of the application |
| 6 | Backup Database | The Window to make the backup file of the database |
| 7 | Balance Sheet | To show the balance sheet report of the firm |
| 8 | Bank Payment | The window to enter the payment we made through the bank |
| 9 | Bank Receipt | The window to enter the receipt we got through a bank account |
| 10 | Bank Reconciliation | To reconcile the bank entry by changing date to right date |
| 11 | Barcode Designing | This window is used to design and to print the Barcode. |
| 12 | Bulk Bill Print | This window is to print the Invoice from serial number to serial number bulky. |
| 13 | Brand Creation | The window to create, update and delete different brands of products |
| 14 | Calendar Planning | To record the events and plans as per date |
| 15 | Cash Payment | The window to enter the cash payment we made. |
| 16 | Cash Receipt | The window to enter the cash receipt. |
| 17 | Change Date | To change the date of the application |
| 18 | Change Password | To change the password of the current user |
| 19 | Change Database | To change the application database |
| 20 | Company Details | In this window, we can enter the name and other details of the company. |
| 21 | Cheque Report | To view the post-dated cheque receipt and payment report. |
| 22 | Contact Us | If the customer wants to contact the developer, he can use this window |
| 23 | Credit Note | This is to enter the credit note transaction |
| 24 | Custom Transaction Report | If you want to generate a report other than the given report, you can use this window. |
| 25 | Daily Account Statement | This is to view the daily account statement. As in this window, you can see all the transaction you made in the current date |
| 26 | Database Auto Backup | The window to Backup the database when the application is closing |
| 27 | Day Close | This window to close the day. After closing a day, we can’t enter any transactions on that day. |
| 28 | Database Connection | This is used to change a database connection, create a new database, backup database, restore the database and configure the database. In this, we create all database related work |
| 29 | Debit Note | To record debit note transaction. |
| 30 | Discount Sales Report | To view the report of discount sales from fixed date to a fixed date. |
| 31 | Email Settings | This is to save SMTP details and user id and password of email provider. |
| 32 | Employee Registration | This is to record the data about employees such as Name, designation, qualification and experience. |
| 33 | Expiry Stock Report | This is to view the report of products that are expired. |
| 34 | Export Data | This is to export data to another database |
| 35 | Financial Period Settings | This is used to set the financial period |
| 36 | First Purchase | When we purchase some product from a supplier, we have to create supplier, product group, brand and product details. By this window, we can avoid all these steps. |
| 37 | Godown Creation | This is to used create a new godown |
| 38 | Godown Stock Report | This is to view product stock in a certain godown |
| 39 | Group wise Sales Report | This is to view the group wise sales of a product for some period |
| 40 | Inventory wise Sales Report | This is to view product wise sales of certain period |
| 41 | Invoice Header and Footer | This is to set the header and footer of Invoice printing page |
| 42 | Inventory Print Designing | This is to design the print of ivoices |
| 43 | Invoice Settings | This is to set the properties of invoice |
| 44 | Journal Entry | By this window, we are recording journal entries |
| 45 | Journal Entry Report | To view journal entry transactions |
| 46 | Ledger Report | This is to know transactions made in a certain period of an account |
| 47 | Lock Application | This to lock the application. After locking, we can’t enter any data as before unlocking by giving the password of the logged user. |
| 48 | Login Application | This is the login window |
| 49 | Main Form | Main navigation window. As from this page, we are open widows as we want. This is mdi parent. |
| 50 | My Message Box | This is to show custom messages |
| 51 | Opening Balance | This is used to enter or to change opening balance entry |
| 52 | Outstanding Report | This is to view debtor and creditor balance of customers and of suppliers. |
| 53 | Party List | This is to view detailed report of customers and suppliers. |
| 54 | Cash Payment Report | Report to view cash payment details for a certain period |
| 55 | Bank Payment Report | Report to view bank payment details for a certain period |
| 56 | Cash Receipt Report | Report to view cash receipt details of a certain period |
| 57 | Bank Receipt Report | Report to view bank receipt details of a certain period |
| 58 | Pending Order Report | To view the report about pending orders to sale or to purchase |
| 59 | Post Dated Cheque Receipt | To record the receipt of post dated cheques from customers |
| 60 | Post Date Cheque Payment | To record the payment of post dated cheques to suppliers |
| 61 | Price Category | This is to record the price category. |
| 62 | Price Comparison Report | This is to view price comparison report of products sold in certain period |
| 63 | Price List | This is to view the price of products in different categories |
| 64 | Product Creation | By this window we are entering new products and editing existing products and deleting a product |
| 65 | Product Group Creation | To create, edit and delete groups of product group |
| 66 | Product Combination | By this window we can create a new combination with two or more products. |
| 67 | Product Details | To know details about product. |
| 68 | Product Editing | This is to edit group, brand, price category and tax category of certain product |
| 69 | Product Flow Report | This to know number of purchases, sales, sales return, purchase return and current stock |
| 70 | Product Transaction Report | To know the transaction of products as numbers we purchased from different parties and numbers sold to customers |
| 71 | Product Tracing | To know stock fluctuations of products |
| 72 | Profit And Loss Account | To know profit and lose reports of the firm |
| 73 | Profit Report | To know the profit from sales of product |
| 74 | Purchase Invoice | The purchase invoice window |
| 75 | Purchase Report | This is to view the detailed report about purchase for certain period |
| 76 | Purchase Return | The purchase return invoice window |
| 77 | Purchase Return Report | This is to view the detailed report about purchase return for certain period |
| 78 | Reminder | This is to set reminder |
| 79 | Report Bugs | To report bugs found about the application to the developer |
| 80 | Reset Database | To reset records we enter in the database of the application |
| 81 | Route | To create a new route of sales and to edit and delete existing routes |
| 82 | Salary Process | To calculate salary of employees |
| 83 | Sales And Sales Return Report | To know the sales and sales return for certain period |
| 84 | Sales Estimate | This is the page to enter Sales Estimate Entry as without tax sales |
| 85 | Sales Estimate Report | To view the sales we made without showing tax. |
| 86 | Sales Invoice | The Sales Invoice window |
| 87 | Salesman Wise Report | To view salesman-wise sales for certain period. |
| 88 | Sales Order | To record orders for new sales |
| 89 | Sales Order Report | To view report about orders for sales and purchase |
| 90 | Sales Return | The sales return window. By this we can enter new sales return entry. |
| 91 | Sales Return Report | To know about details about products that have been returned from customers for some period. |
| 92 | Sales Summary Report | This is the summary |
| 93 | Sales View | To view cash sales or credit sales of certain date. |
| 94 | Selected Financial Year | To select a financial year |
| 95 | Send Mail | To send mail to customers from the application |
| 96 | Shelf | To create new self and delete and edit existing self |
| 97 | Show Product | To show the product details sold to customers, such as price variation. |
| 98 | Splash Screen | The splash screen window |
| 99 | Staff Attendance | The window to record the attendance of staff |
| 100 | Stock Adjuster | To reconcile the product stock |
| 101 | Stock Report | To view stock of the firm for certain dates. |
| 102 | Stock Transfer | To transfer products from a certain godown to another. |
| 103 | Stock Transfer Report | To view reports about stock transfers. |
| 104 | Tax Category | To create a new tax category |
| 105 | Tax Sales Report | To get the tax sales report to submit in front of the concerned person. |
| 106 | Tax Purchase Report | To get the tax purchase report to submit in front of the concerned tax person. |
| 107 | Transaction Without Inventory | We use this window to record all transactions without inventory. |
| 108 | Unit | To create a new unit of products and to delete and edit existing units |
| 109 | Unsold Product Report | To view the report of the products not sold for a certain period. |
| 110 | User Management | The window to manage users and their privileges. |
| 111 | User Privilege | To create new privileges |
| 112 | Vehicle | Create new vehicle and delete and edit existing vehicle |
| 113 | Video Tutorial | To play a tutorial about the application. |
Storing data in Properties.Settings.Default
Storing single data in Properties.Settings.Default is a very good idea as we can store data permanently and we can call with a simple code like a variable, we can open the Properties window as below.
Project -> Application Properties.

First, give an appropriate name and variable type (like string, intiger and bool). Then, you can give the initial value.

In our accounting project, we want to create some property item. In the table given below, I have mentioned the name of items with variable type and usage of items.
List of Properties.Settings.Default variables we used in this project
| SL | Variable | Type | Use |
| 1 | boolAct | Bool | To know whether athe trial edition is activated or not |
| 2 | strDate | String | Activated date |
| 3 | AppExit | Bool | Whether the app closed normally or logged off. If logged off, you have to log in. |
| 4 | strSQLCon | String | Database |
| 5 | strCompany | String | The name of the Firm |
| 6 | intSpalsh | Int | To decide the visibility of the splash screen |
| 7 | intLogOff | Int | Number of the login attempts |
| 8 | intProductCode | Int | To set activation code |
| 9 | strServer | String | Server of Database |
| 10 | opColor | System.Drawing.Color | To store the selected color of the application |
| 11 | appDate | Date | To store application Date |
| 12 | blShortKey | Bool | Shortkey panel visible or not |
| 13 | strSign | String | Path of signature |
| 14 | strDBScript | String | Database script to create new company database |
| 15 | strBaseDBScript | String | The script to create a base database |
| 16 | isServer | String | To know if the system is server or node |
| 17 | isTrial | Bool | To know if this is a trial or not |
| 18 | strActCode | String | To store activation code for product registration |
| 19 | isActivated | Bool | To know whether activated or not |
| 20 | AppExpairyDate | Date | Application Expiry Date |
| 21 | strBackupFile | String | The path of the backup file. As in this path, the application stores back files during auto backup |
| 22 | strSecondDB | String | Second database path |
| 23 | strBackImageName | String | Path of the background image |
| 24 | intLogOnId | Int | The user id of logged user. |
Conclusion
Thank you for reading my article. If you find any mistake or have any suggestions, please feel free to share the same in the comment box.

Joel CoutinhoPosted Sep 21, 2025, 10:54 PM
Senhor, posso obter o banco de dados e o c?digo-fonte deste projeto? email - [email protected].
scott whiteheadPosted May 14, 2025, 11:12 AM
Is the source code available?
Manthan JayswalPosted Aug 12, 2019, 7:49 AM
Sir Can I get the database and source code of this project [email protected]
Manthan JayswalPosted Aug 12, 2019, 7:49 AM
Sir Can I get the database and source code of this project [email protected]
Huan PhanPosted Aug 3, 2019, 1:40 AM
Dear sir. May I have the source code: phanthaihuan at gmail dot com. Thank you in advance :).
Hassan HoballahPosted Jul 30, 2019, 4:51 AM
Thanks a lot for sharing Brother, Can you please send me the Source files with Database to [email protected] ... Thanks Again
ชื่อ กิ๊ฟฟ์Posted Jul 10, 2019, 11:17 AM
Thank for sharing. [email protected]
Ali GhaffariPosted Apr 9, 2019, 9:00 AM
Thank you for your Sharing Brother. Brother, is it possible to get the Source files. I need immediately. Please kindly ping me. email id [email protected]
Mano AnuPosted Feb 12, 2019, 12:07 AM
Thank you for your Sharing Brother. Brother, is it possible to get the Source files. I need immediately. Please kindly ping me. email id - [email protected]
Ankit GuptaPosted Jan 28, 2019, 11:55 PM
Sir Can I get the database and source code of this project [email protected].
Muhammad AkhtarPosted Dec 10, 2018, 8:06 AM
My mail is [email protected]
Muhammad AkhtarPosted Dec 10, 2018, 8:06 AM
Hey can you end me database and source code i wanna purchase it
Rushi MehtaPosted Nov 12, 2018, 11:46 PM
Thanks for sharing