Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
InForm-PE
#41
Quote:If I click on "Calculate" (Berechnen) under VB, then I can program it, but how does it work in InForm?
Well, unlike VB, QB64 does not have user created callbacks / event handlers.

Hence, you will find that the ".bas" that InForm generates will have a bunch of subroutines with "SELECT CASE". Use these functions to handle the UI events.

For example, __UI_Click() handles all control click events. Also note that all controls have a unique ID and hence the usage of LONG.

Code: (Select All)

SUB __UI_Click (id AS LONG)
    SHARED Game AS GameType

    SELECT CASE id
        CASE GameMenuExit
            OnExit

        CASE HelpMenuAboutFourUp
            MessageBox "Four Up: Classic Connect 4 game\n\nCopyright (c) 2024 Samuel Gomes\n\nhttps://github.com/a740g/", Caption(FourUp) + " - About", MsgBox_Information

        CASE GameMenuUndo
            IF NOT GameBusy AND GameGetPlayer = GAME_BOARD_PLAYER_O AND GameGetMoves > 1 THEN
                GameBusy = TRUE
                GameUndoMove ' undo AI move
                GameUndoMove ' undo player move
                GameBusy = FALSE
            END IF


See the InForm-PE wiki for more details: https://github.com/a740g/InForm-PE/wiki
Reply


Messages In This Thread
InForm-PE - by a740g - 06-15-2023, 10:27 PM
RE: InForm-PE - by bplus - 06-15-2023, 10:39 PM
RE: InForm-PE - by Jack - 06-15-2023, 11:52 PM
RE: InForm-PE - by a740g - 06-16-2023, 12:30 AM
RE: InForm-PE - by Jack - 06-16-2023, 12:18 AM
RE: InForm-PE - by Jack - 06-16-2023, 01:49 AM
RE: InForm-PE - by mnrvovrfc - 06-16-2023, 01:50 AM
RE: InForm-PE - by bplus - 06-16-2023, 12:57 PM
RE: InForm-PE - by grymmjack - 06-16-2023, 09:55 PM
RE: InForm-PE - by loopy750 - 06-18-2023, 08:31 AM
RE: InForm-PE - by a740g - 06-18-2023, 12:25 PM
RE: InForm-PE - by loopy750 - 06-19-2023, 10:44 AM
RE: InForm-PE - by bplus - 06-18-2023, 02:20 PM
RE: InForm-PE - by mnrvovrfc - 06-19-2023, 04:07 PM
RE: InForm-PE - by James D Jarvis - 06-19-2023, 10:19 PM
RE: InForm-PE - by bobalooie - 06-22-2023, 08:23 PM
RE: InForm-PE - by a740g - 06-23-2023, 08:43 AM
RE: InForm-PE - by bplus - 06-23-2023, 02:11 PM
RE: InForm-PE - by Ultraman - 06-29-2023, 11:21 AM
RE: InForm-PE - by bplus - 06-29-2023, 01:34 PM
RE: InForm-PE - by a740g - 06-29-2023, 02:12 PM
RE: InForm-PE - by SpriggsySpriggs - 10-04-2023, 03:42 PM
RE: InForm-PE - by a740g - 10-04-2023, 06:09 PM
RE: InForm-PE - by SpriggsySpriggs - 10-04-2023, 06:23 PM
RE: InForm-PE - by SpriggsySpriggs - 10-06-2023, 12:50 PM
RE: InForm-PE - by a740g - 10-07-2023, 12:49 AM
RE: InForm-PE - by TarotRedhand - 11-22-2023, 05:57 PM
RE: InForm-PE - by a740g - 11-22-2023, 06:14 PM
RE: InForm-PE - by Kernelpanic - 02-12-2024, 04:36 PM
RE: InForm-PE - by a740g - 02-12-2024, 09:26 PM
RE: InForm-PE - by TarotRedhand - 11-22-2023, 07:03 PM
RE: InForm-PE - by a740g - 11-30-2023, 11:16 PM
RE: InForm-PE - by cage - 12-23-2023, 11:40 PM
RE: InForm-PE - by cage - 12-24-2023, 07:36 PM
RE: InForm-PE - by a740g - 12-26-2023, 08:35 PM
RE: InForm-PE - by a740g - 02-12-2024, 02:08 AM
RE: InForm-PE - by Kernelpanic - 02-14-2024, 08:48 PM
RE: InForm-PE - by a740g - 02-14-2024, 09:37 PM
RE: InForm-PE - by Kernelpanic - 02-15-2024, 05:14 PM
RE: InForm-PE - by a740g - 02-15-2024, 11:22 PM
RE: InForm-PE - by a740g - 02-15-2024, 11:32 PM
RE: InForm-PE - by Kernelpanic - 02-16-2024, 03:58 PM
RE: InForm-PE - by a740g - 02-16-2024, 07:58 PM
RE: InForm-PE - by GareBear - 02-16-2024, 05:26 PM
RE: InForm-PE - by GareBear - 02-16-2024, 08:46 PM
RE: InForm-PE - by a740g - 02-16-2024, 09:16 PM
RE: InForm-PE - by Kernelpanic - 02-16-2024, 09:20 PM
RE: InForm-PE - by a740g - 02-16-2024, 11:16 PM
RE: InForm-PE - by GareBear - 02-16-2024, 11:04 PM
RE: InForm-PE - by a740g - 02-16-2024, 11:27 PM
RE: InForm-PE - by GareBear - 02-17-2024, 12:29 AM
RE: InForm-PE - by a740g - 02-17-2024, 05:10 PM
RE: InForm-PE - by Kernelpanic - 02-17-2024, 07:44 PM
RE: InForm-PE - by a740g - 02-20-2024, 01:21 PM
RE: InForm-PE - by bobalooie - 02-20-2024, 02:56 AM
RE: InForm-PE - by a740g - 02-20-2024, 01:41 PM
RE: InForm-PE - by bobalooie - 02-20-2024, 02:57 PM
RE: InForm-PE - by bplus - 02-20-2024, 02:31 PM
RE: InForm-PE - by Kernelpanic - 02-21-2024, 12:09 AM
RE: InForm-PE - by a740g - 02-21-2024, 03:07 AM
RE: InForm-PE - by Kernelpanic - 02-21-2024, 10:48 PM
RE: InForm-PE - by GareBear - 03-06-2024, 02:38 PM
RE: InForm-PE - by a740g - 03-07-2024, 02:48 AM
RE: InForm-PE - by GareBear - 03-07-2024, 03:01 AM
RE: InForm-PE - by a740g - 03-07-2024, 03:25 AM
RE: InForm-PE - by GareBear - 03-07-2024, 03:55 AM
RE: InForm-PE - by a740g - 03-21-2024, 04:12 PM
RE: InForm-PE - by atl068 - 04-26-2024, 02:48 PM
RE: InForm-PE - by a740g - 04-27-2024, 01:30 PM
RE: InForm-PE - by bplus - 04-27-2024, 01:35 PM
RE: InForm-PE - by a740g - 04-28-2024, 03:21 AM
RE: InForm-PE - by Kernelpanic - 04-28-2024, 08:45 PM
RE: InForm-PE - by a740g - 04-28-2024, 09:46 PM
RE: InForm-PE - by Kernelpanic - 04-28-2024, 10:56 PM
RE: InForm-PE - by TerryRitchie - 04-28-2024, 11:42 PM
RE: InForm-PE - by a740g - 05-04-2024, 09:08 AM
RE: InForm-PE - by TerryRitchie - 05-04-2024, 01:38 PM



Users browsing this thread: 6 Guest(s)