Français
Source/ Codesnippets

Buchstaben geschüttelt

 

H.Brill
ici la fois un Rätsel, inspiriert par qui Sonntags-Bildzeitung :
 $H Windows.ph
 $H commctrl.ph
Déclarer Handle ilist, tblist, hPic, icon, Btn1, Btn2, Btn3
Déclarer Long IconListe[], x, ende, xoff, yoff
Déclarer String Buchstaben[], buchstabe, w1, w2, w3, la ligne1, la ligne2, la ligne3
la ligne1 = "KALKULATION"
la ligne2 = "ALKALI"
la ligne3 = "UNIKAT"
w1 = »
ende = 0
xoff = ~GetSystemMetrics(32)
yoff = ~GetSystemMetrics(4) + xoff
Titre de la fenêtre "Geschüttelte Buchstaben"
Fenêtre 780, 400
Btn1 = Créer("Button", %HWnd, "Fertig", 600, 10, 60, 25)
Btn2 = Créer("Button", %HWnd, "Neu",    600, 40, 60, 25)
Btn3 = Créer("Button", %HWnd, "Ende",   600, 300, 60, 25)
DrawText 10,  5, "Bilde aus unten stehenden Buchstaben trois Wörter."
DrawText 10, 20, "Die Definitionen devoir dabei aider."
DrawText 10, 35, "Ziehe avec qui souris qui Buchstaben nacheinander dans qui Kästen."
DrawText 10, 50, "Wenn alle Wörter erstellt sommes, drücke fertig zum Überprüfen."
InitIconListe()
DrawText 10, 150, "Kostenvoranschlag :"
RectAngle 200, 140, 680, 180
DrawText 10, 200, "laugenartige liaison :"
RectAngle 200, 190, 680, 230
DrawText 10, 250, "ein einzelnes Stück :"
RectAngle 200, 240, 680, 280

WhileNot Ende

    WaitInput

    Si Souris(20, 80 - 52, 112)

        DoDragDrop(0)

    ElseIf Souris(70, 80 -  102, 112)

        DoDragDrop(1)

    ElseIf Souris(120, 80 - 152, 112)

        DoDragDrop(2)

    ElseIf Souris(170, 80 - 202, 112)

        DoDragDrop(3)

    ElseIf Souris(220, 80 - 252, 112)

        DoDragDrop(4)

    ElseIf Souris(270, 80 - 302, 112)

        DoDragDrop(5)

    ElseIf Souris(320, 80 - 352, 112)

        DoDragDrop(6)

    ElseIf Souris(370, 80 - 402, 112)

        DoDragDrop(7)

    ElseIf Souris(420, 80 - 452, 112)

        DoDragDrop(8)

    ElseIf Souris(470, 80 - 502, 112)

        DoDragDrop(9)

    ElseIf Souris(520, 80 - 552, 112)

        DoDragDrop(10)

    ElseIf Clicked(Btn1)

        ' Fertig

        Si w1 = la ligne1

            DrawIcon tblist, 60, 700, 150

        D'autre

            DrawIcon tblist, 10, 700, 150

        EndIf

        Si w2 = la ligne2

            DrawIcon tblist, 60, 700, 200

        D'autre

            DrawIcon tblist, 10, 700, 200

        EndIf

        Si w3 = la ligne3

            DrawIcon tblist, 60, 700, 250

        D'autre

            DrawIcon tblist, 10, 700, 250

        EndIf

    ElseIf Clicked(Btn2)

        ' récente
        RectAngle 200, 140, 680, 180
        RectAngle 200, 190, 680, 230
        RectAngle 200, 240, 680, 280
        DrawIcon tblist, 32, 700, 150
        DrawIcon tblist, 32, 700, 200
        DrawIcon tblist, 32, 700, 250
        w1 = »
        w2 = »
        w3 = »

    ElseIf Clicked(Btn3)

        ende = 1

    EndIf

Endwhile

