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.


Topics - Chris Boss

Pages: [1] 2
1
Here is an article 100% written by Microsoft CoPilot AI:

https://cwsof.com/blog/an-article-written-by-copilot-ai/

While I may have guided the AI by questions and discussions, the AI wrote the entire article in its own words using its own observations.

Feel free to share this article with others.

What is the point ?

How to work with AI. This was a learning experience for me and I really enjoyed it. I found it amazingly interesting. I have a better grasp of what AI is trully capable of now.

Chris Boss

2
General Discussion / Windows support for WIN32 apps in the future
« on: May 20, 2025, 10:12:22 am »
New exciting news from the latest Build 2025:

https://blogs.windows.com/windows-insider/2024/12/04/announcing-windows-11-insider-preview-build-27758-canary-channel/

https://blogs.windows.com/windowsdeveloper/2024/12/03/raising-the-bar-updates-to-the-microsoft-store-on-windows/

Microsoft has just announced that the Microsoft Store is soon going to support WIN32 app updates via the store.

The MS Store supports downloading of WIN32 apps. But updating had to be handled by the developers own website externally.

Now the MS Store will support not only downloading WIN32 apps, but also the store can handle updates of the same WIN32 app.

3
Other BASIC languages / Other Basic languages worth checking out
« on: January 28, 2025, 11:59:23 am »
Here is a short list of other Basic languages worth checking out:

Oxygen (O2) Basic compiler (32 bit and 64 bit) :   https://github.com/Charles-Pegge/OxygenBasic

PluriBasic (generates apps for a variety of platforms):   https://www.patreon.com/c/pluribasic/posts

ThinBasic (interpreter) :  https://www.thinbasic.com/


4
WIN32 Programming / Where to download Windows SDK
« on: January 28, 2025, 11:48:45 am »
To use the WIN32 API in Windows successfully I strongly recommend downloading the Windows SDK (Software Development Kit) to get the WIN32 docs.

You can download the latest SDK for Windows 11 here:

https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/

Personally I find that it is better to use an older version of the SDK for q quick reference, since it leaves out much of the "bleeding edge" API's of later versions of Windows such as Windows 10 and 11. I find that the Windows 7 SDK is the best one to use for everyday reference. You can download it here:

https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/

Scroll down to the Windows 7 download link on the above webpage.

I use the Windows 7 SDK for everyday quick reference use (it is less bloated and easier to traverse) and also double check API docs online for Windows 11 (the latest).

For the latest docs online go here:

https://learn.microsoft.com/en-us/windows/apps/api-reference/




5
FreeBasic / Where to download FreeBasic
« on: January 28, 2025, 11:41:44 am »
Freebasic is a popular open source BASIC programming language. It can be downloaded at the link below:

https://freebasic.net/

6
BCX (Basic to C) Transpiler / Where to download BCX
« on: January 28, 2025, 11:40:11 am »
BCX is an excellent BASIC programming language. It is not a compiler, but a transpiler.

At least that is the term I like to use. It generates C code from the Basic and then compiles using a C compiler as a backend.

You can get more info about BCX here:

https://www.bcxbasiccoders.com/

7
Powerbasic / Welcome
« on: January 28, 2025, 11:33:42 am »
Welcome to the Powerbasic section of my forums. The Powerbasic website and forums both currently are down and no indication they will return.
If you would like access to this forum just email me a request to join (real names required).

chrisboss@centurylink.net

or

support@cwsof.com

I personally have decades of experience with the Powerbasic compilers and still use them.
I also have decades of experience with the WIN32 API.

Chris Boss

8
General Discussion / What should I do with EZGUI ? (its future)
« on: September 07, 2024, 02:25:20 pm »
I am in a quandary of what to do with EZGUI ?

Powerbasic, simply put is dead. I won't go into the details, but it is a fact and the chances of it resurfacing are slim at best.

