PlanetSquires Forums

Support Forums => General Board => Topic started by: Petrus Vorster on April 20, 2022, 11:52:15 AM

Title: Dumb Question for the month
Post by: Petrus Vorster on April 20, 2022, 11:52:15 AM
Greetings Gents

This has to be the most useless question in programming, but it intrigues me so much that i have dedicated quite some time to NOT getting it right.

Centuries ago i had VB dos. the first tool that allowed dragging of forms.
I loved it back then, but ran so quickly out of memory that it was pretty much useless.

Since i have no projects currently, and waiting for Paul's designer, i have opened up QB64 to play with.
I can create all kinds of subs and functions, draw "dos mode" boxes and stuff like we used too.
(I am not interested in its Windows designer, i am playing dos looks, reminiscent of the old days).

QB64 has every mouse command, so you dont need old those vintage interrupts.

But how the heck did they make a form move?
Obviously you need some array holding the entire objects parameters, but for the love of heaven, I cannot figure out how to create that "move" functionality.
Logically you need to snapshot the background before you draw the box and before you redraw it elsewhere.

LOL. Can you imagine, that in this day and age someone will still be intrigued by something like this?
But it also shows you just how little drag and drop programmers really know about programming.

-Regards, Peter
Title: Re: Dumb Question for the month
Post by: Paul Squires on April 20, 2022, 06:52:19 PM
I think you are on the right track. I can describe the process in Windows but I expect that in DOS you would have to do similar as you describe. Track the mouse movement and then redraw the screen when the mouse moves the form to the new coordinates. For efficiency it probably keeps track of multiple pages in memory. One for the background, and another for the form itself. That would make it faster because the background could be copied to the screen extremely fast and then just reposition the form graphic page to the mouse offset. 
Title: Re: Dumb Question for the month
Post by: Bumblebee on April 20, 2022, 11:11:10 PM
Does it show an animation of the form as you drag it, or just an outline?
Even in Windows, there's an option to show just the outline to save processing power.
Title: Re: Dumb Question for the month
Post by: Petrus Vorster on April 21, 2022, 06:57:36 AM
Hi

The old VBDOS showed an outline.
I dont know why this interest me so much, i am not going to do anything with it anyway.

I know that you have the co-ordinate corners, you should use the mouse-drag function, and re-paint the object where the mouse is released.
What i interesting is that even if there is an outline, it shows an animation of movement, and that was on a dos screen. No graphics at all.
So even in Windows today, there should be a process of making an impression of the destination, copy the background back and repaint the object at the new destination all to give the impression of movement.

I am just playing around, but i am curious how they did that.

Regards,

Peter
Title: Re: Dumb Question for the month
Post by: raymw on April 21, 2022, 08:12:15 AM
vb dos - that is what got me here, a few years ago - it was simple and effective for pragmatic software, none of this fancy windowy rubbish  ;). Some years after its demise, I was talking to someone at M$, who denied they ever produced it. (that was back in Os2 days.)

wrt form movement, I think there was probably a couple (or more) areas of memory mapped screen, say A and B they would start off with both the same image, then you add a form to A, say, then when moved the new position would be written to B, then moved again written to A, rinse and repeat. The screen would be switched from A to B as changes were made. That way you always had the previous screen available (but I could be wrong).

There was 384kb available for screen memory, the screen would be about 80 chars wide, by 25 rows, so 2000 * 8 bit chars  =16k bits (no idea about parity, etc, can't remember, can't be assed to look it up) so plenty of room for graphics of the day, it wasn't bit mapped, as such, it was all ASCII characters.

(If you are interested in the history of windows/dos, then 'Dave's Garage'  on U tube is amusing.)

Best wishes,
Ray
Title: Re: Dumb Question for the month
Post by: Petrus Vorster on April 21, 2022, 09:50:47 AM
For the fun of it, i made a Form type with all the parameters of the "form".
By changing the rows and columns, then it simply draws another exact "form" on the screen.
Then logically one should have a memory clip of before and just paste it afterwards.

I did run into some machine code data they used in some examples to scroll screens faster. Perhaps i should stay away from that before i break something on my pc. :-)

The Qb64 "Dos" is actually 64bit emulated DOS LOOK and you can run fullscreen and with a "dos" screen of 160x50 rows and columns instead of the old 80x25.
Its quite an interesting little plaything, since you can make fully fledged 64 bit windows programs with it.
It has all the toys C++ has.

Like I said, its just a fun thing, and it wont be a train-smash if i dont get it right, but it did teach me a valuable lesson : And that is just how little i actually know of the back-end processes in Windows and systems.

-Regards, Peter.
Title: Re: Dumb Question for the month
Post by: Petrus Vorster on April 21, 2022, 10:00:11 AM
The fun thing here is that the old screen 0 command gives what looks like a dos screen.
It is however very far from it. (Even the Windows screen clip works on it)
The picture  shows a box i have drawn and then the same form drawn with a small change in rows and columns.

-Silly as this may sound, but i am pretty much enjoying myself playing with something that looks old, but have some serious C++ backbone. (of which i also know nothing).

Thanks for your time gents.
As usual, i will get something right one evening very late, and then the interest will be gone.