Proc InitIconListe

    Déclarer Handle hIcon, tbpic
    Buchstaben[] = Explode("A,L,T,U,K,I,L,A,O,K,N", »)
    MCLS 32, 32, RGB(192, 192, 192)
    ilist = Créer("ImageList", 32, 32)

    WhileLoop 0, 10

        hPic = Créer(«PCSI», 0, "& MEMBMP")
        Début de peinture hPic
        UseFont "ARIAL", 24, 18, 1, 0, 0
        DrawText 16, 4, Buchstaben[&LOOP], 6
        EndPaint
        ImageList("Add", ilist, hPic)

    Endwhile

    x = 20

    WhileLoop 0, 10

        DrawIcon ilist, &LOOP, x, 80
        Inc x, 50

    Endwhile

    tbpic = Créer("hSizedPic", 0, "TOOLBAR", 2368, 32, 0)
    tblist = Créer("ImageList", 32, 32, tbpic)
    DrawIcon tblist, 32, 700, 150
    DrawIcon tblist, 32, 700, 200
    DrawIcon tblist, 32, 700, 250
    DeleteObject tbpic

ENDPROC

Proc DoDragDrop

    Paramètres Long ix
    buchstabe = Buchstaben[ix]
    ~ImageList_BeginDrag(ilist, ix, (%MouseX - xoff - %MouseX), (%MouseY  - yoff  - 100))
    ~ImageList_DragEnter(%HWnd, %MouseX, %MouseY)

    Tandis que %MousePressed

        ~ImageList_DragMove(%MouseX, %MouseY)

    Endwhile

    ~ImageList_EndDrag()

    Si Between(%MouseX, 200, 680, %MouseY, 140, 180)

        w1 = w1 + buchstabe
        DrawIcon ilist, ix, %MouseX , 145

    ElseIf Between(%MouseX, 200, 680, %MouseY, 190, 230)

        w2 = w2 + buchstabe
        DrawIcon ilist, ix, %MouseX , 195

    ElseIf Between(%MouseX, 200, 680, %MouseY, 240, 280)

        w3 = w3 + buchstabe
        DrawIcon ilist, ix, %MouseX , 245

    EndIf

ENDPROC

DeleteObject ilist, tblist, hPic
Fin

Viel Amusement avec cela
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
26.09.2023  
 



Zum Quelltext


Topictitle, max. 100 marque.
 

Systemprofile:

ne...aucune Systemprofil angelegt. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

s'il te plaît s'inscrire um une Beitrag trop verfassen.
 

Options du sujet

666 Views

Untitledvor 0 min.
Karsten Mört19.07.2024
Thomas Freier06.01.2024
Michael W.08.12.2023
Thomas Zielinski02.12.2023
plus...

Themeninformationen

cet Thema hat 1 participant:

H.Brill (1x)


Admins  |  AGB  |  Applications  |  Auteurs  |  Chat  |  protection des données  |  Télécharger  |  Entrance  |  Aider  |  Merchantportal  |  Empreinte  |  Mart  |  Interfaces  |  SDK  |  Services  |  Jeux  |  cherche  |  Support

un projet aller XProfaner, qui il y a!


Mon XProfan
Privé Nouvelles
Eigenes Ablageforum
Sujets-La liste de voeux
Eigene Posts
Eigene Sujets
Zwischenablage
Annuler
 Deutsch English Français Español Italia
Traductions

protection des données


Wir verwenden Cookies seulement comme Session-Cookies à cause de qui technischen Notwendigkeit et chez uns gibt es aucun Cookies de Drittanbietern.

si du ici sur unsere Webseite klickst ou bien navigierst, stimmst du unserer Erfassung de Informationen dans unseren Cookies sur XProfan.Net trop.

Weitere Informationen trop unseren Cookies et en supplément, comment du qui Kontrolle par-dessus behältst, findest du dans unserer nachfolgenden Datenschutzerklärung.


d'accordDatenschutzerklärung
je voudrais keinen Cookie