Page 2 of 8 FirstFirst 1234 ... LastLast
Results 11 to 20 of 79

Thread: thinForm - clunky to use, but a form designer none the less :)

  1. #11

    Re: thinForm - clunky to use, but a form designer none the less :)

    hi,
    I'm a newbie to thinbasic, just found it last night...
    I have a small project to create and thinbasic is just the solution, however, there is not much on examples.
    the thinform is cool. I don't have any experience with window gui programming... can some one help me understand how to create a windows gui?
    thanks,
    daveC

  2. #12
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: thinForm - clunky to use, but a form designer none the less :)

    Hi daveC,

    building a GUI application is quite simple, you just have to keep in mind the concept.

    You can use thinForm to generate layout for you or do following in thinAir:
    • click File/New/NewFile/
    • From templates choose GUI/CustomDialogWithButton.taguit


    That will generate minimal sample of Windows GUI application for you.

    The "forms" are called "dialogs" in thinBASIC. Dialog is identified by its handle - unique identifier, typically named like "hDlg" ( handle-of-dialog ).

    To such a dialog you can add various controls - buttons, textboxes ... each of this controls has its identifier too, to be manipulable later. So each control has specified mainly handle of dialog it belongs to, own ID, position and other details.

    Once you define dialog and its controls, you can show it using "DIALOG SHOW MODELESS hDlg" for example.

    To be able to react on events ( button clicked, dialog closed ), you have to read messages in cycle, typically looking like:
    [code=thinbasic]
    ' -- Performs loops as long as dialog is "alive"
    While ISWINDOW(hDlg)

    ' -- Get dialog messages - to Msg the type of message is stored, wParam and lParam contain message specific parameters
    Msg = GETMESSAGE(hDlg, wParam, lParam)

    ' -- Now we will determine which message was fired for the >dialog< ... and manage it somehow
    Select Case Msg

    Case %WM_Command
    ' -- Here you can process the input from controls

    ' -- Ctrl identifier
    Ctrl = loWrd(wParam)

    ' -- >Control< specific message
    CtrlMsg = HiWrd(wParam)

    ' -- According to which control we will react
    select case Ctrl

    case %btnClose
    if CtrlMsg = 0 then exit while

    end select

    Case %WM_SYSCOMMAND
    If wParam = %SC_Close Then Exit While

    End Select

    Wend

    ' -- Once we are out of main dialog loop, the dialog should be destroyed
    DIALOG END hDlg
    [/code]

    Hope I put more light on this topic.
    There was a nice tutorial on dialogs in thinBASIC, but in italian language. Here is a link to machine translated page.

    For more samples please see SampleScripts/UI/ folder.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  3. #13
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: thinForm - clunky to use, but a form designer none the less :)

    Quote Originally Posted by Michael Hartlef
    Thanks Kent, it is nice to see that you are much more into thinBasic again.
    Thanks Mike, yeagh it is lonely in the c++ world so nice to be more back at home
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  4. #14
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: thinForm - clunky to use, but a form designer none the less :)

    Quote Originally Posted by dcantera
    hi,
    I'm a newbie to thinbasic, just found it last night...
    I have a small project to create and thinbasic is just the solution, however, there is not much on examples.
    the thinform is cool. I don't have any experience with window gui programming... can some one help me understand how to create a windows gui?
    thanks,
    daveC
    Thanks Petr, for responding and helping out. Welcome to thinBasic Dave.

    Don, I am working on fixing the big bug you reported sometime back.
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  5. #15

    Re: thinForm - clunky to use, but a form designer none the less :)

    Kent:

    Thanks for your update. I will be looking forward to the bug fix.

    Don
    XPS 1710

  6. #16
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: thinForm - clunky to use, but a form designer none the less :)

    Updated thinForm to version 1.8:

    I think I got most of the things that were annoying me out of the way and fixed the naming bug that Don pointed out.
    Copying selections now works the way it should. The copy is what is selected when the copy is done to move into position and not the original source selections as it was before.

    The only real oddity that exists is when using spinner controls with either a textbox or label. Don't forget you need to have one of those added right before you add a spinner control. But since the spinner updates the caption in the buddies field (textbox or label), it messes up the autonaming of the buddy field. Right now as a test fix, I am generating a random number and asssigning it to the name. This naming things is not a problem in saving and loading forms or even generating them, it is just when you try to run a generated script, there is the chance of having duplicate control name constants. For now if you get such an error, you will need to hand fix this problem.

    But the sizing of forms, selecting and moving stuff seems to be working ok in my tests.

    This should be the last release unless you guys find something really annoying or a big bug, so thanks.

    The latest version 1.8 is attached to the first post in this thread.
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  7. #17

    Re: thinForm - clunky to use, but a form designer none the less :)

    hello
    in the file thinForm_v1.8 there is a dupplication in line 165:
    code "hwnd as long" to the line 160, can't be run unless commented
    regards



    Attached Images Attached Images

  8. #18
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: thinForm - clunky to use, but a form designer none the less :)

    Hi Zak,

    here is revised version for you.

    If you are interested in reason of the problem:
    User Defined Type around line 160 had defined dialog handle twice
    type tcontrol
    ctype as asciiz * 255
    caption as asciiz * 255
    name as asciiz * 255
    id as long
    hwnd as long
    x as long
    y as long
    width as long
    height as long
    hwnd as long
    end type

    Petr
    Attached Files Attached Files
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  9. #19

    Re: thinForm - clunky to use, but a form designer none the less :)

    Hello,
    thinForm is another reason why I really like thinbasic

    A question to Kent,

    do you plan to update thinform for generating code with the new callback functions ?
    This would be really a nice enhancement....

    best regards

    Christian

  10. #20
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: thinForm - clunky to use, but a form designer none the less :)

    sorry for not responding earlier, somehow I just sort of missed the posts...

    I will work on an update or new thinForm once all the new features are complete.
    It has been on my mind.
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

Page 2 of 8 FirstFirst 1234 ... LastLast

Similar Threads

  1. Firefly Visual designer
    By Michael Clease in forum Development
    Replies: 0
    Last Post: 30-07-2009, 10:28

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •