Creating a Dynamic Windows UI: Menus, Copy-Paste, Find, Toolbar, and StatusBar, Study notes of Information Technology

The process of creating a dynamic windows ui, including building a menu structure from a database, implementing cut-copy-paste functionality, adding find functionality, creating a toolbar, and adding a status bar. The document also covers communication between the menudc object and ui, and adding icons for error messages.

Typology: Study notes

Pre 2010

Uploaded on 08/04/2009

koofers-user-ycl-1
koofers-user-ycl-1 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Creating the Windows UI
Building a Dynamic Menu Structure
store the menu structure in the database
create a MenuDC object that loads the menus in a RecordSet object
Create a MenuUI object which passes the RecordSet to the UI
add routines to frmMain to read the RecordSet and add the menus to the UI
The menu table: pg 197, 198, 199, 200
Communication between MenuDC and UIMenu: Imenu (pg 201)
Data centric object: MenuDC (pg 201)
Accessing the DC object: you need to make changes to web.config (pg 202)
Bringing the menu dataset into the user tier (pg 203)
Menus are added to the UI by adding the top level menus first in frmMain.LoadMenus (pg 204). Top
level menus are identified by the fact that menus_under_id (parent) is null. Adding the trees under the
top level menus is done in frmMain.AddItems (pg 206).
Implementing Cut, Copy and Paste Functionality
Use an interface ICutCopyPaste to insure access to edit functionality for different forms (pg 213).
Implement Cut(), Copy() and Paste() into frmEditBase (pg 214, 215), so that it can be used by any
edit forms. This functionality insures that you can use edit functionality between text boxes in a form.
Connect the implemented functionality to the Cut, Copy Paste menus in frmMain. (pg 216).
Implementing Select All functionality
Allows to use a Select All command from the menu and apply that the active text box in the current
form (pg 218)
Implementing Find Functionality
Use an interface IFind to insure access to find functionality for different forms (pg 219). Find
functionality is already implemented (pg 97). Implement FindNext functionality (pg 220) and attach
the the functionality to the menus in frmMain (pg 220).
Implementing a Toolbar
Add the toolbar to the interface and handle the ButtonClick event (pg 224)
Implementing a StatusBar
Add a StatusBar control to frmMain and then add Panels to the StatusBar. Create an owner draw panel
to display Caps Lock and Num Lock status (pg 228).
pf2

Partial preview of the text

Download Creating a Dynamic Windows UI: Menus, Copy-Paste, Find, Toolbar, and StatusBar and more Study notes Information Technology in PDF only on Docsity!

Creating the Windows UI

Building a Dynamic Menu Structure

 store the menu structure in the database  create a MenuDC object that loads the menus in a RecordSet object  Create a MenuUI object which passes the RecordSet to the UI  add routines to frmMain to read the RecordSet and add the menus to the UI The menu table: pg 197, 198, 199, 200 Communication between MenuDC and UIMenu : Imenu (pg 201) Data centric object: MenuDC (pg 201) Accessing the DC object: you need to make changes to web.config (pg 202) Bringing the menu dataset into the user tier (pg 203) Menus are added to the UI by adding the top level menus first in frmMain.LoadMenus (pg 204). Top level menus are identified by the fact that menus_under_id (parent) is null. Adding the trees under the top level menus is done in frmMain.AddItems (pg 206).

Implementing Cut, Copy and Paste Functionality

Use an interface ICutCopyPaste to insure access to edit functionality for different forms (pg 213). Implement Cut() , Copy() and Paste() into frmEditBase (pg 214, 215), so that it can be used by any edit forms. This functionality insures that you can use edit functionality between text boxes in a form. Connect the implemented functionality to the Cut, Copy Paste menus in frmMain. (pg 216).

Implementing Select All functionality

Allows to use a Select All command from the menu and apply that the active text box in the current form (pg 218)

Implementing Find Functionality

Use an interface IFind to insure access to find functionality for different forms (pg 219). Find functionality is already implemented (pg 97). Implement FindNext functionality (pg 220) and attach the the functionality to the menus in frmMain (pg 220).

Implementing a Toolbar

Add the toolbar to the interface and handle the ButtonClick event (pg 224)

Implementing a StatusBar

Add a StatusBar control to frmMain and then add Panels to the StatusBar. Create an owner draw panel to display Caps Lock and Num Lock status (pg 228).

Adding an Icon if there are errors in the Even Log

Read an icon from a resource in a .NET application and add that icon to a panel in the toolbar (pg 232), create a function that that tells us if there are errors in the Event Log (pg 233) and call this function when the application starts. Handle ErrorLogged and ErrorCleared messages from mobjEventLog.