Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Chris Gaskell

Pages: [1]
1
General Discussion / Re: Powerbasic Website Demise
« on: August 26, 2024, 07:54:43 am »
I can understand what you mean. Perhaps, if you have time (or indeed feel like it) you could organise a poll to see what computer languages for using EZGUI would like or prefer to see.
I still have to maintain VB6 programs, and I will do so as long as possible. I used PB because it eliminated the use of ActiveX ( a problem when these companies disappeared and the activation would no longer work) and EZGUI made the design of user interfaces so much easier. I have experimented and am experimenting with EZGUI.
I am currently creating a simple game. I realise that EZGUI is not designed for game creation, but the Sprite movement etc, is great, and I enjoy experimenting.
Whatever happens, Chris, I wish you well.

Chris Gaskell

2
Advanced EZGUI / Number Component
« on: July 15, 2024, 06:41:08 am »
Attached is the source code that I wrote as an example of my understanding of making a component. It's a text or edit box that accepts only numbers, and only accepts one decimal point.
I'm sure everyone can improve on it.

The dll code is :
*******************************************************
#DIM ALL

#COMPILE DLL "V6NOBOX.DLL"
#INCLUDE "C:\ezgui50pro\includes\ezgui50.inc"
#IF NOT %DEF(%WINAPI)
    #INCLUDE "win32api.inc"                        'add win32api if not already added
#ENDIF

FUNCTION LIBMAIN (BYVAL hInst&, BYVAL FReason&, BYVAL lpR&) AS LONG
      SELECT CASE FReason&
          CASE 0      ' %DLL_PROCESS_DETACH
          CASE 1      ' %DLL_PROCESS_ATTACH
          CASE 2      ' %DLL_THREAD_ATTACH
          CASE 3      ' %DLL_THREAD_DETACH
          CASE ELSE
     END SELECT
     FUNCTION=1
END FUNCTION
    ' Component include file!
   #INCLUDE "C:\ezgui50pro\components\V99frmNo.bas"

SUB EZ_InitComponent(BYVAL CMPPrefix$) EXPORT

     EZ_NOBOX_InitComponent CMPPrefix$

END SUB

***************************************************

The component code is as follows:

' *************************************************************************************
'                    Code Generated by EZGUI Professional Visual Designer 5.0
'           Portions: Copyright Christopher R. Boss, 2003 to 2011 All Rights Reserved !
'              Registered EZGUI 5.0 users may use generated code Royalty Free !
' *************************************************************************************
'
' -----------------------------------------------------------------------------------------
'            WARNING !    Do Not Modify any code WITHIN Protected Sections !
' You can add code (Sub,Function,etc.) BEFORE any Protected Routine by using the following
' CODE TAGS:        '<<SAVE>>      '<<END>>            and the Designer will not remove it.
' -----------------------------------------------------------------------------------------
'

' ======================================
' [PROTECTED CODE]         Do NOT Edit !
' ======================================

DECLARE SUB EZ_NOBOX_InitComponent(BYVAL CMPPrefix$)
DECLARE SUB EZ_NOBOX_Design()
DECLARE SUB EZ_NOBOX_ParseEvents(CID&, CMsg&, CVal&, Cancel&)
DECLARE SUB NOBOX_Events(CID&, CMsg&, CVal&, Cancel&)
%NOBOX_Width = 50
%NOBOX_Height = 2
' ------------------------------------------------

%NOBOX_TXTNO              = 100

DECLARE SUB NOBOX_TXTNO_Events(MyID&, CMsg&, CVal&, Cancel&)
DECLARE SUB NOBOX_TXTNO_SubClass(BYVAL CVal&, Cancel&)

'<<BEGINFORM>> "NOBOX"


' ======================================
' [PROTECTED CODE]         Do NOT Edit !
' ======================================

SUB EZ_NOBOX_InitComponent(BYVAL CMPPrefix$)     ' (PROTECTED)
     EZ_DefComponent CMPPrefix$+"NOBOX", "||NOBOX.bas", CODEPTR(EZ_NOBOX_Design), CODEPTR(EZ_NOBOX_ParseEvents)
END SUB

SUB EZ_NOBOX_Design()     ' (PROTECTED)
     LOCAL CText$
     EZ_Color-1,-1
     EZ_UseFont 4
     EZ_SubClass 2
     EZ_Text %NOBOX_TXTNO, 0, 0, 20, 2, "", ">EST"
     EZ_SubClass 0
     ' -----------------------------------------------
END SUB