So what to do with EZGUI, without Powerbasic. There is too much code for me to port it to another language, unless that language supports a syntax at least close to Powerbasic. I used a lot of tricks found in the PB language which would need to exist in whatever I port it to. Second, 64 bit is critical to make it worth the time to port EZGUI.

EZGUI is over 50,000 lines of Powerbasic code (with a tiny bit of inline assembler).

Is it worth it to port it ?
I think so. EZGUI , as far as GUI tools go, has features far beyond anything in the PB compiler. It is so complex it is almost a programming language in of itself. There are over 1000 GUI commands in it, and so many low level features is can be extended to add even much more.

Kevin Diggins BCX looks interesting to me. That may be one approach to port EZGUI.

If one looks at many of the "other" BASIC's out there (indie developed BASIC's), I doubt any of them come close to the feature set of EZGUI. EZGUI is also quite unique in that I wrote 100% of it from scratch. Not a single line of so called "open source" code or libraries. What ever I do with it, I don't have to worry about third party licenses getting in the way.

Languages like Purebasic for example use a third party 3D engine. EZGUI's graphic engine I wrote myself from scratch.

EZGUI has features very unique to it such as:

2D Sprite animation engine which is very fast and does not require DirectX. It uses the Windows GDI (using Device Independent Bitmaps). It creates its own memory buffers and handles all drawing via my own code and then Bitblt's the memory buffer to the screen. It is very fast. I benchmarked to Patrice Terriers GDImage (which uses GDIplus) and the animation was significantly faster.

3D OpenGL based scripting language. It even supports loading and displaying STL 3D models (used in 3D printing). It is so fast it can load and display huge 3D models with over 1 million polygons in a few seconds, even on a old computer and does not need the latest (bleeding edge) hardware to do it.

Drag and Drop Visual Designer engine (build your own programming visual designers, form editors).

and much more.

If you have any suggestions, feel free to post them here or contact me via email (support@cwsof.com)



9
Hello to all who have been using EZGUI.

I want to thank you for all your support and it has been a pleasure providing you with a product such as EZGUI 5.0 Professional.

As of this year (2023) I am now partially retired. So what does this mean for EZGUI and its future ?

(1) EZGUI 5.0 Professional is so feature rich that there really isn't any need for an update (unless a bug fix is released).
Powerbasic has yet to provide a 64 bit compiler so it makes little sense to work on a next gen version (if that changes it may be done)

(2) My website costs me money, but for now I can afford to handle the cost, so my forums will still be here

(3) I will continue to sell EZGUI 5.0 and provide support (via the forums) to all new and old customers. For how long I can't tell, but no need to stop it currently.

(4) Be aware that because of no updates to Powerbasic, third party addons have had minimal sales for years now and EZGUI is no exception.
I still do get sales, but it does not even cover my website costs.

(5) Now being semi-retired, I plan on changing my website to a hobby status, rather than purely 100% commercial. What does that mean ?
My website is now open to be used for any hobby projects I am working on, so the forums will likely reflect this before long. I no longer need to use it only
for commercial work. That means it won't be a write off for my business and I will bear the costs purely for my hobby use. This does free it up to be used for anything I have
an interest, which includes:

Embedded:
- Arduino
- ESP32
- Tibbo
- Raspberry PI
- an other SOC boards

Basic programming languages (other than Powerbasic)
- BASCOM AVR
- GreatCow Basic
- XOJO
- B4R (Basic for Arduino)

3D Printing

Hobby CNC
- Building my own CNC

Woodworking
- Designing jigs for tools, plans for projects and best of all using a Bandsaw sawmill (Frontier OS18)

see:  https://www.frontiersawmills.com/en_us/os18-sawmill-with-7hp-212cc-lifan-recoil-start-gas-engine

ART
- both my wife and I are casual artists and I can share stuff about our art and as well info about digital art.





10
Advanced EZGUI / Components
« on: March 21, 2023, 10:47:08 am »
The EZGUI docs don't go into detail about creating and using components. This post is where I will try to explain it better. I will give an brief overview and then over time add more to this discussion.

What is a component ?

