In a previous post I discussed how we wanted to “modernize” the appearance of a simple Clarion application. We decided to use styling similar to that found in Norton Internet Security, namely a single MDI frame with a large toolbar and sub windows maximized within the main frame.

Thanks to the Clarion Metro Wizard class posted by Brahn Partridge we found the means to remove the standard Windows caption bar and replace it with a “Metro” style caption bar. We adapted this to a frame procedure and set about building our app with maximized MDI child procedure windows.

Maximized Child Procedure Windows

It is possible to develop an application in Clarion with all child procedure windows maximized, but there isn’t a “switch” to achieve this. So, we developed the procedures we needed and set the necessary properties to maximize each window, and hide the title bar and borders. Then we added some code to display the missing window title in the caption bar of the frame.

After we’d done a few windows we realized we were working harder, not smarter which is not the way things should be done with Clarion. So, we developed a template, then we added a class.

What the Metro Caption template does

The template evolved as we worked with it and discovered the little idiosyncrasies of Metro style apps. These are some of the things we have addressed…

For the Frame procedure

  1. Hide the Windows caption bar.
  2. Add a region to a toolbar on the application frame to allow moving the frame.

For Maximized child procedures

  1. Remove the caption and borders from maximized MDI child windows.
  2. Resize child MDI windows to fill the frame.
  3. Disable the default Clarion resizer.
  4. Update the frame caption bar text with the current child window title text.
  5. Centre controls within the resized window
  6. Support for resizing windows.
  7. Only allow a maximized procedure to be started once.
  8. Manage which procedure has focus.

For non-maximized child windows

  1. Hide the Windows caption bar.
  2. Add a toobar, region and icons to create a Metro-style caption.
  3. Provide a Frame Background Procedure
  4. Allow a procedure to be the frame background, with full functionality.
  5. Enable and disable the background procedure to prevent MDI windows becoming hidden behind it.
  6. Add routines and embed points for finer programmer control of functionality.

Example screens…

Get the File

A valid email address is required

Please agree to these terms

  • Template is provided "as is"
  • No warranty is expressed or implied
  • No liability will be accepted for any damage, or loss, caused by the use of this template.
  • The file and code is the copyright of Comformark Pty Ltd
  • The file is not to be distributed to any other party
You must agree to our terms*