SUB EZ_NOBOX_ParseEvents(CID&, CMsg&, CVal&, Cancel&)     ' (PROTECTED)
     SELECT CASE CID&
          CASE %EZ_Window
               NOBOX_Events CID&, CMsg&, CVal&, Cancel&
          CASE  %NOBOX_TXTNO
               NOBOX_TXTNO_Events CID&, CMsg&, CVal&, Cancel&
               IF CMsg&=%EZ_SubClass THEN
                    NOBOX_TXTNO_SubClass CVal&, Cancel&
               END IF
          CASE ELSE
               NOBOX_Events CID&, CMsg&, CVal&, Cancel&
     END SELECT
END SUB

' ======================================
' [USER ACCESSABLE CODE]  You may Edit !
' ======================================

SUB NOBOX_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

SUB NOBOX_TXTNO_Events( MyID&, CMsg&, CVal&, Cancel&)
     SELECT CASE CMsg&
          CASE %EZ_Change
          CASE %EZ_KeyPress

          CASE %EZ_Focus

          CASE %EZ_Sizing
          CASE ELSE
     END SELECT
END SUB



SUB NOBOX_TXTNO_SubClass(BYVAL CVal&, Cancel&)
     DIM NoOfDP AS LONG
     DIM AText AS STRING
     DIM SelStart AS LONG
     DIM SelEnd AS LONG

     AText  = ""
     LOCAL hCtrl&, Msg&, wParam&, lParam&
     EZ_GetSubClass  CVal&, hCtrl&, Msg&, wParam&, lParam&
     SELECT CASE Msg&
          CASE %EZ_KEYDOWN

          CASE %WM_CHAR

             SELECT CASE wParam&


                AText =  EZ_GetText ("{ME}",100)
                NoOfDP = TALLY(AText,".")

                IF NoOfDP > 1 THEN

                    AText = MID$( AText,1 TO LEN(AText)-1)
                    SelStart = LEN(AText)
                    SelEnd = LEN(AText)

                    EZ_SetText "{ME}", 100, AText
                    EZ_SendMessage("{ME}",100, %EM_SETSEL, SelStart, SelEnd)
                    Cancel& = 1
                    EXIT SUB
                END IF
                CASE 48 TO 57, 45, 46, 8, 13 'only allow 0 to 9, 8,13 minus, period

             CASE ELSE

                 Cancel& = 1
                 EXIT SUB


         END SELECT
           CASE %WM_LBUTTONDOWN
          CASE ELSE
     END SELECT
END SUB


'<<END ALL FORMS>>    UnKnown Routines follow:
#IF %EZ_NOSKIPCODE
#ENDIF 'PARSE END

************************************************************
Hopefully, people can play around with this and improve it.
I have to say, EZGUIPRO makes component design easy.

Chris                                                             

