Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
EZGUI 5 support forum / Using EZ_SETONLAYER with a Page Form
« Last post by Frank Kelley on August 13, 2024, 08:34:55 pm »
I have a page form with a tab control embedded in a parent window. The parent window also has a tab control. It appears the page form is being created on Layer 0, as it is visible on each of the parent's tabs. Is there a way to place the page form on layer 1, so it does not appear on any of the parent's other tabs?

I explored using EZ_SetOnLayer, getting the page form's EZ_Handle and then using EZ_AssignID, but that didn't work. Also tried using EZ_SetLayer in the page form's %EZ_Loading event...no dice there, either.

Any ideas?
22
EZGUI 5 support forum / Re: Questions about PButton and EZ_LoadPicture
« Last post by Eric Miller on August 05, 2024, 10:34:11 pm »
Thanks
23
EZGUI 5 support forum / Re: Questions about PButton and EZ_LoadPicture
« Last post by Chris Boss on August 05, 2024, 08:09:20 pm »
If you want to change the image on the Picture Button, etc. dynamically using EZ_LoadPicture you must use the EZ_SetImage command to change the image, passing the value returned by EZ_LoadPicture.

This sends a message to the control that a new picture needs to be used. 
24
EZGUI 5 support forum / Re: Questions about PButton and EZ_LoadPicture
« Last post by Chris Boss on August 05, 2024, 08:06:35 pm »
It is best to use Bitmaps which are 256 color for Picture Button and Picture controls.

EZ_LoadPicture can load 24 or 32 bit images for use with the Canvas control, but you draw them yourself using the EZGUI canvas commands. The Picture Button and Picture controls though do the drawing themselves and 256 color seems to be the most they can handle.

25
EZGUI 5 support forum / Re: Questions about PButton and EZ_LoadPicture
« Last post by Eric Miller on August 05, 2024, 01:48:36 pm »
I've used the EZGUI Designer 5.0 to make an user interface.  I decided to update some bitmaps to a new look only to find out I can't no image us drawn.

I'm using BMP in 24bit mode and the PButton only seems to work with BMPs I first used for my interface design.  If I try to replace the BMP's I get blank boxes instead.  Are the forms responsible for the blank Picture Buttons once their bitmaps are changed?   Is there a way to update the bitmaps on Picture Buttons w/o the images disappearing from them?

Thanks,

Eric
26
EZGUI 5 support forum / Re: Autosave
« Last post by Brian Reynolds on July 26, 2024, 12:35:54 am »
Thank you Chris. My eyesight has been failing but I finally found your help.
Much appreciated.
Brian Reynolds.
27
Advanced EZGUI / Re: Number Component
« Last post by Chris Boss on July 17, 2024, 02:33:22 pm »
Just for your info, EZGUI has a masked edit control which can do this.

From the Help file under the EZ_Text command:


Masked Edit Features


            EZGUI converts the standard Text (Edit) control to a Masked Edit control if you define a Mask in the CProp$ parameter (after the properties).  The Mask is a set of characters between { }   characters (curly brackets). For example, a Mask for a telephone number would be:


            "{(999)999-9999}"


            The Mask must be added to the CProp$ (properties) parameter after the standard properties are listed  ( ie.   "ESTG({999)-999-9999}" )


            The Text field will also be set to a maximum length based on the length of the Mask. The Mask characters are defined below.


Standard Mask Characters:


      X - Any Character
      A - Alpha Character only and Space
      U - Alpha Character only and Space. Converted to Upper case !
      9 - Digits only (0 to 9)
      # - Digits (0 to 9) and space, +, -  and period
      N - AlphaNumeric and Space
      L - Logical (Y/N or T/F)
      Y - Logical (Y/N)
      T - Logocal (T/F)
      P - PlaceHolder when not using E property (means Read Only)


            Examples of Standard Masks:


     (999)999-9999 - Telephone number
     XXXXXXXXXX    -        Any text
     AAAAAAAAAA    - Alpha only
     UUUUUUUUU     - Uppercase only
     UUU-9999999   - Part number
     99/99/9999    - Date




            All other non-mask characters will be used "as is". They are frozen and can't be edited. If the Text Control is multiline, the Mask property is ignored. If the Text Control is readonly (does not have E (edit) property), then all mask characters are converted to P (Placeholder) mask character.


Calculator Mode Mask Characters:


      +  - This mask allows a Space (for Plus) or a minus sign ( - )
           and is used only in the first character position of a
           calculator mode mask.
      #  - Floating Point Mask
           (you can use a fixed decimal with this mask)
      %  - Whole Number Mask
      $_ - When a Dollar sign and a space are put to the
           left of a Calculator mode mask, then a $ and
           space will appear to the left in the textbox.


              ie. "$ ###.##"


      _% - When a space and % character are put at the
           end of a Calculator mode mask, then a space
           and % character will appear in the textbox at
           the far right.


              ie. "{##.## %}"


            Examples of Calculator mode masks:


     %%%%%%   - Whole number (positive only)
     +%%%%%   - Whole number (positive or negative)
     ######## - Floating Point number (positive only)
     +####### - Floating Point number (positive or negative)
     #####.## - Floating Point number
                (positive and fixed decimal)
     +####.## - Floating Point
                (positive or negative and fixed decimal)


     $ ###.## - Floating Point with $ (and space) to left
     ###.## % - Floating Point with (space and ) % to right


            When using a Calculator Mode Mask the Text control will allow entry of a real number and the characters will display Right to Left, like a calculator does. You can also add a + sign as the first character to allow plus or minus values (  ie. {+####} ). Also you can add just one decimal point (  ie. {+###.###} ). Using this format, you can mask Integers and real Numbers (with decimal).


            Caret Position !


            By default the Mask Edit control will set the caret position at the first character when the control gets the Focus. If you want the control to remember the previous position of the caret (character position cursor) then put a ? character in front of the mask (ie. {?XXXX} ). Masks that define a Calculator mode mask, always set the caret at the end of the text field, so the ? mask character has no effect.
           
            You can now use the Backspace key in most masks ! The control will determine the proper character to replace text with. For example, if the mask character is X, A, U or N it will use a space. If the mask character is a 9 (digits only) it will use a 0 (zero) when back spacing.



28
Advanced EZGUI / Number Component
« Last post by Chris Gaskell 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                                                             
29
General Discussion / Re: Powerbasic Website Demise
« Last post by Chris Boss on June 29, 2024, 09:44:10 pm »
The above app uses an external template file for different languages. I wrote a simple language editor using PB DDT using Unicode which saves text to a file template.

The EZGUI app loads the different language templates and can switch between different languages on the fly instantly.

The text for a  button may look like this:

Clear Terminal Display//0010

The ownerdraw engine removes the number after the // characters. If a different Language is selected, the app read the text in that language using the ID number after the // characters and draws that instead of the english.

30
General Discussion / Re: Powerbasic Website Demise
« Last post by Chris Boss on June 29, 2024, 09:39:27 pm »
Screenshot of a custom commercial app I created for a client company:

Top picture is showing default English.

Bottom picture is same app which changes text to Japanese (Unicode) via ownerdraw.


Pages: 1 2 [3] 4 5 ... 10