A component is like a page form (which can be put on a normal form) which acts like a single control. You can put any child controls on the component and make it do some repeatable task, but to your app it will act like a single control.

You can create a component once and use it over and over again on different forms. 

You do not create a component like you do a normal form, even though technically it is a form with child controls. There are special commands for defining a component and even processing its events and also sending events from the component to your app (remember it appears to your app as a single complex custom control).

The designer needs a component to be compiled to a DLL so you can use it there when visually designing your app. But a component in your app can be accessed either in its compiled form (DLL) or as source code (designer will generate the path to the source code if you desire rather than load a DLL when it generates your source code).

Components are a bit complex at first glance and is an advanced feature. But once you start learning how to use them it really is not that difficult.

Let's look at some source code for a component that comes with EZGUI (Canvas Scroller):

Code: [Select]
' ======================================
' [PROTECTED CODE]         Do NOT Edit !
' ======================================

DECLARE SUB EZ_CSCROLLER_InitComponent(BYVAL CMPPrefix$)
DECLARE SUB EZ_CSCROLLER_Design()
DECLARE SUB EZ_CSCROLLER_ParseEvents(CID&, CMsg&, CVal&, Cancel&)
DECLARE SUB CSCROLLER_Events(CID&, CMsg&, CVal&, Cancel&)
' ------------------------------------------------

%CSCROLLER_MYPICTURE          = 100

'<<BEGINFORM>> "CSCROLLER"

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

SUB EZ_CSCROLLER_InitComponent(BYVAL CMPPrefix$)     ' (PROTECTED)
     EZ_DefComponent CMPPrefix$+"CSCROLLER", "SVBK||CSCROLLER.bas", CODEPTR(EZ_CSCROLLER_Design), CODEPTR(EZ_CSCROLLER_ParseEvents)
END SUB

SUB EZ_CSCROLLER_Design()     ' (PROTECTED)
     LOCAL CText$
     EZ_Color-1,-1
     EZ_UseFont 4
     EZ_UseAutoSize "CT"
     EZ_Picture %CSCROLLER_MYPICTURE, 0, 0, 6, 3, "SAMPLEBMP", ""
     ' -----------------------------------------------
END SUB


SUB EZ_CSCROLLER_ParseEvents(CID&, CMsg&, CVal&, Cancel&)     ' (PROTECTED)
     SELECT CASE CID&
          CASE %EZ_Window
               CSCROLLER_Events CID&, CMsg&, CVal&, Cancel&
          CASE ELSE
               CSCROLLER_Events CID&, CMsg&, CVal&, Cancel&
     END SELECT
END SUB

' ======================================
' [USER ACCESSABLE CODE]  You may Edit !
' ======================================
'<<SAVE>>
SUB CS_ShowPicture(BYVAL P$)
     LOCAL W&, H&, CW&, CH&, FW!, FH!, SW&, SH&, SF$, X&, Y&, XDif&, YDif&, VScroll&, HScroll&, EW&, EH&
     EZ_HideC "{ME}",%CSCROLLER_MYPICTURE,%CSCROLLER_MYPICTURE
     IF P$="" THEN
          EZ_HideFormScrollBars "{ME}", "B"
          EXIT SUB
     END IF
     IF EZ_ImageHandle(P$)<>0 THEN
          EZ_GetPictureSize P$, W&, H&
          EZ_HideFormScrollBars "{ME}", "B"
          EZ_GetSize "{ME}",FW!, FH!, 2
          VScroll&=0
          HScroll&=0
          CW&=FW!
          CH&=FH!
          SW&=EZ_WO("SW")
          SH&=EZ_WO("SH")
          SF$=""

          IF W&<=CW& AND H&<=CH& THEN
               ' no scrollbars
               X&=(CW&-W&)\2
               Y&=(CH&-H&)\2
          ELSE
               EW&=0
               EH&=0
               IF W&>CW& THEN EH&=SH&
               IF H&>CH& THEN EW&=SW&
               IF W&>(CW&-EW&) THEN
                    X&=0
                    SF$=SF$+"H"
                    HScroll&=W&-(CW&-EW&)
               ELSE
                    X&=((CW&-EW&)-W&)/2
               END IF
               IF H&>(CH&-EH&) THEN
                    Y&=0
                    SF$=SF$+"V"
                    VScroll&=H&-(CH&-EH&)
               ELSE
                    Y&=((CH&-EH&)-H&)/2
               END IF
          END IF
          IF X&<0 THEN X&=0
          IF Y&<0 THEN Y&=0
          EZ_ResizeC "{ME}",%CSCROLLER_MYPICTURE, EZ_CX(X&),EZ_CY(Y&), EZ_CX(W&),EZ_CY(H&)
          EZ_SetImage "{ME}",%CSCROLLER_MYPICTURE, P$
          EZ_ShowFormScrollBars "{ME}", SF$
          EZ_ShowC "{ME}",%CSCROLLER_MYPICTURE,%CSCROLLER_MYPICTURE
          IF INSTR(SF$,"H") THEN
