Code : Tout sélectionner
EnableExplicit
Enumeration Window 500
#mf
#mf2
#mf3
#BLANK
EndEnumeration
#I = #PB_Compiler_EnumerationValue
Enumeration gadget #PB_Compiler_EnumerationValue
#drapeauFR
#drapeauUK
#drapeauGE
#grille
#reset
#mfGrid
#tim1
EndEnumeration
#J = #PB_Compiler_EnumerationValue
Dim tab( #J - #I)
Global index
If OpenWindow(#mf, 200, 200, 500, 100, "Accès indexé aux Constantes")
For index = #I To #J
Debug index
Next
For index = 0 To (#J - #I)
Debug #I + Index
Next
For index = 0 To (#J - #I)
tab(index) = #I + Index
Debug tab(index)
Next
EndIf
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
Code : Tout sélectionner
Select IDX_LAN
Case 0
CreateMenu(#ME_GAM, WindowID(#mf))
; MENU GAMME
MenuTitle("Gamme")
MenuItem(#GA_CHR, "Gamme Chromatique")
MenuItem(#GA_DIAMA, "Gamme Diatonique Majeure")
MenuItem(#GA_DIAMI, "Gamme Diatonique Mineure")
MenuItem(#GA_PMA, "Gamme Pentatonique Majeure")
MenuItem(#GA_PMI , "Gamme Pentatonique Mineure")
MenuBar()
MenuItem(#GAR1, "Random 1")
MenuItem(#GAR2, "Random 2")
MenuBar() ;
MenuItem(#GAR3, "Random 3")
MenuItem(#GAC, "Random 4")
Case 1
CreateMenu(#ME_GAM, WindowID(#mf))
; MENU GAMME
MenuTitle("Scale")
MenuItem(#GA_CHR, "Chromatic Scale")
MenuItem(#GA_DIAMA, "Major Diatonic Scale")
MenuItem(#GA_DIAMI, "Minor Diatonic Scale")
MenuItem(#GA_PMA, "Major Pentatonic Scale")
MenuItem(#GA_PMI , "Minor Pentatonic Scale")
MenuBar()
MenuItem(#GAR1, "Random 1")
MenuItem(#GAR2, "Random 2")
MenuBar() ;
MenuItem(#GAR3, "Random 3")
MenuItem(#GAC, "Random 4")
Case 2
CreateMenu(#ME_GAM, WindowID(#mf))
; MENU GAMME
MenuTitle("Tonleiter")
MenuItem(#GA_CHR, "Chromatische Tonleiter")
MenuItem(#GA_DIAMA, "Diatonique Dur-Tonleiter")
MenuItem(#GA_DIAMI, "Diatonique Moll-Tonleiter")
MenuItem(#GA_PMA, "Pentatonische Dur-Tonleiter")
MenuItem(#GA_PMI , "Pentatonische Moll-Tonleiter")
MenuBar()
MenuItem(#GAR1, "Random 1")
MenuItem(#GAR2, "Random 2")
MenuBar() ;
MenuItem(#GAR3, "Random 3")
MenuItem(#GAC, "Random 4")
EndSelect
SetMenuItemState(#ME_GAM, #GAM_START+IDX_GAM, 1)