PS: Paul, i cant wait for that final designer!

-Regards, Peter 
Title: Re: Dumb Question for the month
Post by: Johan Klassen on April 21, 2022, 10:49:55 AM
hello Petrus Vorster
you may be interested in Keybone's work https://qb64phoenix.com/forum/forumdisplay.php?fid=28
Title: Re: Dumb Question for the month
Post by: Petrus Vorster on April 21, 2022, 11:11:13 AM
Thanks mate

Perhaps this will cure my curiosity.

Regards

Peter
Title: Re: Dumb Question for the month
Post by: Bumblebee on April 21, 2022, 06:32:41 PM
Those forms are drawn using text methods. Which is what a command line operating system was designed to handle.
https://en.wikipedia.org/wiki/Windows_Glyph_List_4 (https://en.wikipedia.org/wiki/Windows_Glyph_List_4)
https://en.wikipedia.org/wiki/Box-drawing_character (https://en.wikipedia.org/wiki/Box-drawing_character)
Title: Re: Dumb Question for the month
Post by: Paul Squires on April 21, 2022, 08:48:39 PM
Before my PowerBasic days, I used QuickBasic extensively. I was about to purchase a visual forms type of library that creates window like ascii forms and buttons, etc with mouse support and drag & drop. I can't for the life of me remember the name of that library and that bugs me! However, I had a question about it and contacted the author who said that he now only sells a version for "PowerBasic". I had never heard of PowerBasic but I bought the program for PB and also the PB compiler. That's how I started in PB/DOS way back in the day.
Title: Re: Dumb Question for the month
Post by: Paul Squires on April 21, 2022, 09:36:54 PM
....I need to see if I can find the 3.5 inch disks with that visual windows/forms library for PBDOS. My google searches are not successful... yet.  :-)
Title: Re: Dumb Question for the month
Post by: Paul Squires on April 21, 2022, 09:39:34 PM
PB/VISION !!!! Finally found it. Bob Zale must have bought the rights afterwards from the original author because PowerBasic started selling it a couple of years later.

DSE Software Publishing was the original author. Programmer was Daniel P. Stasinski


===== Product Information ==============================
   Product:             PB/VISION(tm) LITE Interface Library for PowerBASIC 3.0
   Version:             1.00
   Version Date:        10-Feb-1994
   Product Type:        Software
   Basic Distribution Policy (see License, below, for details):
      Shareware, freely distributable by all channels

   Product Description: PB/VISION(tm) LITE v1.0 for PowerBASIC 3.0.
                        Create graphical and text 3D windows with
                        working control icons. Fully event-driven,
                        multi-threading, mouse aware design with as
                        little as 30K of overhead. Includes
                        PowerBASIC 3.0 compatible library, examples,
                        documentation, an extensive tutorial, and a
                        hypertext reference manual that can be
                        accessed while in the PowerBASIC IDE. <ASP>

   Category:            BASIC
   Keywords:            POWERBASIC GUI INTERFACE LIBRARY WINDOW BASIC
   Required Packages:   PBVL010
   This Package:        PBVL010

   Required Configuration
      Processor Family: Intel 80x86 (minimum 8086/8088)
      Minimum OS:       MS-DOS 2.0
      Standard RAM:     640K
      Hard Drive Space: 650K
      Required:
         Hard drive
         Keyboard
      Req'd Software:   PowerBASIC 3.0

   Orders:
      Address:          DSE Software Publishing
                        Post Office Box 96
                        Willits, CA 95490-0096
                        USA
      Phone:            707-459-4358
      FAX:              707-459-4484
      BBS Name:         DSE Online!
      BBS Phone:        707-459-4484
      Genie:            DSE.SOFTWARE
      FidoNet:          1:125/123
      Internet:         dse.software@genie.geis.com

   Support:
      Address:          DSE Software Publishing
                        Post Office Box 96
                        Willits, CA 95490-0096
                        USA
      Phone:            707-459-4358
      BBS Name:         DSE Online!
      BBS Phone:        707-459-4484
      Genie:            DSE.SOFTWARE
      FidoNet:          1:125/123
      Internet:         dse.software@genie.geis.com

Title: Re: Dumb Question for the month
Post by: Paul Squires on April 21, 2022, 09:54:05 PM
Interesting quote I found on an old software abandonware site:

On Wednesday April 16, 2008 Daniel P. Stasinski (guest) said:

Yep, 2.11 was the last version of PB/VISION, but it is not "abandonware" as implied here. As far as I know, PowerBASIC still sells it, though I haven't seen a royalty check from them in several years. I sure miss DOS programming days. Linux has been good to me though. -- Daniel, the author of PB/VISION and a bunch of other things :)


And here is a more up to date:

https://wiki.tcl-lang.org/page/Daniel+P.+Stasinski

Daniel P. Stasinski

I'm Daniel P. Stasinski, and was lead Software Engineer and Internet Development Administrator for Mayor Pharmaceutical Laboratories in Phoenix, AZ. Prior to that I ran a software publishing company (DSE Software Publishing) for about 15 years in a small Northern California town. Needing a change, I sold the product line to various publishers and moved to hot Phoenix. I am now retired.

