Author Topic: test posts  (Read 3268 times)

Chris Boss

  • Administrator
  • Jr. Member
  • *****
  • Posts: 60
    • View Profile
test posts
« on: January 11, 2022, 03:44:55 pm »
This is for testing my repost efforts of previous forum.

This is just for testing the format of the text I convert.

Chris Boss

  • Administrator
  • Jr. Member
  • *****
  • Posts: 60
    • View Profile
Re: test posts
« Reply #1 on: January 11, 2022, 03:45:04 pm »
Here is an include file which has a library of routines that makes working with tooltips easy.

ezttip.inc

Code: [Select]
&' Note: You define the following function in your main apps code:
DECLARE FUNCTION DefineToolTipText(BYVAL hDlg&, BYVAL IDNum&) AS STRING

&' *************************************************************
&' EZGUI Freeware ToolTip Library !!!
&' -------------------------------------------------------------
&' Copyright 2005, Christopher R. Boss, All Rights Reserved !
&' This source code is offered as freeware. You may use it
&' Royalty free, but you must maintain this copyright notice
&' with the code. No warranty made !
&' Provided by Computer Workshop.
&' http://ezgui.com , also http://cwsof.com
&' *************************************************************
GLOBAL g_ToolTipText AS ASCIIZ*1024
&'
FUNCTION CreateDlgToolTip(BYVAL hDlg&, BYVAL MaxWidth&, BYVAL TextColor&, BYVAL BGColor&) AS LONG
  LOCAL WS&, EWS&, CName AS ASCIIZ*32, hCtrl&
  WS&=%WS_POPUP OR %TTS_ALWAYSTIP OR %TTS_BALLOON
  EWS&=%WS_EX_TOOLWINDOW
  CName=$TOOLTIPS_CLASS
  hCtrl&=CreateWindowEx(EWS&, CName,"", WS&,0,0,32,32,hDlg&,0,GetModuleHandle(BYVAL %NULL), BYVAL %NULL)
  SendMessage hCtrl&, %TTM_SETMAXTIPWIDTH, 0, MaxWidth&
  SendMessage hCtrl&, %TTM_SETTIPTEXTCOLOR,TextColor&,0
  SendMessage hCtrl&, %TTM_SETTIPBKCOLOR, BGColor&,0
  FUNCTION=hCtrl&
END FUNCTION
&'
SUB AddTool(BYVAL hToolTip&, BYVAL hDlg&, BYVAL IDNum&)
  LOCAL TT AS TOOLINFO, hCtrl&, RV&
  CONTROL HANDLE hDlg&, IDNum& TO hCtrl&
  IF hCtrl&<>0 THEN
  TT.cbSize=SIZEOF(TT)
  TT.uFlags=%TTF_IDISHWND OR %TTF_SUBCLASS
  TT.hwnd=hDlg&
  TT.uId=hCtrl&
  &' TT.rec=
  TT.hinst=GetModuleHandle(BYVAL %NULL)
  TT.lpszText=%LPSTR_TEXTCALLBACK
  TT.lParam=0
  RV&=SendMessage(hToolTip&, %TTM_ADDTOOL,0, VARPTR(TT))
  END IF
END SUB
&'
FUNCTION GetClassType(BYVAL hCtrl&) AS STRING
  LOCAL zC AS ASCIIZ*33, X&
  X&=GetClassName(hCtrl&, zC,32)
  FUNCTION=zC
END FUNCTION
&'
FUNCTION MKCRLF(BYVAL T$) AS STRING
  REPLACE "|" WITH CHR$(13)+CHR$(10) IN T$
  FUNCTION=T$
END FUNCTION
&'
FUNCTION TestForToolTip(BYVAL hDlg&, BYVAL Msg&, BYVAL wParam&, BYVAL lParam&) AS LONG
  LOCAL RV&, pNM AS NMHDR PTR, pTT AS NMTTDISPINFO PTR
  LOCAL hCtrl&, hTipTool&, IDNum&
  RV&=0
  IF Msg&=%WM_NOTIFY THEN
  pNM=lParam&
  hCtrl&=@pNM.hwndFrom
  hTipTool&=@pNM.idfrom
  IF GetClassType(hCtrl&)=$TOOLTIPS_CLASS THEN
  IF @pNM.code=%TTN_NEEDTEXT THEN
  pTT=lParam&
  IDNum&=GetDlgCtrlID(hTipTool&)
  &' this method is limited to 80 characters
  &' @pTT.szText=left$(DefineToolTipText(hDlg&, IDNum&),79)
  &' this method is limited to size of my global variable !
  g_ToolTipText=MKCRLF(DefineToolTipText(hDlg&, IDNum&))
  @pTT.lpszText=VARPTR(g_ToolTipText)
  RV&=1
  END IF
  END IF
  END IF
END FUNCTION

&' *************************************************************
&' End ToolTip Library
&' *************************************************************
&'

Chris Boss

  • Administrator
  • Jr. Member
  • *****
  • Posts: 60
    • View Profile
Re: test posts
« Reply #2 on: January 11, 2022, 03:55:04 pm »
The key code for implimenting the autoresizing of controls, is done in the forms event code like this:

