anonymous1337 wrote:I don't see how a GUI would appear crucial to an FB user unless you come from a VB background.
Hmmm.
I've used VB. Tho, the last time was many years ago.
I often write simple console mode utilities. Especially if they're things which will be used only by myself or by certain select others (who're all folks who are used to command line utilities).
However, there are APPLICATION users out there in the world (these days, that means the vast majority of folks) who're simply not comfortable with console mode apps.
So sometimes I make my apps with a GUI interface. Particularly if they're geared towards those not comfy with the keyboard and/or console mode screens.
Now, I'm not a full time programmer of the sort most of you would be familiar with, I do specialty type programming for controlling mechanical and electrical equipment. Which involves proprietary programming languages, very specialized type programming, etc.
I'm not as "up to speed" as concerns general purpose programming as many of you folks in this forum are. In fact, many of the discussions you folks have about this or that technicality of method or procedure for doing this thing or the other might as well be written in Greek as far as I'm concerned. Often enough, I've no clue as to what's being discussed; or why I'd want to do that; or even what it'd be useful for ... much less understand the various arguments. Nor am I familiar with the Windows API except in a very superficial way.
So, when I do want or need to write an app which has a GUI interface to it, I want a KISS method of doing this.
It's simple, when I'm doing an app I'm intent upon making a program that does something useful. (To me, at least) I'm concentrating on the meat of the app, that part of it which will accomplish a useful task. I don't want to, and don't intend to ... spend hours figuring out how to put a simple form on the screen with a few edit boxes and some buttons, get em all lined up so they look reasonably neat and orderly. And do wish to spend a lot of time typing dozens (or hundreds) of commands and statements ... just to make a simple Windows form with a few buttons and edit boxes.
Could. Could also spend the time to learn the details of using Windows API calls in order to accomplish this. (Or WX or GTK or etc)
But ... I don't want to. And I'm simply not going to.
I want to spend what little brain power I have on the meat of the matter ... the core of the program which actually does whatever it is I'm trying to get it to do.
I think this point is what some of the posters are trying to make, when they're asking if there are any SIMPLE GUI libraries available.
If they were interested in the GUI itself, the complex coding and understanding it ... they would probably figure out how to make their own library of routines. Or learn to use the Windows API (or WX or GTK, or etc). Which MAY seem simple to some of you guys. But to me, and I'm sure it's the same with others, while I can muddle my way slowly thru such code ... it makes my head hurt. And I get impatient because that's not the part of programming, nor the type of coding, I'm actually interested in. It's not that I CAN"T understand thoses things. The issue is I don't want to spend the time or sweat equity needed. It's not the part of programming I enjoy.
I don't want to, nor do I enjoy, spending a lot of time and effort to make and display a clickable button. I want, and enjoy most, spending my time on the coding of the routine that'll do something when that button is clicked.
For those like me, there is an interest in a simple to use GUI creation library.
Not that I'm asking for such myself. <Shrug> I'm not in the habit of asking others to do a lot of sweating for me. I figure somebody either will or they won't make such, all on his/her own free will because that's the sort of challenge/coding that person likes to do.
In the meantime, whenever I need to make an app with a Windows type GUI interface for the user, I use alternate means.
If the code is not computationally intense (speed is not a big issue) but I want a GUI interface on the app, I tend to use Rapidq.
If more speed is needed, I'll merge FreeBasic routines with Rapidq code using techniques developed by some of the Rapidq users over in that forum. It's kind of like having the best of both worlds. FreeBasic's speed, compact code, extra abilities, etc ... merged with Rapidq's easy to design and use GUI elements.
Or, in some cases I have made console mode command line utilities in the past, which I later decided to slap a GUI interface upon. And rather than rewrite everything, just made a "front end" GUI for the console mode app using AutoHotKey. Which has some easy methods for making message boxes, buttons, and so forth. Along with easy to use "Send Key" commands and the like. (I'll admit it, I'm lazy) And AutoHotKey scripts can be compiled into stand-alone executables.
In a previous post in this thread, another poster posted what he thought to be simple, easily understood code for popping up a dialog box, a button, etc. And, to be fair, compared to many other examples I've seen, it was a cleaner and easier method.
But not nearly so easy to read and understand as Rapidq GUI code, for instance.
Myself, I use Rapidq's original form designer to design a screen, put in appropriate buttons, edit boxes, and so forth. And to set SOME of the attributes of each of the objects. This being a simple and direct process. Pretty much a "no brainer". Which suits me fine as I'm not the brightest apple on the tree by any means. I also assign events within the form designer. Then tell it to "Code It". Which it does quickly and efficiently.
Then copy and paste the resulting code over to my usual text editor. And close the form designer.
I don't use the rest of the Rapidq IDE at all. Have no use for it. Just gets in my way. Pretty much the same as back when I was using VB. I'm a line coder at heart. Then I hand code the subroutines that're called when the appropriate event occurs (a button is clicked or whatever).
The following is a very simple example. The code is not the complete code of the final product I made, I cut parts out as they're not important to this discussion. And the rest of the code was very long.
The only point is for me to show what SIMPLE GUI creation can look like, that's pretty durned easy to understand. And in this case the majority of what you'll see was auto-generated by Rapidq's form designer. All I had to do was add the code down in the subroutines.
I'm not trying to convert anyone to Rapidq. Not the point. Just trying to show yah what I think the other folks who're asking for SIMPLE to use GUI libraries are looking for.
Code: Select all
$APPTYPE GUI
$TYPECHECK ON
$INCLUDE "c:\rapidq\include\RapidQ.inc"
$ESCAPECHARS off
$OPTION ICON "star.ico"
DECLARE SUB CalcBtnClick (Sender AS QBUTTON)
DECLARE SUB ResetBtnClick (Sender AS QBUTTON)
DIM RealNum as Single
DIM CVNum as Single
DIM MXNum as Single
DIM NewNum as Single
DIM TempNum as Single
CREATE Form AS QFORM
Caption = "DDC Controller Universal Input Re-Scaling Calculator"
Width = 579
Height = 418
Center
CREATE Label1 AS QLABEL
Caption = "Re-scale Input"
Left = 218
Top = 26
Width = 73
Height = 21
END CREATE
'Get the real, measured value ------------------------------------------
CREATE RMV_Label AS QLABEL
Caption = "Real Measured Value : "
Left = 137
Top = 60
Width = 114
END CREATE
CREATE RMV_Edit AS QEDIT
Text = "0"
Left = 257
Top = 57
Height = 19
InputMask = "##########"
END CREATE
'Get the current value shown by the input ------------------------------------------
CREATE CV_Label AS QLABEL
Caption = "Input Current Value : "
Left = 148
Top = 120
Width = 103
Height = 14
END CREATE
CREATE CV_Edit AS QEDIT
Text = "0"
Left = 257
Top = 118
Height = 19
InputMask = "##########"
END CREATE
'Get the current max scale for the input ------------------------------------------
CREATE MX_Label AS QLABEL
Caption = "Input Current Max Scale : "
Left = 125
Top = 180
Width = 125
Height = 14
END CREATE
CREATE MX_Edit AS QEDIT
Text = "0"
Left = 257
Top = 177
Height = 19
InputMask = "##########"
END CREATE
'Show the new max scale for the input ------------------------------------------
CREATE New_Label AS QLABEL
Caption = "Input New Max Scale : "
Left = 137
Top = 240
Width = 113
Height = 14
END CREATE
CREATE New_Edit AS QEDIT
Text = "0"
Left = 257
Top = 237
Height = 19
ReadOnly = True
END CREATE
'CALCULATE button ------------------------------------------
CREATE CalcBtn AS QBUTTON
Caption = "Calculate"
Left = 73
Top = 300
OnClick = CalcBtnClick
END CREATE
'RESET button ------------------------------------------
CREATE ResetBtn AS QBUTTON
Caption = "Reset"
Left = 240
Top = 300
OnClick = ResetBtnClick
END CREATE
END CREATE
'Insert initialization code here
New_Edit.Enabled = False
Form.ShowModal
'--------- Subroutines ---------
SUB CalcBtnClick (Sender AS QBUTTON)
'-- Enter your code here
RealNum = VAL(RMV_Edit.Text)
CVNum = VAL(CV_Edit.Text)
MXNum = VAL(MX_Edit.Text)
TempNum = RealNum/CVNum
NewNum = MXNum * TempNum
New_Edit.Text = STR$(NewNum)
New_Edit.Enabled = True
END SUB
SUB ResetBtnClick (Sender AS QBUTTON)
'-- Enter your code here
RMV_Edit.Text = "0"
CV_Edit.Text = "0"
MX_Edit.Text = "0"
New_Edit.Text = "0"
New_Edit.Enabled = False
END SUB
[/code]