//************************************************************************ // Confidential Trade Secret. // Copyright (c) 1997 Data Access Corporation, Miami Florida // as an unpublished work. All rights reserved. // DataFlex is a registered trademark of Data Access Corporation. // //************************************************************************ //************************************************************************ // // $File name : StdAbout.pkg // $File title : Standard about object package for VDF // Notice : // $Author(s) : John Tuohy // // $Rev History // // JT 06/27/97 File created //************************************************************************ // This provides a quick and simple way to create an about package for a program. // You need to create a message inside you client area called Activate_About. // Within this message you should send the message DoAbout passing needed // string information. // // Procedure Activate_About // Send DoAbout sTitle sVersion sCopyright sAuthor sBitmap // End_Procedure // where: sTitle = Name of application. If none provided, uses caption // bar title // sVersion = Version Line. If none provided, will be blank // sCopyRight = Copyright Line. If none provided, will be blank // sAuthor = Author name, blank if none provided // sBitMap = Bitmap logo. If none provided, standard VDF bitmap // is used. // It is expected that you will place this in your own object package. For // example an order about package may look like this: // // // OrderAbout.pkg // Use StdAbout.pkg // Procedure Activate_About // String sTitle sCopyright sVersion sAuthor // Move "My Order Entry System" to sTitle // Move "Version 2.1" to sVersion // Move "Copyright 1997, Super Software Inc." to sCopyright // Move "John Smith" to sAuthor // Send DoAbout sTitle sVersion sCopyright sAuthor "" // end_procedure // // end of file. Use DfAbout.pkg // ************************************************************************* // Public message. This is the default message. It is expected that you will // create your own message to override this // ************************************************************************* Procedure Activate_About Send DoAbout "" "" "" "" "" End_Procedure // ************************************************************************* // Public message. It is expected that you will send this message (most // likely from Activate_About. This creates an about object, activates it // and destroys it when done. It is not exepected that you will augment this. // ************************************************************************* // Sample usage: // The first two params will automatically be filled from the application settings if not provided. // Send DoAbout "" "" ("Copyright: 2013" * psCompany(ghoApplication)) "Created by: Your Name" "YourAppBitmap.bmp" "Internet: http://www.YourWebAddress.com" "E-mail: mailto:support@YourEmailAddress.com" "Some other description of choice" "9th param" "and last param" Procedure DoAbout String sTitle String sVersion String sCopyRight String sAuthor String sBitmap ; String sParam6 String sParam7 String sParam8 String sParam9 String sParam10 Integer hoObj hoMain iArgs String sValue // Create object Object About is an AboutDialog // Uncomment these two lines if you would like to have a resizable About object. // Set Border_Style to Border_Thick // Set peAnchors to anAll // Add checking for the number of arguments passed to avoid runtime errors // if one of them is not passed. This makes the interface // more flexible. Move num_arguments to iArgs // If no title is passed use the label of the main panel (if a main panel exists). If (iArgs > 0 and sTitle = "") Begin Get Main_Window of Desktop to hoMain If hoMain Begin Get Label of hoMain to sValue End End Else If (iArgs > 0 and sTitle <> "") Begin Move sTitle to sValue End Else If (iArgs = 0) Begin Get Main_Window of Desktop to hoMain If hoMain Begin Get Label of hoMain to sValue End End If (sValue <> "") Begin Send Add_LineLn sValue End Move "" to sValue // If the passed sVersion value is blank, the info will be retrieved from the cApplication object. // For this to work the Project Properties Version must have been set in the Studio. If (iArgs < 2) Begin Move "" to sValue End Else Begin Move sVersion to sValue End Set Version to sValue If (iArgs > 2 and sCopyRight <> "") Begin Send Add_LineLn sCopyRight End // If only the five "standard" params were passed we don't add an extra linefeed; // else we do. If (iArgs > 3 and iArgs < 6 and sAuthor <> "") Begin Send Add_Line sAuthor End Else If (iArgs > 5 and sAuthor <> "") Begin Send Add_LineLn sAuthor End // Square bitmaps of 80x80 works best If (iArgs > 4 and sBitmap <> "") Begin Set Logo to sBitMap End // Here starts handling of the five optional params: If (iArgs = 6 and sParam6 <> "") Begin Send Add_Line sParam6 End Else If (iArgs > 6 and sParam6 <> "") Begin Send Add_LineLn sParam6 End If (iArgs = 7 and sParam7 <> "") Begin Send Add_Line sParam7 End Else If (iArgs > 7 and sParam7 <> "") Begin Send Add_LineLn sParam7 End If (iArgs = 8 and sParam8 <> "") Begin Send Add_Line sParam8 End Else If (iArgs > 8 and sParam8 <> "") Begin Send Add_LineLn sParam8 End If (iArgs = 9 and sParam9 <> "") Begin Send Add_Line sParam9 End Else If (iArgs > 9 and sParam9 <> "") Begin Send Add_LineLn sParam9 End If (iArgs = 10 and sParam10 <> "") Begin Send Add_Line sParam10 End Move Self to hoObj End_Object Send Popup of hoObj // Popup the about object Send Destroy of hoObj // When done, it will be destroyed End_Procedure