Code: [Select]
SUB FORM1_Events(CID&, CMsg&, CVal&, Cancel&)
         SELECT CASE CID&
                    CASE %EZ_Window
                             SELECT CASE CMsg&
                                        CASE %EZ_Loading
                                        CASE %EZ_Loaded
                                                 EZ_InitRTForm "Form1"
                                        CASE %EZ_Started
                                        CASE %EZ_Size
                                                 EZ_ResizeRTForm "Form1"
                                        CASE %EZ_Close
                                                 EZ_FreeRTForm "Form1"
                                        CASE ELSE
                             END SELECT
                    CASE ELSE
         END SELECT
END SUB

Notice the three calls made:

EZ_InitRTForm
EZ_ResizeRTForm
EZ_FreeRTForm

There is one other routine (which I don't currently use) which is:

EZ_SetRT FormName$, ID&, RFlagVal&

This is used to change the resize table flag for how to resize the control. Currently the flag is set to 1, by default, which scales the control.

If you want to add other options to the library, simply add new flag values to the EZ_ResizeRTForm command in the select case structure. Then use EZ_SetRT to change the values manually in your code for any controls you need.

This is a start for others to build upon.

By working together on an open source library, a more advanced version can be created that all can benefit from.

Chris Boss

  • Administrator
  • Jr. Member
  • *****
  • Posts: 60
    • View Profile
Re: test posts
« Reply #3 on: January 11, 2022, 03:57:08 pm »
 I added a little more code here to parse out the events for the page form embeded on the printer dialog. In my example above, I didn't need to process any events for the custom controls added. If you need to process events for the controls, then you need to add a subroutine for its events.

Here is an example:

Code: [Select]
' Portions: Copyright Christopher R. Boss, 2003 to 2006 , All Rights Reserved !
' Registered EZGUI 4.0 users may use this code Royalty Free !

'
' ======================================
' [PROTECTED CODE]         Do NOT Edit !
' ======================================
'
#COMPILE EXE
#DIM ALL        '   This is helpful to prevent errors in coding
#INCLUDE "C:\\ezgui40pro\\includes\\ezgui40.inc"                          ' EZGUI Include file for Declares
'
DECLARE FUNCTION Main_Initialize(BYVAL VerNum&) AS LONG
DECLARE SUB OtherForm_Events(FormName$, CID&, CMsg&, CVal&, Cancel&)
DECLARE SUB OtherForm_Design(FormName$)
DECLARE SUB EZ_FORM1_Display(BYVAL Parent$)
DECLARE SUB EZ_FORM1_Design()
DECLARE SUB EZ_FORM1_ParseEvents(CID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_Events(CID&, CMsg&, CVal&, Cancel&)
'
%FORM1_BUTTON1            = 100
'
DECLARE SUB FORM1_BUTTON1_Events(MyID&, CMsg&, CVal&, Cancel&)
'
#INCLUDE "C:\\ezgui40pro\\includes\\ezwmain.inc"                          ' EZGUI Include file for WinMain
'
SUB EZ_Main(VerNum&)     ' (PROTECTED)
     EZ_Reg %EZ_CUSTID,%EZ_REGNUM
     EZ_DefImageFolder "Graphics"
     EZ_AllowCommandEvents  0
     EZ_DefFont 6, "Arial", 10, "V"
     EZ_DefFont 7, "Courier New", 10, "F"
     EZ_DefFont 8, "Times New Roman", 10, "V"
     EZ_DefFont 9, "Modern", 10, "V"
     EZ_DefSystemColor 32, 4
     EZ_DefSystemColor 33, 5
     EZ_DefSystemColor 34, 15
     EZ_DefSystemColor 35, 24
     EZ_DefColorL 36, &HB96FFF
     EZ_DefColorL 37, &H14AB9F
     EZ_DefColorL 38, &H47A7FF
     EZ_DefColorL 39, &HD2AACF
     EZ_DefColorL 40, &H1CD5E3
     EZ_DefColorL 41, &HBC8943
     EZ_DefColorL 42, &H6C6AB7
     EZ_DefColorL 43, &HDD4489
     IF Main_Initialize(VerNum&) THEN
          EZ_FORM1_Display ""
     END IF
END SUB
'
SUB EZ_DesignWindow(FormName$)     ' (PROTECTED)
     SELECT CASE FormName$
          CASE "FORM1"
               EZ_FORM1_Design
          CASE ELSE
               OtherForm_Design FormName$
     END SELECT
END SUB
'
SUB EZ_Events(FormName$, CID&, CMsg&, CVal&, Cancel&)     ' (PROTECTED)
     SELECT CASE FormName$
          CASE "FORM1"
               EZ_FORM1_ParseEvents CID&, CMsg&, CVal&, Cancel&
          CASE ELSE
               OtherForm_Events FormName$, CID&, CMsg&, CVal&, Cancel&
     END SELECT
END SUB
'
' ======================================
' [USER ACCESSABLE CODE]  You may Edit !
' ======================================
'
FUNCTION Main_Initialize(BYVAL VerNum&) AS LONG
     LOCAL RV&
     RV&=1
     FUNCTION=RV&
END FUNCTION
'
'<<SAVE>>
SUB PRNTPAGE_Design()
     LOCAL W!, H!, FM$
     FM$=&quot;PRNTPAGE&quot;
     EZ_GetSize FM$, W!, H!,0
     EZ_UseFont 4
     EZ_Radio 150, 1,1,20,1.25, &quot;Use Bold Face Font!&quot;, &quot;T&quot;
     EZ_Frame 100, 0,0,W!,H!,&quot;Custom Settings&quot;, &quot;&quot;
END SUB
'
SUB PRNTPAGE_Events(BYVAL CID&, BYVAL CMsg&, CVal&, Cancel&)
     ' add your control events here!
     SELECT CASE CID&
          CASE ELSE
     END SELECT
END SUB
'<<END>>
'
SUB OtherForm_Design(FormName$)
     SELECT CASE FormName$
          CASE &quot;PRNTPAGE&quot;
               PRNTPAGE_Design
          CASE ELSE
     END SELECT
END SUB
'
'<<SAVE>>
' =======================================================================
%PR_CancelID   =    2
%PR_OKID       =    1
'
SUB AddControlsToDlg()
     LOCAL W!, H!, FM$
     FM$=&quot;{PRINTDLG}&quot;
     EZ_GetSize FM$, W!, H!, 0
     EZ_ExpandForm FM$, 0, 4
     EZ_CenterForm &quot;&quot;, FM$,0
     EZ_MoveControls FM$, &quot;1,2&quot;, 0, EZ_Y(4)
     EZ_Form &quot;PRNTPAGE&quot;, FM$, &quot;&quot;, 1, H!-2.75,W!-2, 4,&quot;P&quot;
END SUB
'
GLOBAL PRNT_FontBoldFlag&
'
SUB CustomPrinterDlgEvents(BYVAL CID&, BYVAL CMsg&, CVal&, Cancel&)
     SELECT CASE CID&
          CASE %EZ_Window
               SELECT CASE CMsg&
                    CASE %EZ_Loaded
                         PRNT_FontBoldFlag&=0     ' set global flag before dialog
                         AddControlsToDlg

               END SELECT
          CASE 1    ' OK Button
               IF CMsg&=%EZ_Click THEN
                    IF EZ_GetCheck(&quot;PRNTPAGE&quot;,150) THEN PRNT_FontBoldFlag&=1
               END IF
          CASE ELSE
     END SELECT
END SUB
' =======================================================================
'<<END>>
'
SUB OtherForm_Events(FormName$, CID&, CMsg&, CVal&, Cancel&)
     SELECT CASE FormName$
          ' =======================================================================
          CASE &quot;{PRINTDLG}&quot;
               CustomPrinterDlgEvents CID&, CMsg&, CVal&, Cancel&
          CASE &quot;PRNTPAGE&quot;
               PRNTPAGE_Events CID&, CMsg&, CVal&, Cancel&
          ' =======================================================================
          CASE ELSE
     END SELECT
END SUB
'
'<<BEGINFORM>> &quot;FORM1&quot;
'
' ======================================
' [PROTECTED CODE]         Do NOT Edit !
' ======================================
'
SUB EZ_FORM1_Display(BYVAL Parent$)     ' (PROTECTED)
     EZ_Color -1, -1
     EZ_Form &quot;FORM1&quot;, Parent$, &quot;Your Dialog&quot;, 0, 0, 50, 18, &quot;C&quot;
END SUB
'
SUB EZ_FORM1_Design()     ' (PROTECTED)
     LOCAL CText$
     EZ_Color-1,-1
     EZ_UseFont 4
     EZ_Button %FORM1_BUTTON1, 4, 5, 40, 6, &quot;Display Customized Printer Dialog&quot;, &quot;T&quot;
END SUB
'
SUB EZ_FORM1_ParseEvents(CID&, CMsg&, CVal&, Cancel&)     ' (PROTECTED)
     SELECT CASE CID&
          CASE %EZ_Window
               FORM1_Events CID&, CMsg&, CVal&, Cancel&
          CASE  %FORM1_BUTTON1
               FORM1_BUTTON1_Events CID&, CMsg&, CVal&, Cancel&
          CASE ELSE
               FORM1_Events CID&, CMsg&, CVal&, Cancel&
     END SELECT
END SUB
'
' ======================================
' [USER ACCESSABLE CODE]  You may Edit !
' ======================================
'
SUB FORM1_Events(CID&, CMsg&, CVal&, Cancel&)
     SELECT CASE CID&
          CASE %EZ_Window
               SELECT CASE CMsg&
                    CASE %EZ_Loading
                    CASE %EZ_Loaded
                    CASE %EZ_Started
                    CASE %EZ_Close
                    CASE ELSE
               END SELECT
          CASE ELSE
     END SELECT
END SUB
'
'<<SAVE>>
$MAIN   =   &quot;FORM1&quot;

SUB PrintAPage()
    LOCAL Horz&, Vert&, tWid!, tHgt!
    LOCAL EZP AS EZPRINTER
    LOCAL D$, N&, I&
    EZP.PrintWhat=1
    EZP.AllowPages=1
    EZP.AllowSelection=0
    EZP.CollateFlag=0
    EZP.FromPage=1
    EZP.ToPage=1
    EZP.MinPage=1
    EZP.MaxPage=1
    EZP.PUnits=1
    ' new stuff for custom selection of printer
'    EZP.PrnName=EZ_GetPrinter(1)
'    EZP.PrnNameSetup=2
    EZP.PrnPaperSize=1         ' letter size
    EZP.PrnOrientation=2
    EZP.PrnQuality=4
    EZP.PrnVerifyName=1
    IF EZ_ChoosePrinter($MAIN, EZP) THEN
        EZ_Color -1,-1  ' you can set the color for the Abort Dialog here
        EZ_StartDoc &quot;My Document 1&quot;  ' Auto. displays Abort Dialog
        FOR N&=1 TO 2
            IF N&=2 THEN
                EZP.PrnPaperSize=0
                EZP.PrnQuality=0
                EZP.PrnOrientation=2
                EZP.PrnPaperWidth=0
                EZP.PrnPaperLength=0
                EZP.PrnBin=0
                EZP.PrnColor=0
                EZ_SetPageAttr EZP
            END IF
            EZ_StartPage    ' EZP updated after here
            IF PRNT_FontBoldFlag& THEN
                 EZ_DefFont 51, &quot;Courier New&quot;, 48, &quot;PB&quot;       ' define a printer font
            ELSE
                 EZ_DefFont 51, &quot;Courier New&quot;, 48, &quot;P&quot;       ' define a printer font
            END IF
            Horz&=0
            Vert&=0
            EZ_Color 0, 31
            EZ_UseFont 51
            EZ_GetTextSize 51, &quot;X&quot;, tWid!, tHgt!, 2
            FOR I&=1 TO 3
                EZ_LPrint Horz&, Vert&, &quot;This is line&quot;+STR$(I&)
                Vert& = Vert& + tHgt!
            NEXT I&
            EZ_FreeFont 51
            EZ_EndPage
        NEXT N&
        EZ_EndDoc        ' Automatically Unloads the Abort Dialog
        EZ_SetForm &quot;FORM1&quot;, 1
    ELSE

    END IF
END SUB
'<<END>>

SUB FORM1_BUTTON1_Events( MyID&, CMsg&, CVal&, Cancel&)
     SELECT CASE CMsg&
          CASE %EZ_Click
               PrintAPage
          CASE ELSE
     END SELECT
END SUB
'
'<<END ALL FORMS>>    UnKnown Routines follow:
#IF %EZ_NOSKIPCODE
#ENDIF 'PARSE END
'

Chris Boss

  • Administrator
  • Jr. Member
  • *****
  • Posts: 60
    • View Profile
Re: test posts
« Reply #4 on: January 11, 2022, 04:00:03 pm »
 
Code: [Select]
' sample application which uses ezresize.inc
'
' Portions: Copyright Christopher R. Boss, 2003 to 2006 , All Rights Reserved !
' Registered EZGUI 4.0 users may use this code Royalty Free !

'
' ======================================
' [PROTECTED CODE]         Do NOT Edit !
' ======================================
'
#COMPILE EXE
#DIM ALL        '   This is helpful to prevent errors in coding
#INCLUDE "C:\\ezgui40pro\\includes\\ezgui40.inc"                          ' EZGUI Include file for Declares
#INCLUDE "C:\\ezgui40pro\\includes\\ezresize.inc"
'
DECLARE FUNCTION Main_Initialize(BYVAL VerNum&) AS LONG
DECLARE SUB EZ_FORM1_Display(BYVAL Parent$)
DECLARE SUB EZ_FORM1_Design()
DECLARE SUB EZ_FORM1_ParseEvents(CID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_Events(CID&, CMsg&, CVal&, Cancel&)
'
%FORM1_BUTTON1            = 100
%FORM1_BUTTON2            = 105
%FORM1_BUTTON3            = 110
%FORM1_BUTTON4            = 115
%FORM1_LISTVIEW1          = 120
%FORM1_LISTVIEW2          = 125
%FORM1_COMBOBOX1          = 130
%FORM1_LISTBOX1           = 135
'
DECLARE SUB FORM1_BUTTON1_Events(MyID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_BUTTON2_Events(MyID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_BUTTON3_Events(MyID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_BUTTON4_Events(MyID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_LISTVIEW1_Fill(BYVAL Mode&)
DECLARE SUB FORM1_LISTVIEW1_Events(MyID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_LISTVIEW2_Fill(BYVAL Mode&)
DECLARE SUB FORM1_LISTVIEW2_Events(MyID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_COMBOBOX1_Events(MyID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_LISTBOX1_Events(MyID&, CMsg&, CVal&, Cancel&)
'
#INCLUDE "C:\\ezgui40pro\\includes\\ezwmain.inc"                          ' EZGUI Include file for WinMain
'
SUB EZ_Main(VerNum&)     ' (PROTECTED)
     EZ_Reg %EZ_CUSTID,%EZ_REGNUM
     EZ_DefImageFolder "Graphics"
     EZ_AllowCommandEvents  0
     EZ_DefFont 6, "Arial", 10, "V"
     EZ_DefFont 7, "Courier New", 10, "F"
     EZ_DefFont 8, "Times New Roman", 10, "V"
     EZ_DefFont 9, "Modern", 10, "V"
     EZ_DefSystemColor 32, 4
     EZ_DefSystemColor 33, 5
     EZ_DefSystemColor 34, 15
     EZ_DefSystemColor 35, 24
     EZ_DefColorL 36, &HB96FFF
     EZ_DefColorL 37, &H14AB9F
     EZ_DefColorL 38, &H47A7FF
     EZ_DefColorL 39, &HD2AACF
     EZ_DefColorL 40, &H1CD5E3
     EZ_DefColorL 41, &HBC8943
     EZ_DefColorL 42, &H6C6AB7
     EZ_DefColorL 43, &HDD4489
     IF Main_Initialize(VerNum&) THEN
          EZ_FORM1_Display ""
     END IF
END SUB
'
SUB EZ_DesignWindow(FormName$)     ' (PROTECTED)
     SELECT CASE FormName$
          CASE "FORM1"
               EZ_FORM1_Design
          CASE ELSE
     END SELECT
END SUB
'
SUB EZ_Events(FormName$, CID&, CMsg&, CVal&, Cancel&)     ' (PROTECTED)
     SELECT CASE FormName$
          CASE "FORM1"
               EZ_FORM1_ParseEvents CID&, CMsg&, CVal&, Cancel&
          CASE ELSE
     END SELECT
END SUB
'
' ======================================
' [USER ACCESSABLE CODE]  You may Edit !
' ======================================
'
FUNCTION Main_Initialize(BYVAL VerNum&) AS LONG
     LOCAL RV&
     RV&=1
     FUNCTION=RV&
END FUNCTION
'
'<<BEGINFORM>> "FORM1"
'
' ======================================
' [PROTECTED CODE]         Do NOT Edit !
' ======================================
'
SUB EZ_FORM1_Display(BYVAL Parent$)     ' (PROTECTED)
     EZ_Color -1, -1
     EZ_Form "FORM1", Parent$, "Auto Resize Demo", 0, 0, 83, 29, "CZ"
END SUB
'
SUB EZ_FORM1_Design()     ' (PROTECTED)
     LOCAL CText$
     EZ_Color-1,-1
     EZ_UseFont 4
     EZ_Button %FORM1_BUTTON1, 4, 2, 16, 2, "Button  1", "T"
     EZ_Color-1,-1
     EZ_UseFont 4
     EZ_Button %FORM1_BUTTON2, 24, 2, 16, 2, "Button  2", "T"
     EZ_Color-1,-1
     EZ_UseFont 4
     EZ_Button %FORM1_BUTTON3, 43, 2, 16, 2, "Button  3", "T"
     EZ_Color-1,-1
     EZ_UseFont 4
     EZ_Button %FORM1_BUTTON4, 63, 2, 16, 2, "Button  4", "T"
     EZ_Color-1,-1
     EZ_UseFont 4
     EZ_ListView %FORM1_LISTVIEW1, 4, 14, 37, 14, "Column 1{15}|Column 2{15}{C}|Column 3{15}{R}|", "SVT"
     FORM1_LISTVIEW1_Fill -1
     EZ_Color-1,-1
     EZ_UseFont 4
     EZ_ListView %FORM1_LISTVIEW2, 41, 14, 39, 14, "Column 1{15}|Column 2{15}{C}|Column 3{15}{R}|", "SVT"
     FORM1_LISTVIEW2_Fill -1
     EZ_Color-1,-1
     EZ_UseFont 4
     EZ_ComboBox %FORM1_COMBOBOX1, 4, 12, 76, 9, "Item 1|Item 2|Item 3|Item 4|Item 5|", "SAVT"
     EZ_SelectItem "Form1", %FORM1_COMBOBOX1, 0
     EZ_Color-1,-1
     EZ_UseFont 4
     EZ_ListBox %FORM1_LISTBOX1, 4, 5, 75, 6, "Item 1|Item 2|Item 3|Item 4|Item 5|Item 6|Item 7|Item 8|Item 9|Item 10|Item 11|Item 12", "STV"
END SUB
'
SUB EZ_FORM1_ParseEvents(CID&, CMsg&, CVal&, Cancel&)     ' (PROTECTED)
     SELECT CASE CID&
          CASE %EZ_Window
               FORM1_Events CID&, CMsg&, CVal&, Cancel&
          CASE  %FORM1_BUTTON1
               FORM1_BUTTON1_Events CID&, CMsg&, CVal&, Cancel&
          CASE  %FORM1_BUTTON2
               FORM1_BUTTON2_Events CID&, CMsg&, CVal&, Cancel&
          CASE  %FORM1_BUTTON3
               FORM1_BUTTON3_Events CID&, CMsg&, CVal&, Cancel&
          CASE  %FORM1_BUTTON4
               FORM1_BUTTON4_Events CID&, CMsg&, CVal&, Cancel&
          CASE  %FORM1_LISTVIEW1
               FORM1_LISTVIEW1_Events CID&, CMsg&, CVal&, Cancel&
          CASE  %FORM1_LISTVIEW2
               FORM1_LISTVIEW2_Events CID&, CMsg&, CVal&, Cancel&
          CASE  %FORM1_COMBOBOX1
               FORM1_COMBOBOX1_Events CID&, CMsg&, CVal&, Cancel&
          CASE  %FORM1_LISTBOX1
               FORM1_LISTBOX1_Events CID&, CMsg&, CVal&, Cancel&
          CASE ELSE
               FORM1_Events CID&, CMsg&, CVal&, Cancel&
     END SELECT
END SUB
'
' ======================================
' [USER ACCESSABLE CODE]  You may Edit !
' ======================================
'
SUB FORM1_Events(CID&, CMsg&, CVal&, Cancel&)
     SELECT CASE CID&
          CASE %EZ_Window
               SELECT CASE CMsg&
                    CASE %EZ_Loading
                    CASE %EZ_Loaded
                         EZ_InitRTForm "Form1"
                    CASE %EZ_Started
                    CASE %EZ_Size
                         EZ_ResizeRTForm "Form1"
                    CASE %EZ_Close
                         EZ_FreeRTForm "Form1"
                    CASE ELSE
               END SELECT
          CASE ELSE
     END SELECT
END SUB
'
SUB FORM1_BUTTON1_Events( MyID&, CMsg&, CVal&, Cancel&)
     SELECT CASE CMsg&
          CASE %EZ_Click
          CASE ELSE
     END SELECT
END SUB
'
SUB FORM1_BUTTON2_Events( MyID&, CMsg&, CVal&, Cancel&)
     SELECT CASE CMsg&
          CASE %EZ_Click
          CASE ELSE
     END SELECT
END SUB
'
SUB FORM1_BUTTON3_Events( MyID&, CMsg&, CVal&, Cancel&)
     SELECT CASE CMsg&
          CASE %EZ_Click
          CASE ELSE
     END SELECT
END SUB
'
SUB FORM1_BUTTON4_Events( MyID&, CMsg&, CVal&, Cancel&)
     SELECT CASE CMsg&
          CASE %EZ_Click
          CASE ELSE
     END SELECT
END SUB
'
SUB FORM1_LISTVIEW1_Fill(BYVAL Mode&)
END SUB
'
SUB FORM1_LISTVIEW1_Events( MyID&, CMsg&, CVal&, Cancel&)
     SELECT CASE CMsg&
          CASE %EZ_Selected
          CASE ELSE
     END SELECT
END SUB
'
SUB FORM1_LISTVIEW2_Fill(BYVAL Mode&)
END SUB
'
SUB FORM1_LISTVIEW2_Events( MyID&, CMsg&, CVal&, Cancel&)
     SELECT CASE CMsg&
          CASE %EZ_Selected
          CASE ELSE
     END SELECT
END SUB
'
SUB FORM1_COMBOBOX1_Events( MyID&, CMsg&, CVal&, Cancel&)
     SELECT CASE CMsg&
          CASE %EZ_Change
          CASE ELSE
     END SELECT
END SUB
'
SUB FORM1_LISTBOX1_Events( MyID&, CMsg&, CVal&, Cancel&)
     SELECT CASE CMsg&
          CASE %EZ_Change
          CASE ELSE
     END SELECT
END SUB
'
'<<END ALL FORMS>>    UnKnown Routines follow:
#IF %EZ_NOSKIPCODE
#ENDIF 'PARSE END
'


Chris Boss

  • Administrator
  • Jr. Member
  • *****
  • Posts: 60
    • View Profile
Re: test posts
« Reply #5 on: January 11, 2022, 04:03:54 pm »
I am getting there little by little!

I cut out of the SQL database for the old forum just the posts. I then created an app to help me convert each post one at a time.

I attached a screenshot of the app I am building.

Chris Boss

  • Administrator
  • Jr. Member
  • *****
  • Posts: 60
    • View Profile
Re: test posts
« Reply #6 on: January 11, 2022, 04:10:29 pm »
 Test program for use with new library code:

Code: [Select]
' sample application which uses ezresize.inc
'
' Portions: Copyright Christopher R. Boss, 2003 to 2006 , All Rights Reserved !
' Registered EZGUI 4.0 users may use this code Royalty Free !

'
' ======================================
' [PROTECTED CODE]         Do NOT Edit !
' ======================================
'
#COMPILE EXE
#DIM ALL        '   This is helpful to prevent errors in coding
#INCLUDE "C:\ezgui40pro\includes\ezgui40.inc"                          ' EZGUI Include file for Declares
#INCLUDE "C:\ezgui40pro\includes\ezresize.inc"
'
DECLARE FUNCTION Main_Initialize(BYVAL VerNum&) AS LONG
DECLARE SUB EZ_FORM1_Display(BYVAL Parent$)
DECLARE SUB EZ_FORM1_Design()
DECLARE SUB EZ_FORM1_ParseEvents(CID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_Events(CID&, CMsg&, CVal&, Cancel&)
'
%FORM1_BUTTON1            = 100
%FORM1_BUTTON2            = 105
%FORM1_BUTTON3            = 110
%FORM1_BUTTON4            = 115
%FORM1_LISTVIEW1          = 120
%FORM1_LISTVIEW2          = 125
%FORM1_COMBOBOX1          = 130
%FORM1_LISTBOX1           = 135
'
DECLARE SUB FORM1_BUTTON1_Events(MyID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_BUTTON2_Events(MyID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_BUTTON3_Events(MyID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_BUTTON4_Events(MyID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_LISTVIEW1_Fill(BYVAL Mode&)
DECLARE SUB FORM1_LISTVIEW1_Events(MyID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_LISTVIEW2_Fill(BYVAL Mode&)
DECLARE SUB FORM1_LISTVIEW2_Events(MyID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_COMBOBOX1_Events(MyID&, CMsg&, CVal&, Cancel&)
DECLARE SUB FORM1_LISTBOX1_Events(MyID&, CMsg&, CVal&, Cancel&)
'
#INCLUDE "C:\ezgui40pro\includes\ezwmain.inc"                          ' EZGUI Include file for WinMain
'
SUB EZ_Main(VerNum&)     ' (PROTECTED)
     EZ_Reg %EZ_CUSTID,%EZ_REGNUM
     EZ_DefImageFolder "Graphics"
     EZ_AllowCommandEvents  0
     EZ_DefFont 6, "Arial", 10, "V"
     EZ_DefFont 7, "Courier New", 10, "F"
     EZ_DefFont 8, "Times New Roman", 10, "V"
     EZ_DefFont 9, "Modern", 10, "V"
     EZ_DefSystemColor 32, 4
     EZ_DefSystemColor 33, 5
     EZ_DefSystemColor 34, 15
     EZ_DefSystemColor 35, 24
     EZ_DefColorL 36, &HB96FFF
     EZ_DefColorL 37, &H14AB9F
     EZ_DefColorL 38, &H47A7FF
     EZ_DefColorL 39, &HD2AACF
     EZ_DefColorL 40, &H1CD5E3
     EZ_DefColorL 41, &HBC8943
     EZ_DefColorL 42, &H6C6AB7
     EZ_DefColorL 43, &HDD4489
     IF Main_Initialize(VerNum&) THEN
          EZ_FORM1_Display ""
     END IF
END SUB
'
SUB EZ_DesignWindow(FormName$)     ' (PROTECTED)
     SELECT CASE FormName$
          CASE "FORM1"
               EZ_FORM1_Design
          CASE ELSE
     END SELECT
END SUB
'
SUB EZ_Events(FormName$, CID&, CMsg&, CVal&, Cancel&)     ' (PROTECTED)
     SELECT CASE FormName$
          CASE "FORM1"
               EZ_FORM1_ParseEvents CID&, CMsg&, CVal&, Cancel&
          CASE ELSE
     END SELECT
END SUB
'
' ======================================
' [USER ACCESSABLE CODE]  You may Edit !
' ======================================
'
FUNCTION Main_Initialize(BYVAL VerNum&) AS LONG
     LOCAL RV&
     RV&=1
     FUNCTION=RV&
END FUNCTION
'
'<<BEGINFORM>> "FORM1"
'
' ======================================
' [PROTECTED CODE]         Do NOT Edit !
' ======================================
'
SUB EZ_FORM1_Display(BYVAL Parent$)     ' (PROTECTED)
     EZ_Color -1, -1
     EZ_Form "FORM1", Parent$, "Auto Resize Demo", 0, 0, 83, 29, "CZ"
END SUB
'
SUB EZ_FORM1_Design()     ' (PROTECTED)
     LOCAL CText$
     EZ_Color-1,-1
     EZ_UseFont 4
     EZ_Button %FORM1_BUTTON1, 4, 2, 16, 2, "Button  1", "T"
     EZ_Color-1,-1
     EZ_UseFont 4
     EZ_Button %FORM1_BUTTON2, 24, 2, 16, 2, "Button  2", "T"
     EZ_Color-1,-1
     EZ_UseFont 4
     EZ_Button %FORM1_BUTTON3, 43, 2, 16, 2, "Button  3", "T"
     EZ_Color-1,-1
     EZ_UseFont 4
     EZ_Button %FORM1_BUTTON4, 63, 2, 16, 2, "Button  4", "T"
     EZ_Color-1,-1
     EZ_UseFont 4
     EZ_ListView %FORM1_LISTVIEW1, 4, 14, 37, 14, "Column 1{15}|Column 2{15}{C}|Column 3{15}{R}|", "SVT"
     FORM1_LISTVIEW1_Fill -1
     EZ_Color-1,-1
     EZ_UseFont 4
     EZ_ListView %FORM1_LISTVIEW2, 41, 14, 39, 14, "Column 1{15}|Column 2{15}{C}|Column 3{15}{R}|", "SVT"
     FORM1_LISTVIEW2_Fill -1
     EZ_Color-1,-1
     EZ_UseFont 4
     EZ_ComboBox %FORM1_COMBOBOX1, 4, 12, 76, 9, "Item 1|Item 2|Item 3|Item 4|Item 5|", "SAVT"
     EZ_SelectItem "Form1", %FORM1_COMBOBOX1, 0
     EZ_Color-1,-1
     EZ_UseFont 4
     EZ_ListBox %FORM1_LISTBOX1, 4, 5, 75, 6, "Item 1|Item 2|Item 3|Item 4|Item 5|Item 6|Item 7|Item 8|Item 9|Item 10|Item 11|Item 12", "STV"
END SUB
'
SUB EZ_FORM1_ParseEvents(CID&, CMsg&, CVal&, Cancel&)     ' (PROTECTED)
     SELECT CASE CID&
          CASE %EZ_Window
               FORM1_Events CID&, CMsg&, CVal&, Cancel&
          CASE  %FORM1_BUTTON1
               FORM1_BUTTON1_Events CID&, CMsg&, CVal&, Cancel&
          CASE  %FORM1_BUTTON2
               FORM1_BUTTON2_Events CID&, CMsg&, CVal&, Cancel&
          CASE  %FORM1_BUTTON3
               FORM1_BUTTON3_Events CID&, CMsg&, CVal&, Cancel&
          CASE  %FORM1_BUTTON4
               FORM1_BUTTON4_Events CID&, CMsg&, CVal&, Cancel&
          CASE  %FORM1_LISTVIEW1
               FORM1_LISTVIEW1_Events CID&, CMsg&, CVal&, Cancel&
          CASE  %FORM1_LISTVIEW2
               FORM1_LISTVIEW2_Events CID&, CMsg&, CVal&, Cancel&
          CASE  %FORM1_COMBOBOX1
               FORM1_COMBOBOX1_Events CID&, CMsg&, CVal&, Cancel&
          CASE  %FORM1_LISTBOX1
               FORM1_LISTBOX1_Events CID&, CMsg&, CVal&, Cancel&
          CASE ELSE
               FORM1_Events CID&, CMsg&, CVal&, Cancel&
     END SELECT
END SUB
'
' ======================================
' [USER ACCESSABLE CODE]  You may Edit !
' ======================================
'
SUB FORM1_Events(CID&, CMsg&, CVal&, Cancel&)
     SELECT CASE CID&
          CASE %EZ_Window
               SELECT CASE CMsg&
                    CASE %EZ_Loading
                    CASE %EZ_Loaded
                         LOCAL W!, H!
                         EZ_GetSize "Form1", W!, H!, 0
                         EZ_SetFormMinMax "Form1", W!, H!, 999,999
                         EZ_InitRTForm "Form1", "BUTTON", 3
                         EZ_InitRTForm "Form1", "<>BUTTON", 1
                         EZ_SetRT "Form1", %FORM1_LISTBOX1, 4
                    CASE %EZ_Started
                    CASE %EZ_Size
                         EZ_ResizeRTForm "Form1"
                    CASE %EZ_Close
                         EZ_FreeRTForm "Form1"
                    CASE ELSE
               END SELECT
          CASE ELSE
     END SELECT
END SUB
'
SUB FORM1_BUTTON1_Events( MyID&, CMsg&, CVal&, Cancel&)
     SELECT CASE CMsg&
          CASE %EZ_Click
          CASE ELSE
     END SELECT
END SUB
'
SUB FORM1_BUTTON2_Events( MyID&, CMsg&, CVal&, Cancel&)
     SELECT CASE CMsg&
          CASE %EZ_Click
          CASE ELSE
     END SELECT
END SUB
'
SUB FORM1_BUTTON3_Events( MyID&, CMsg&, CVal&, Cancel&)
     SELECT CASE CMsg&
          CASE %EZ_Click
          CASE ELSE
     END SELECT
END SUB
'
SUB FORM1_BUTTON4_Events( MyID&, CMsg&, CVal&, Cancel&)
     SELECT CASE CMsg&
          CASE %EZ_Click
          CASE ELSE
     END SELECT
END SUB
'
SUB FORM1_LISTVIEW1_Fill(BYVAL Mode&)
END SUB
'
SUB FORM1_LISTVIEW1_Events( MyID&, CMsg&, CVal&, Cancel&)
     SELECT CASE CMsg&
          CASE %EZ_Selected
          CASE ELSE
     END SELECT
END SUB
'
SUB FORM1_LISTVIEW2_Fill(BYVAL Mode&)
END SUB
'
SUB FORM1_LISTVIEW2_Events( MyID&, CMsg&, CVal&, Cancel&)
     SELECT CASE CMsg&
          CASE %EZ_Selected
          CASE ELSE
     END SELECT
END SUB
'
SUB FORM1_COMBOBOX1_Events( MyID&, CMsg&, CVal&, Cancel&)
     SELECT CASE CMsg&
          CASE %EZ_Change
          CASE ELSE
     END SELECT
END SUB
'
SUB FORM1_LISTBOX1_Events( MyID&, CMsg&, CVal&, Cancel&)
     SELECT CASE CMsg&
          CASE %EZ_Change
          CASE ELSE
     END SELECT
END SUB
'
'<<END ALL FORMS>>    UnKnown Routines follow:
#IF %EZ_NOSKIPCODE
#ENDIF 'PARSE END
'
« Last Edit: January 11, 2022, 04:12:06 pm by Chris Boss »