'               EZ_SetHScroll "{ME}",0, 0, HScroll&, 0,(HScroll&\10)+1
               EZ_SetHScroll "{ME}",0, 0, HScroll&, 0,1
          END IF
          IF INSTR(SF$,"V") THEN
'               EZ_SetVScroll "{ME}",0, 0, VScroll&, 0,(VScroll&\10)+1
               EZ_SetVScroll "{ME}",0, 0, VScroll&, 0,1
          END IF
     END IF
END SUB

SUB ScrollMe(BYVAL SMode&, BYVAL CVal&)
     LOCAL C!, R!, W!, H!
     EZ_GetSizeC "{ME}",%CSCROLLER_MYPICTURE,C!, R!, W!, H!
     IF SMode&=-1 THEN
          R!=0-EZ_CY(CVal&)
     ELSE
          C!=0-EZ_CX(CVal&)
     END IF
     EZ_ResizeC "{ME}",%CSCROLLER_MYPICTURE,C!, R!, W!, H!
END SUB

SUB FreeMyStartBitmap()
     LOCAL P$
     P$=EZ_GetCmpText("{ME}",0,1)
     IF P$<>"" THEN
          EZ_FreeImage P$
          EZ_SetCmpText "{ME}",0,"", 1
     END IF
END SUB
'<<END>>

SUB CSCROLLER_Events(CID&, CMsg&, CVal&, Cancel&)
     LOCAL P$
     SELECT CASE CID&
          CASE %EZ_Window
               SELECT CASE CMsg&
                    CASE %EZ_Loading
                    CASE %EZ_Loaded
                         EZ_HideFormScrollBars "{ME}", "B"
                         EZ_HideC "{ME}", %CSCROLLER_MYPICTURE, %CSCROLLER_MYPICTURE
                         P$=EZ_GetText("{ME}",0)
                         EZ_SetText "{ME}",0,""
                         IF P$<>"" THEN
                              IF UCASE$(RIGHT$(P$,4))=".BMP" THEN
                                   P$=EZ_LoadPicture(P$)
                                   IF P$<>"" THEN
                                        CS_ShowPicture P$
                                        EZ_SetCmpText "{ME}",0,P$,1
                                   END IF
                              ELSE ' assume it is a Picture string
                                   CS_ShowPicture P$
                              END IF
                         END IF
                    CASE %EZ_TextUpdated
                         SELECT CASE CVal&
                              CASE 1
                              CASE ELSE
                         END SELECT
                    CASE %EZ_BitmapUpdated
                         FreeMyStartBitmap
                         P$=EZ_GetBitmapName(CVal&)
                         CS_ShowPicture P$
                    CASE %EZ_ColorUpdated
                         LOCAL FG&, BG&
                         FG&=EZ_GetCmpAttr("{ME}",0,1)
                         BG&=CVal&
                         EZ_SetColor "{ME}",0, FG&, BG&
                    CASE %EZ_FontUpdated
                    CASE %EZ_SelUpdated
                    CASE %EZ_ClearUpdated
                         CS_ShowPicture ""
                    CASE %EZ_FreeNow
                         FreeMyStartBitmap
                    CASE %EZ_Started
                    CASE %EZ_Close
                    CASE ELSE
               END SELECT
          CASE -1        ' Vertical scrollbar
               IF CMsg&=%EZ_Change THEN
                    ScrollMe -1, CVal&
               END IF
          CASE -2        ' Horizontal scrollbar
               IF CMsg&=%EZ_Change THEN
                    ScrollMe -2, CVal&
               END IF
          CASE ELSE
     END SELECT
