Page 2 of 2 FirstFirst 12
Results 11 to 11 of 11

Thread: UI: alternate Visual Designers

  1. #11
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,529
    Rep Power
    170
    Another improvement added - better to say a few of them:

    This now can create a skeleton that includes global keyboard-watch, alternative to Accel Attach - so shortcuts will work always, no matter what currently has focus. Therefore it creates also "Events" to MenuItems, so you don't need to handle Menu-Items in callback: each menuItem gets created it's own sub if you decide to include the Keyboard-Check- the call of the subs is contained in callbacks & shortcuts. For these Shortcuts there will be next to TBMain a TBKeyboard-Function which gets called from Main-Loop - and you can add any global keyboard-related actions there. By default it contains to end the app on escape-key. You also can add shortcuts to any other control if you like to, just stick to the way of the template then and send those CBCTL-cases with the needed parameters to some sub like

    '...your example-sub
    Sub OnClick_ID_myButton(Byval hDlg as Dword)
    
    ' write here what happens if ID_myButton gets clicked
    ' if hDlg = 0 then this call came from keyboard
    
    End Sub
    
    '...within callback
    '...
      Case %WM_Command
        Select Case CBCTL
          Case ID_MyButton
            If CBMSG = %BN_Clicked Then OnClick_ID_myButton(CBHNDL)
    '...
    
    '... your shortcut within TBMain
    '...
    While keepRunning
      Dialog DoEvents To NumberOfDialogsAlive
    
      Select Case TBKeyboard
    
        Case %VK_ESCAPE
          keepRunning = FALSE
    
        Case %VK_F12   ' lets say it shall react on CTRL+F12:
          If GetAsyncKeyState(%VK_CONTROL) Then
            OnClick_ID_myButton(0)
          EndIf
    '...
    
    Also possible to include mouse-handling to callbacks, so the skeleton contains all mouse-stuff within callbacks and creates a generic mouse-UDT. I refrained from adding equates for mouse-button-states here, I just used values which mean

    0 - mousebutton nothing
    1 - mousebutton just went down
    2 - mousebutton hold down
    -1 - mousebutton just released


    I would like to use Name-option for dialogs -
    but there are two problems: currently the automatic control-callbacks are not done yet (this is the smaller problem)
    and sizes of dialogs & controls do not match the sizes during creation - not if Dialog New Name, Pixels nor Units are used.
    Attached Files Attached Files
    Last edited by ReneMiner; 19-10-2013 at 21:13.
    I think there are missing some Forum-sections as beta-testing and support

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Visual music
    By ErosOlmi in forum Shout Box Area
    Replies: 5
    Last Post: 05-10-2012, 14:49
  2. Replies: 6
    Last Post: 25-02-2012, 07:49
  3. visual c++ form example:)
    By Lionheart008 in forum C / C++
    Replies: 7
    Last Post: 01-05-2009, 10:22
  4. m15 with alternate textures
    By kryton9 in forum TBGL General
    Replies: 2
    Last Post: 20-03-2007, 11:24

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
  •