I've always believed that instead of going only with what you know or which way the wind blows, you use the tool that best suits the project at hand. For my web development needs, AOLserver and TCL have been best. For other needs I usually choose between 80x86 assembler, BASIC, C, Delphi Pascal, java, or perl. A lifetime ago I even chose Prolog for a project solution.

My latest TCL related project is x10bot, a home automation daemon for x10 CM11A appliance controller and accessories under Linux. If you're interested, it can be found at http://www.scriptkitties.com/x10bot/

My most recent AOLserver TCL project was bringing back the old AOLserver Administration Pages to v3.x. These can be found at http://www.scriptkitties.com/ too. Other AOLserver projects included building blowfish and twofish encryption as a shared module and also a Windows DLL. Other assorted projects include a couple megs of custom C and TCL code.

Next on the agenda is a TCL enabled sendmail milter (filter), inspired by the perl sendmail::milter.

I don't like to list my employers web sites so I'll just list my personal site, Disabilities-R-Us, which is an information and chat site created by and for people with physical disabilities.

   http://www.disabilities-r-us.com

Daniel


Title: Re: Dumb Question for the month
Post by: raymw on April 22, 2022, 08:12:01 AM
visual basic for dos, was all ASCII characters, of course. Values between about 178 and 218 (decimal) gave single and double lines for borders of text boxes/whatever. If you pushed a 'box' over the edge of the screen, you would lose some of it's contents, iirc. I still have the 3.5 discs, not sure if I can hook up a disc drive. (you can still download visual basic for dos (released in 1991)

Ten years before then,'The Last One' was released, which meant you never needed to write code again! Anyone remember much about that? If you bought it,you had to go on a two/three day training course. I think it is still available on the web. At the time 'Specsavers' (a UK optician chain) used it, and David James (the author of the software) was an interesting guy.

Title: Re: Dumb Question for the month
Post by: Petrus Vorster on April 22, 2022, 12:11:40 PM
Hi Gents

What a surprise that such an old thing could get us chatting again.
What triggered me in the beginning was when i asked someone how does microsoft do the form move thing.
We all use it, but do we understand how that works?

Then i went back to the VB dos days and could not figure that out either.
then i saw a Point of sale recently in quite a big company that sells odd stuff like you would call a dollar store over there. They have hundreds of branches and i saw it was 'n ascii based dos point of sale.

No, it was not! They run on windows 10, do card swipes and it does not run in a dosbox of any kind.
And it had a dos-look form that can move.

That just triggered my mind completely.

Thanks for the inputs, I will go look at all these things.
Its always good to understand the mechanics of a process.

Regards, Peter
Title: Re: Dumb Question for the month
Post by: raymw on April 22, 2022, 07:41:58 PM
I resemble that remark
QuoteWhat a surprise that such an old thing could get us chatting again.
;)

before then, talking about home pc's, I won a Tandy trs80, a competition when the Bristol tandy business centre opened. When I  got it, I thought they had put my name in the boot sequence. Later i found out as well as having a 64 character wide screen, it could be switched to larger characters, but only 32 characters per line. When it finished booting, it would display 'READY>  but sometimes it was 'RAY'. Eventually I realised that in 32 char mode, it displayed odd characters only.
Title: Re: Dumb Question for the month
Post by: Petrus Vorster on April 25, 2022, 04:29:20 PM
Daniel P. Stasinski

I managed to find his personal website/blog.
He is but 6 years older than me.
Left a contact message.
Lets Hope.
Title: Re: Dumb Question for the month
Post by: Petrus Vorster on April 26, 2022, 05:01:42 AM
Great.
I had a chat with him too!

He still has the original disks and will give it to me.
Lets see if i can learn something out of this.

Regards,

Peter
Title: Re: Dumb Question for the month
Post by: Petrus Vorster on April 26, 2022, 10:46:27 AM
QuoteTandy trs80
I had to Google that. :-)

First computer i ever typed anything on was a Commodore 64.
It was in a store on display and i managed to do print "hallo".
Very much impressed with myself.

First PC i owned was a 486 Ibm. My386 Buddies were SO jealous!
My best game were Prince of Persia 2!!

Fun times.

-Peter
Title: Re: Dumb Question for the month
Post by: Bumblebee on April 27, 2022, 01:42:29 PM
My first was a VIC-20. Less than 4K memory, cassette tape storage, poke and peek in place of an assembler. Great memories!

Prior to that, our high school had Apple II machines. Have been a BASIC slacker ever since.
Title: Re: Dumb Question for the month
Post by: Petrus Vorster on April 28, 2022, 04:23:34 AM
Just for interest. Daniel Stasinski gave me the original "visual designer" for quickbasic.
I have to run it in Dosbox.
It will take some time to work through its libraries but the DRAG BOX function looks Exactly like VB DOS. Draws a frame, then move that and re-draws it at a new position.
It is cool to see the fore-runner of things like a DRAG BAR, Controls, Windows and Buttons.

I believe this concludes this thread.
Thanks for the inputs. I now know more that i did a few weeks ago.

Regards, Peter