3
General Discussion / Powerbasic Website Demise
« on: June 14, 2024, 02:39:47 am »
I don't know if anyone else has noted, but the Powerbasic website is no longer accessible. For the moment the Forum section is still working.
Anyway, I was wondering if your geat EZGUIPro5 could have new headers, include files, whatever to work with PureBasic.
I realise that it would not be easy, but I'd certainly pay for the upgrade.
I use EZGUI for all form designs. It's great, and over the years I've written software for accountants, and tax calculation software, plus a few games (for my daughter's amusement.
I realise that Chris said that he was semi-retired, but I'll keep my fingers crossed.
What do others think?
Chris Gaskell

4
EZGUI 5 support forum / EZC file for MLG
« on: March 06, 2024, 04:04:00 am »
This is the MLG EZC file that was provided with My Little Grid:

<<<DESC>>>
   My Little Grid
<<<END>>>
<<<CLASS>>>
   MYLITTLEGRID
<<<END>>>
<<<DLL>>>
   mlg.dll
<<<END>>>

' change paths to match the ones on your system !
<<<INCLUDES>>>
   #INCLUDE "c:\mlg\MLG_DLLPB.INC"
<<<END>>>
' syntax:    FunctionName|par1
' par1 must be a string in quotes or a numeric value (long)
' must be actual function name in DLL !
' PB function names are converted to all CAPS when compiled.
<<<REGISTER>>>
   MLG_INIT
<<<END>>>
' Property Character|Style|Style Numeric Value
' or
' Property Character|Style Description|Style|Style Numeric Value
' maximum of 30 styles allowed
' extend styles must have [EX] before value
' Note: %WS_CHILD and %WS_VISIBLE are always assumed so don't define
<<<STYLES>>>
   F|Flat Border|%WS_BORDER|&H800000
   R|Raised Border|%WS_DLGFRAME|&H400000
   S|Sunken Border|%WS_EX_CLIENTEDGE|[EX]&H00000200
   T|Tabstop|%WS_TABSTOP|&H10000
<<<END>>>
<<<USECOLORMSG>>>
   NO
<<<END>>>
<<<USEFONTMSG>>>
   NO
<<<END>>
<<<DEFAULTTEXT>>>
   e3/r50/c8/b3/m1First,Second,Third
<<<END>>>
<<<NOTIFY>>>
<<<END>>>
<<<INITCODE>>>
   MLG_Init 
<<<END>>>
<<<CODE>>>

<<<END>>>

5
EZGUI 5 support forum / EZC file for Phoenix Grid
« on: February 25, 2024, 05:23:38 am »
Below is the contents of EZC file I use for Phoenix Grid:
I hope that it may be of use to some of you


<<<DESC>>>
   Phoenix Grid Control
<<<END>>>
<<<CLASS>>>
   Phnx_Grid_Class32
<<<END>>>
<<<DLL>>>
   Grid32Ex.dll
<<<END>>>
<<<INCLUDES>>>
   #INCLUDE "GRID32EX.INC"
<<<END>>>
<<<REGISTER>>>
    INITGRIDCONTROL
<<<END>>>
<<<STYLES>>>
     A|Has Caption|%GCS_CAPTION|&H0001??
     B|Show Horiz G Lines|%GCS_HORZGRIDLINES|&H0002??
     C|Show Vert G Lines|%GCS_VERTGRIDLINES|&H0004??
     D|Flat Header|%GCS_FLATHEADER|&H0008??
     E|Read Only|%GCS_READONLY|&H0010??
     F|Show Tool Tips|%GCS_TOOLTIPS|&H0020??
     G|Two Click Activation|%GCS_TWOCLICKACTIVATE|&H0040??
     H|Cycle State on Click|%GCS_CYCLESTATEONCLICK|&H0080??
     I|Drag Drop Edit|%GCS_DRAGDROPEDIT|&H0100??
     J|Allow Custom Edit|%GCS_CUSTOMEDITOR|&H0200??
     K|Disable Scroll Bars|%GCS_DISABLENOSCROLL|&H0400??
     L|Text Call Back|%GCS_TEXTCALLBACK|&H0800??
     M|Set Selection|%GCS_SETSELECTION|&H1000??
     N|Always Show Selection|%GCS_SHOWSELALWAYS|&H2000??
     O|No Beep|%GCS_SILENT|&H4000??
     P|Edit On Focus|%GCS_EX_LABELEDITONFOCUS|[EX]&H0001??
     Q|Clip Cell|%GCS_EX_CLIPCELL|[EX]&H0002??
     R|Auto Size Col|%GCS_EX_AUTOSIZEONEXPAND|[EX]&H0004??
     S|Busy Tip|%GCS_EX_BUSYTIP|[EX]&H0008??
     T|Grid Filled|%GCS_EX_GRIDFILLED|[EX]&H0010??
     U|Allow Only Single Select|%GCS_EX_SINGLESELECT|[EX]&H0020??
     V|Hide Focus Rectangle|%GCS_EX_NOFOCUSRECT|[EX]&H0040??
     W|Hide Node Lines|%GCS_EX_NONODELINES|[EX]&H0080??
     X|Fixed Width Edit|%GCS_EX_LABELEDITFIXED|[EX]&H0100??
     Y|Sort Drop List|%GCS_EX_LABELEDITSORT|[EX]&H0200??
     Z|End Edit On Drop Click|%GCS_EX_LABELEDITENDONCLICK|[EX]&H0400??
     #|Background Colour Border|%GCS_EX_BKGNDCOLORTOBORDER|[EX]&H0800??
   
<<<END>>>
<<<USECOLORMSG>>>
   YES
<<<END>>>
<<<USEFONTMSG>>>
   YES
<<<END>>>
<<<DEFAULTTEXT>>>
   50,100
<<<END>>>
<<<NOTIFY>>>
<<<END>>>
<<<INITCODE>>>
     INITGRIDCONTROL
<<<END>>>
<<<CODE>>>

<<<END>>>


6
Good luck with being semi-retired. I'm semi-retired but the problem is I've never been busier! EZGUI is a fantastic work, and is always my go to tool. Prior to this great tool, I always hated designing forms and the like.
Wish you well.

Pages: [1]