Announcement

Collapse
No announcement yet.

End of the 80x25 Console

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Guy Dombrowski
    replied
    Diidlings

    Hi Fred,

    Nice doodlings. Good old DOS is still alive.
    I still use those command to copy bunch of files using the ? and * symbols instead of using the mouse command a zillion time.

    Leave a comment:


  • Fred Harris
    replied
    I Like The DOS 'Retro' Look And Do It In Windows All The Time!

    Here's some of my just for fun doodlings Guy. First a CC5 program with a 'fake' Print implementation, and the second a GUI (that, however, compiles with CC) with a 'fake' Print style implementation.

    In my field (forestry) we still use some old DOS programs, and just for fun I sometimes write GUI programs to look like old DOS programs (I just like to keep folks guessing!).

    1st Console Compiler
    Code:
    #Compile Exe
    #Dim All
    Global dwLine As Dword
    
    Sub Initialize()
      dwLine=1
    End Sub
    
    
    Sub Prnt(strText As String)
      Locate dwLine,1
      Print strText
      Incr dwLine
    End Sub
    
    
    Function PBMain() As Long
      Register i As Long
    
      Call Initialize()
      For i = 1 To 20
        Prnt Str$(i) & "   Form, Console, Window, Glass Teletype Metaphor, Where's The Beef?"
      Next i
      Waitkey$
    
      PBMain=0
    End Function
    2nd GUI (can be compiled with CC)
    Code:
    #If %Def(%PB_CC32)
        #Console Off  '''Compiles With Any PowerBASIC Console Compiler Or Windows Compiler
    #EndIf             
    #Compile Exe  '''Demonstrates Console Like Output With A GUI Window.
    #Include "Win32api.inc"
    Global dwLine As Dword
    
    Type WndEventArgs
      wParam               As Long  'Package parameters to Window Procedure in TYPE
      lParam               As Long
      hWnd                 As Dword
      hInst                As Dword
    End Type
    
    
    Sub Prnt(Byval hDC As Dword, strText As String)
      Call TextOut(hDC,0,(dwLine-1)*13,Byval Strptr(strText),Len(strText))
      Incr dwLine
    End Sub
    
    
    Function fnWndProc_OnPaint(Wea As WndEventArgs) As Long
      Local hDC,hBrush,hFont,hTmp As Dword
      Local lpPaint As PAINTSTRUCT
      Register i As Long
    
      hDC=BeginPaint(Wea.hWnd,lpPaint)
      dwLine=1
      Call SetTextColor(hDC,&H00FFFFFF)   'Set Text Color To White
      hFont=CreateFont(15,0,0,0,%FW_BOLD,0,0,0,0,0,0,2,0,"Courier New")  'Create a font
      hTmp=SelectObject(hDC,hFont)        'Select new font into DC
      Call SetBkMode(hDC,%TRANSPARENT)
      For i = 1 to 20
        Prnt hDC, Str$(i) & "   Form, Console, Window, Glass Teletype Metaphor, Where's The Beef?"
      Next i
      Call DeleteObject(SelectObject(hDC,hTmp))
      Call EndPaint(Wea.hWnd,lpPaint)
    
      fnWndProc_OnPaint=0
    End Function
    
    
    Function fnWndProc_OnDestroy(Wea As WndEventArgs) As Long
      Call PostQuitMessage(0)
      fnWndProc_OnDestroy=0
    End Function
    
    
    Function fnWndProc(ByVal hWnd As Long,ByVal wMsg As Long,ByVal wParam As Long,ByVal lParam As Long) As Long
      Local Wea As WndEventArgs
    
      Select Case As Long wMsg
        Case %WM_PAINT
          Wea.hWnd=hWnd : Wea.wParam=wParam : Wea.lParam=lParam
          fnWndProc=fnWndProc_OnPaint(Wea)
          Exit Function
        Case %WM_DESTROY
          Call PostQuitMessage(0)
          fnWndProc=fnWndProc_OnDestroy(Wea)
          Exit Function
      End Select
    
      fnWndProc=DefWindowProc(hWnd,wMsg,wParam,lParam)
    End Function
    
    Function WinMain(ByVal hIns As Long, ByVal hPrev As Long, ByVal lpCmdLn As Asciiz Ptr, ByVal iShow As Long) As Long
      Local wc As WndClassEx
      Local szAppName As Asciiz*16
      Local Msg As tagMsg
      Local hWnd As Dword
    
      szAppName="Form1"                                   : wc.lpszClassName=VarPtr(szAppName)
      wc.lpfnWndProc=CodePtr(fnWndProc)                   : wc.cbSize=SizeOf(wc)
      wc.style=%CS_HREDRAW Or %CS_VREDRAW                 : wc.cbClsExtra=0
      wc.cbWndExtra=0                                     : wc.hInstance=hIns
      wc.hIcon=LoadIcon(%NULL, ByVal %IDI_APPLICATION)    : wc.hCursor=LoadCursor(%NULL, ByVal %IDC_ARROW)
      wc.hbrBackground=GetStockObject(%BLACK_BRUSH)
      wc.lpszMenuName=%NULL
      Call RegisterClassEx(wc)
      hWnd=CreateWindowEx(0,szAppName,"Form1",%WS_OVERLAPPEDWINDOW,200,100,600,325,0,0,hIns,ByVal 0)
      Call ShowWindow(hWnd,iShow)
      While GetMessage(Msg,%NULL,0,0)
        TranslateMessage Msg
        DispatchMessage Msg
      Wend
    
      Function=msg.wParam
    End Function
    Last edited by Fred Harris; 22 Oct 2008, 10:53 AM. Reason: fix something

    Leave a comment:


  • Richard Angell
    replied
    Ms

    What war ? ... just playing the advocate...and sharing a view or 2. It's really up to Chris if he wants to do it or not. Michael and I were just sharing some experience from our various viewpoints. No "war" was intended.

    Leave a comment:


  • Guy Dombrowski
    replied
    Fire Storm

    Hey guys,

    I did not mean to start a war....

    All I wanted is a bit of help to add some needed improvements to PBCC5.
    With your help, I managed to learn enough about Subclassing to take control of all mouse events instead of only the CLICK TO command.
    Chris only offered to do more and I thank him for that but I did not ask for a "No programmer needed" system !"
    So, since you are all such a great bunch of hot programmers and I want to be able to keep on picking your BRAIN...
    Please Stop the war... I do not want any casualty

    Leave a comment:


  • Chris Holbrook
    replied
    Sorry Rick, can't reply, my sense of proportion alarm just went off.

    Leave a comment:


  • Richard Angell
    replied
    " I also think that there are a lot of people out there who do not need Windows program disciplines in their lives, or cannot afford the time."

    From an entirely practical standpoint many such persons (not saying "all") are quite often not satisfied in the end because in some cases they thought they could save money instead of hiring a programmer in the first place; and/or they they believed could barely interact with this kind of programming approach and have the program they "dreamed" pop out. (OK so I'm being overly emphatic, but this result has many times been true and sometimes the reactions have been just that extreme.)

    See Michael's list of some of the language contenders over the years. I owned some program generators during my DOS BASIC programming days, ... wasted money for the most part ... thankfully I can't remember their names now. On the other hand windows based forms generators are very helpful to the initial GUI development. But after that. it is always "what does the program do" that can be the real show stopper.

    "BTW I don't see the proposed library as shutting the developer out of the full PBCC and Windows APIs."

    Neither do I, because AIUI they would still be using PBCC. What makes some sense for the "occasional" low experience, not too programming savvy user is something equivalent to the ideas embraced in the DOS and Windows QuickPak Pro collection Crescent used to sell and PB has for their DOS product. but revised to a collection of things that are not directly in PBCC or can be wrapped to make the experience better. At that point, Perect Sync comes to mind for some things.

    "Also consider - if my idea bears fruit it will no doubt bring more new users to PowerBasic, some of whom may be more amenable to your approach than I am."

    I'm quite sure no one here is opposed to more new users.

    Still, there are many approaches, and nearly always, sooner or later to do anything beyond some rudimentary block building encapsulation of some simple task(s) ... all paths lead to learning something about programming; or that persons hires a programmer; or abandons their quest altogether. Michael's comment is apropos.
    Last edited by Richard Angell; 21 Oct 2008, 03:54 PM.

    Leave a comment:


  • Jerry Fielden
    replied
    I bet PowerBasic would be pleased to show off what can be done with their new added graphics functions and statements and the rest thats new.

    If it looks good enough, I'll probably upgrade to version 5, when my ship come in.

    Leave a comment:


  • Michael Mattias
    replied
    Actually I was just thinking about how someone who knows not Windows but has some programming experience can quickly put together an application, given a few simple controls (and maybe a database at the back end).
    I've not only thought about it, I've tried it with multiple products on multiple platforms using multiple users... for more than twenty-five years. Every couple of years a new "4GL Programmer-less programming" tool comes out, and after an initial euphoria that The [Programming] Rapture has come, that tool dies.

    LINC, AWARE, COGEN, heck, Microsoft Visual Basic.... all gone, or at best in life-support-required "legacy mode."

    I don't expect to see it happen in my lifetime; but I also don't expect people to stop trying to make it happen.

    MCM

    Leave a comment:


  • Chris Holbrook
    replied
    Rick,
    making programmers is not what I do - I make programs! I also think that there are a lot of people out there who do not need Windows program disciplines in their lives, or cannot afford the time.

    BTW I don't see the proposed library as shutting the developer out of the full PBCC and Windows APIs.

    Also consider - if my idea bears fruit it will no doubt bring more new users to PowerBasic, some of whom may be more amenable to your approach than I am.

    Michael,
    I worry about your karma. "Suzy User" indeed. Actually I was just thinking about how someone who knows not Windows but has some programming experience can quickly put together an application, given a few simple controls (and maybe a database at the back end).

    Leave a comment:


  • Richard Angell
    replied
    When you state "without doing any windows programming" could you really be saying "without programming"? Why? Because at the end of the day the user would still be programming "a windows application". Albeit it might be altering a skeleton program; or programming layered functions between them and windows API's (shades of V6 and similar languages); or programming via a script; or programming via a recorded macro like MS Office, etc. ... because the other scenario is as Michael just noted. They draw, you program.

    But now if we are talking about recalcitrant DOS and DOS BASIC programmers, who want the benefit of Windows without the sweat of learning it, then are you really doing them a favor? DOS BASIC may have a lot in common with much of windows based BASIC, but there are many things, otther than the GUI, that can stump DOS programmers when they begin to program windows based BASIC. Cases in point, required function WinMain, then procedures being only in functions or subs, even converting from line number based programming technique/thinking can stump some for a bit, and then how about output to a windows printer, since they may have a new windows system they just got and now want to drive it around a bit. The prime ingredient here is helping them to learn the differences and be somewhat productive, IMO, and doing so at a pace that they find comfortable.

    Perhaps in that case providing a GUI designer explicitly for using GW's would have merit if it is just even to provide a commented skeleton program. Commented because they still would need to become familiar with it, but could quite possibly do so at a more leisurely pace. In other words, the skeleton would compile like a PB Forms produced skeleton, but would not do more than provide the stub functions or cases where the user could then plug in their code or alter to suit. Sure, they might never have to do much more than that, but some will.

    Leave a comment:


  • Jerry Fielden
    replied
    Attaboy Chris, keep on truckin, sounds like a wonderful Ideal to me.

    Leave a comment:


  • Michael Mattias
    replied
    >Perhaps the user I have in mind does not qualify as a "serious GUI user".

    Perhaps... but I'm not quite sure just who the user is here.

    Is your target user for this product a Genuine Real Non-Programming User, for whom you wish to provide a tool with which he or she is supposed to "draw the screen I want" for you to program?

    In that case, if it's easier for you to base this application on the GRAPHIC WINDOW using PB/CC, that's fine because Susie User could not care less.

    MCM

    Leave a comment:


  • Richard Angell
    replied
    and the rest of the quote was "to do more as needed". Figure that the root here is just like any programming, one must learn to use what ever necessary tool(s) there are to get the job done. After the suggested app, they still have to learn how to program the code generator app, even if it only with script commands, prop menus and mousing about.

    Missionary zeal? Not necessarily. Just pointing out that a phobic fear of windows programming can extend beyond that "label" to any kind of programming. Just adding an advocacy that the end result might be far more complicated that just learning how to program a callback in the first place.
    Last edited by Richard Angell; 21 Oct 2008, 10:30 AM.

    Leave a comment:


  • Chris Holbrook
    replied
    Originally posted by Richard Angell View Post
    Actually, once folks learn about Windows messaging, they can become empowered...
    Do I detect a missionary zeal here?

    Perhaps the user I have in mind does not qualify as a "serious GUI user". For many people, Windows is an obstacle, not a way of life.

    Leave a comment:


  • Richard Angell
    replied
    "without doing any windows programming"

    Windows programming? About all one can offer on this is to say that somewhere, sometime a serious GUI user is going to have to learn about callbacks, or respond to a GUI event that your generated callback has sent to some routine. Actually, once folks learn about Windows messaging, not a really difficult concept, they can become empowered to do more as needed. The devil in any GUI programming is always in the details. All that really happens is the substitution of learning "windows" programming to learning how to run the GUI handling functions your proposed designer would substitute in their stead. But hey, it's your time and money an they you get to support it.

    It might be just as easy to create a well commented, but simple set of template files they could then plug their values into and functions onto .. and get their ball rolling right away.

    Leave a comment:


  • Chris Holbrook
    replied
    Originally posted by Richard Angell View Post
    A large portion of the community here use both PBWin and PBCC.
    I'm one of them. And PB Forms.
    The right tool for the right job.
    The job in this case is, as I said in the earlier post, devising tools to create simple GUI forms without doing any windows programming. This is no reflection on the quality of the PB Win product, which I'm very happy with, rather, it is a consequence of the impressive upgrade to PBCC in V5.

    I have no qualms about writing SDK code to extend the capabilities of the PBCC GRAPHIC WINDOW to acheive the stated objective, that of creating a toolset or library of functions which enable the creation of simple GUI forms without the need for any sort of "M$ Windows programming". I expect that the result our efforts will be something which will have very basic controls (which will have to be coded in PBCC) and initially less functionality than say PB Forms, but requiring NO understanding of Windows on the part of the programmer who uses it. There's enough suffering in this world already.

    MCM regarding forms designers/code generators, I rolled my own using PBWin using DDT and SDK techniques. I'm fairly sure that it would be less effort to write the click & drag stuff using PBCC's GRAPHIC WINDOW.

    Leave a comment:


  • Michael Mattias
    replied
    I think some of the 'code generator' vendors here have "point and click and drag and drop" products which eliminate coding of screens, or at least as much as you can eliminate it.

    Of course, you could right now probably get a heck of deal on VB6. Try E-Bay.

    Leave a comment:


  • Richard Angell
    replied
    Guy, Chris:
    I'm thinking of using the GRAPHIC WINDOW as a canvas for an almost Windows-free GUI Forms builder, for use by people who either don't know or won't know Windows (I respect the reasons for both). It also has to be very simple to use. And simple to develop.
    I'll aver here that Michael hit the nail on the head here. A large portion of the community here use both PBWin and PBCC. The right tool for the right job. PBWin can already handle much of what you will be re-inventing the wheel for. PBCC can be outfitted with tools from Perfect Sync. "Simple to use, simple to develop" sound nice on paper, but in practice, unless you are doing something really rudimentary, it is difficult to hit such a target. The GW is a WINDOW with a static child window. To go beyond PBCC's native command set, you will be in SDK windows programming style mode, where as in PBWin, the DDT command set can handle a significant portion of many developers needs without going there. Yet many of us have both compilers because we believe each tool has features which recommend them to particular jobs. I'd suggest Michael may have been alluding to this with his comment.
    Last edited by Richard Angell; 20 Oct 2008, 04:30 PM.

    Leave a comment:


  • Chris Holbrook
    replied
    Originally posted by Guy Dombrowski View Post
    So, you can count me in
    Guy, it is a pleasure. I will PM you.

    Anydbody else who wants to join in without posting here can PM me.
    Last edited by Chris Holbrook; 20 Oct 2008, 12:34 PM. Reason: grammar!

    Leave a comment:


  • Chris Holbrook
    replied
    Originally posted by Michael Mattias View Post
    Were I with PowerBASIC Inc, I might suggest using the PowerBASIC Compiler for Windows.
    Were you with PowerBASIC, Inc, I might consider your advice.

    Leave a comment:

Working...
X