END SUB


The designer generates a subroutine for adding the component to one of your forms:

SUB EZ_CSCROLLER_InitComponent(BYVAL CMPPrefix$)


In this routine is a call to EZ_DefComponent:

     EZ_DefComponent CMPPrefix$+"CSCROLLER", "SVBK||CSCROLLER.bas", CODEPTR(EZ_CSCROLLER_Design), CODEPTR(EZ_CSCROLLER_ParseEvents)

What is not provided is a example of how to put your components into a DLL.  You can put more than one component in a DLL to create a library of compoments. Once compiled to a DLL the DLL and the source code for the components should be put in the EZGUI Designers component folder.

Here is an example of a component DLL:

Code: [Select]
#COMPILE DLL "cmplib1.dll"
#INCLUDE "C:\ezgui45beta\includes\ezgui50.inc"

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

#INCLUDE "C:\ezgui45beta\projects\real components\Form_pgscroller\pgscroller.bas"    ' Component include file!
#INCLUDE "C:\ezgui45beta\projects\real components\Form_cscroller\cscroller.bas"    ' Component include file!

SUB EZ_InitComponent(BYVAL CMPPrefix$) EXPORT
     EZ_PGSCROLLER_InitComponent CMPPrefix$
     EZ_CSCROLLER_InitComponent CMPPrefix$
END SUB

The two components that come with EZGUI are in separate files and must be included in this DLL code file and this is how I created the component DLL that comes with EZGUI.

A component needs an entrance function and that is predefined by EZGUI and always is:

SUB EZ_InitComponent(BYVAL CMPPrefix$) EXPORT

The function must be exported to EZGUI (and the designer) can find it the function. The function is found by polling the DLL for it by name and then it is called dnyamically (no Declare required).


11
This is just an idea, but just wanted to "bounce" this off my customers to see what you think about it.

What would you think of EZGUI becoming a FREE product ?

Not open source though. One could register to get EZGUI for FREE and use it for FREE.

There would still be a software license and it would still be a proprietary product (not open source, since I think that would ruin it).

Support would be via the online forums.  I would do my best to answer questions, but of course with it as free I would have limits of how much I can do on the forums. It would have to assisted via the peer to peer forum. I am planning of trying to get some of the lost data (when I upgraded the forum software) back into the forum as a resource as well, but that will take some time.

"Extended" support though could be purchased (for a very reasonable fee) so one could get more extensive support. Any customers who purchased EZGUI already would continue to get priority for support as I have done in the past.

What good would this accomplish ?

Two things are needed for EZGUI to have a better future:

(1) It needs to support programming languages other than Powerbasic

(2) It needs to eventually become 64 bit as well

I can't do this with the limited current customer base. Powerbasic (as a company) while still viable, does not yield the regular new potential customers it did in the past. Also in Powerbasics last few  better years (when Bob Zale) was still alive, I had to compete with other third party products (which most have moved on now though) which made it a greater challenge to keep the new customer base increasing.

Lastly, 32 bit still has a few good years left to it, but eventually 64 bit may make 32 bit totally obsolete. While 32 bit still is viable and has a market, now would be the best time to change my marketing model.

My goals:

(1) Port EZGUI (mostly make modifications) so it is more friendly to other programming languages such as FreeBasic, PureBasic and expecially C.

