Author Topic: gui programming for the lazy  (Read 2612 times)

0 Members and 1 Guest are viewing this topic.

jack

  • Guest
gui programming for the lazy
« on: March 29, 2018, 02:08:35 PM »
hello, I need to develop a small (tiny) program for my girlfriend and would like to make the gui appealing, any recommendations on what rapid gui programming tools I could use with minimal effort on my part? btw, it needs to run on Windows 98

JRS

  • Guest
Re: gui programming for the lazy
« Reply #1 on: March 29, 2018, 02:57:51 PM »
You will be hard pressed finding any libraries supporting Windows 98 these days.

jack

  • Guest
Re: gui programming for the lazy
« Reply #2 on: March 29, 2018, 03:35:09 PM »
I went ahead and ordered the book "Windows 98 Programming from the Ground Up" by Herbert Schildt, I know it's going to be more work than I would like but at $7 it seemed like a good deal.

JRS

  • Guest
Re: gui programming for the lazy
« Reply #3 on: March 29, 2018, 03:55:18 PM »
Sounds like a serious labor of love.  :-*

jack

  • Guest
Re: gui programming for the lazy
« Reply #4 on: April 17, 2018, 09:49:54 AM »
I decided to use VB 6, the fundamentals are easy enough once you dive in.

Chris Boss

  • Guest
Re: gui programming for the lazy
« Reply #5 on: April 17, 2018, 11:54:44 AM »
Jack,

Don't know if you use Powerbasic at all, but if you do, EZGUI 5.0 Pro works on Windows 98. There are a few EZGUI commands which may not be fully supported on Windows 98, but most are. EZGUI dynamically loads some OS DLL's and tests to see if an API exists before calling them, so EZGUI can actually run even on Windows 95.

A significant portion of the feature set works even on Windows 98, including the 3D Canvas control and the 2D Sprite engine.

Powerbasic and EZGUI combined far outweighs the feature set of even Visual Basic 6.0, when it comes to GUI features.

Charles and John are testing out EZGUI with Oxygen, but I don't know how well it works with it yet.

jack

  • Guest
Re: gui programming for the lazy
« Reply #6 on: April 17, 2018, 12:08:53 PM »
hello Chris Boss
I will keep in mind for my next project, I bought a license a while back.

Chris Boss

  • Guest
Re: gui programming for the lazy
« Reply #7 on: April 17, 2018, 07:21:48 PM »
Just for those interested in how to make an app which can use features in later versions of Windows and make it so it can still run on early versions of Windows.

The key is the API:

GetProcAddress

You can load any DLL (even OS DLL's) and then poll the DLL using GetProcAddress to see if an API exists. If it does, then you make the call via a code pointer. In PowerBasic that would be the CALL DWORD command. Not sure if Oxygen has a similar command or not.

But by polling a DLL to see if an API exists and then only use it when available, this allows the app (or DLL) to work even on older versions of Windows. Now if the API does not exist, you can either simply ignore it (tell your app, not available) or you can code an alternative which is available.

As an example to demonstrate, IN EZGUI I have a drawing command which can draw many UI objects (control type shapes). If Windows provides Themes and you tell your app to use them, then a number of the UI objects will be drawn using the Themed version API's. If the app does not have themes available when run, EZGUI switches to the GDI versions of the objects (unthemed). Here is a list of the themed UI objects it can draw:

      Theme Aware objects:


            %EZ_XBTNUP                  - Close (X) Button up
            %EZ_XBTNDN                  - Close (X) Button down
            %EZ_HBTNUP                  - Help Button up
            %EZ_HBTNDN                 - Help Button down
            %EZ_MXBTNUP               - Maximize Button Up
            %EZ_MXBTNDN              - Maximize Button down
            %EZ_MNBTNUP               - Minimize Button up
            %EZ_MNBTNDN              - Minimize Button down
            %EZ_RBTNUP                 - Restore Button up
            %EZ_RBTNDN                 - Restore Button down
            %EZ_CAPA                     - Caption Bar Active (square style)
            %EZ_CAPI                      - Caption Bar InActive (square style)
            %EZ_CAPAR                   - Caption Bar Active (rounded style)
            %EZ_CAPIR                    - Caption Bar InActive (rounded style)
            %EZ_TABBG                   - Tab Control Background
            %EZ_TABBGF                  - Tab Control Background with a Flat border
            %EZ_REBARBG               - Rebar background

So the app can run on a later version of Windows and automatically use Themed drawing, but if run on an older version of Windows (ie. Win98) without Themes, it has an alternative.

So the GetProcAddress API is a powerful tool for designing apps (or libraries) which can run on more versions of Windows, including older ones.

I should also point out that by using long time WIN32 API's more effectively, one can actually write apps which run even on very old versions of Windows (ie. 95/98) but have the look and feel of later versions.

Also if a DLL does not exist on an older version of Windows (like the Theme DLL), the by using the LoadLibrary API to load some DLL's (rather than a defined declaration) if LoadLibrary returns NULL then the DLL does not exist and your app simply ignores it or provides an alternative. If LoadLibrary succeeds, then using the DLL handle, you can call GetProcAddress to poll for the API's you require and call them via a code pointer.

jack

  • Guest
Re: gui programming for the lazy
« Reply #8 on: April 20, 2018, 09:49:08 AM »
VB6 is actually fairly good at GUI programming but it get's a bit hairy when you want objects like ListBox or TextBox to auto-resize with the main form, Xojo has anchoring mechanisms for objects which I think is essential for GUI programming, but I doubt that executables produced with Xojo would run on Win 98, besides it's a bit pricey.

Chris Boss

  • Guest
Re: gui programming for the lazy
« Reply #9 on: April 21, 2018, 06:10:37 AM »
EZGUI also has its own autosizing engine and it works quite well from what users tell me.