Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with GUI

Status
Not open for further replies.

electroguy7

Programmer
Nov 1, 2002
3
US
I'm a new member here, but not a newbie at QB. I have the following versions of basic:
-QB
--1.1
--3.0
--4.0
--4.5
--7.1(PDS)
--I also have the Knowledge base from MS
-TSR Basic
-FirstBASIC
-GW-BASIC / ABASIC
-VB 1.0 (DOS)
-UBasic ???
-Rapid-Q
-VB6

I also have C++, and know basic HTML.

OK!

I am making a GUI, in witch the minimum system req. can't be more than a 486 because I am primarily aiming it at PCs that can't run Win98 quickly. I know that I will use the Future.Lib for gfx, sound, etc... The display timing is limited to 35k. Usually you only notice this at resoulutions > 800x600.
1. I need some help with the scripting language?
2. Where should I store variables and how?
3. How can I include support for many devices? (like VESA for monitors)
4. In Most GUIs, is the interface usually a program file, or embedded in the Kernel?

Thanks
 
This may sound harsh, but throw away all of the Basics, and plan on using C (not C++), perhaps Delphi, and assembler. You'll never get much performance out of the Basics and you'll find that interfaces to low-level code and hardware are a nightmare.

Sure, you could do it, but the number and complexity of the interfaces you'll need is daunting. You'll be old and gray, or bored out of your skull before you finish.

You say you wanna make "a GUI." I suspect you are saying "a GUI shell." If so, a shell for what OS? DOS? An alternative to Windows layered on DOS? If not, you have a long row to hoe there.

Keep in mind that you need to consider what (if any) programs will run under your shell.

Or... are you talking about a GUI program launcher for DOS? This is pretty trivial, and you oughta be able to manage it using Basic.
 
I am in the middle of making a GUI. I can answer all of your questions.

1) The scripting language. Make your apps saved in RANDOM files. It is easiest to seperate your commands a paramters via commas:
LINE,0,0,100,100,87
BOX,10,10,23,43,54
Just read them using GET and use
IF comm$ = "LINE" THEN...
ELSEIF comm$ = "BOX" THEN...
for the parameters of LINE you should be allowed to use variables, the easiest way to do this is to send it through a SUB that determines if it is a variable or not. Something like
SUB getvar(varin$, varout$, prognumber%)
IF varin$ = "PI" THEN varout$ = "3.1415926535"
ELSEIF varin$ = "TIMER" THEN varout$ = TIMER
END IF
FOR v% = 1 TO 25
IF varrname$(v%,prognumber%) THEN varout$ = varr$(v%,prognumber%):EXIT FOR
NEXT

2)I store variables in an array: varr$(25,15) 25 variables for each of 15 apps. You shouldn't need more than 15, I made a sophisticated Paint program and I only used ten or so. Make all of you variables strings, if you use math commands, just use VAL()
You also need to store the names of the variables in corresponding arrays: varrname$(25,15)
make a command DIM in your scripting language that sets all of this up.

3) For your support, you don't need to do that. All of the useful hardware already has a driver, and Future Library supports you VESA

4) I don't know what you mean by interface. If you mean the windowing engine, then yes it is built intot he kernel, but if you mean something like a task launcher, or the toolbar of Windows, then no, they are seperate applications.

I'd be glad to help with any more GUI questions you may have.
 
I think I'm going to go with dilettante's Idea and do it in C so that if for some reason I want to make a bootloader and turn it into a real OS I can. I was thinking about storing variables in memory directly, in XMS probably. That way the program can define variables on demand, like windows programs can. I don't know how floating points are stored though... :(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top