C is important and could be a great market for EZGUI. There are actually many C programmers out there who shy away from C++ and also from dot.net. C still can produce amazingly fast and tiny apps.  But the programming mainstream has moved to dot.net mostly for GUI stuff so C is a second class citizen in the GUI world.

EZGUI could be a boon for C programmers, as well as for those who use other dialecs of Basic.

I am also not averse to licensing the actual source code to EZGUI for larger companies, so far I have only done this for one company at the moment, but it could be part of the extended support. Licensing the source code is not cheap though and is best suited for large companies where it makes sense. The current price for licensing the source code is in the $5000 range.

So what do you think of this possible new model for  EZGUI ?

What would be a reasonable price for extended support say for a yearly price ?

For those who can't afford much, especially for the hobby programmer market, it is still a deal since EZGUI would be free up front and one could still get decent support via the forums for free.

12
EZGUI 5 support forum / 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.

13
Advanced EZGUI / About this forum
« on: January 11, 2022, 12:57:27 pm »
This forum is for posting source code, explanations and having discussions about more advanced tasks using EZGUI 5.0 Professional.

It is my experience that most EZGUI users have not even barely tapped into the more advanced features found in EZGUI.

The purpose of this sub-forum is to help EZGUI users push EZGUI 5 to its limits.

I am currently doing custom app development for clients using PB10/EZGUI 5 and I myself am learning how to push EZGUI to its limits.

14
EZGUI 5 support forum / So where does EZGUI go from here ?
« on: December 02, 2021, 04:41:34 pm »
Will there be an EZGUI 6.0 ?

Maybe.

So what have I been doing since the release of EZGUI 5.0 Pro and does EZGUI have a future ?

EZGUI definitely has a future as long as 32 bit Windows app are supported by Windows.

I have tested a few EZGUI apps on Windows 11 and just as expected it works very well. So EZGUI should have a good future for at least as long as Windows 11 exists and Windows 64 bit can still run 32 bit apps.

Why no new version of EZGUI yet ?

One thing is that EZGUI 5.0 is so feature rich there is not a lot missing in it. IMO most EZGUI users have not tapped into the raw power found in the EZGUI engine. But I have !

For the last 2 years I have been working on custom programming applications for clients, using EZGUI 5.0 Pro (and Powerbasic 10).  I am finding so many ways to push EZGUI far beyond what most users likely are doing. For one I have really pushed the limit of using Ownerdraw and more and more I am finding ways to solve all sorts of problems.

How about writing an application that can change the user interface into different languages ?

(See the picture attached to this post.)

Using Ownerdraw and a few extra WIN32 API calls I have been able to create an app which can switch between multiple languages. I used PB Forms and wrote a simple "Language" editor to define templates for different languages and then in the actual app I used ownerdraw controls and could switch between languages dynamically. Now of couse EZGUI does not support Unicode yet, but for non-Unicode languages you could use existing EZGUI controls. The app I wrote only needed other languages for buttons and labels, so I could support unicode using the WIN32 API and ownerdraw.

Ownerdraw is extremely powerful and probably under used in Windows apps.  The point is that by tapping into the more low level engines in EZGUI you can do some amazing things. How about 3D buttons (ownerdraw) with transparent images on them. All sorts of things are possible.

One of the things I need to do here on the forums is to start teaching EZGUI users how to tap into many of these low level engines in EZGUI.

So look for upcoming updates on these forums with ideas of how to push EZGUI 5.0 to the limit.


15
EZGUI 5 support forum / Good News about EZGUI 5.0 on Windows 11
« on: November 06, 2021, 01:01:43 pm »
Just updated one of my PC's to Windows 11.

EZGUI is looking good so far, running on Windows 11.

Always worried about a new version of Windows breaking ones apps, but so far it appears that EZGUI runs fine on Windows 11.

Not an extensive test by any means, but tested a number of features in EZGUI such as Sprites, OpenGL 3D, Visual Designer, window regions, ownerdraw and more.

Pages: [1] 2