karte

  • hi

    hab ma wieder son nen projekt wo ich eure hilfe brauche.

    mein code bis jetzt:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    #Region ### START Koda GUI section ### Form=d:\desktop\autoit\mama projekt\aform1.kxf
    $Form1_1 = GUICreate("AForm1", 633, 447, 193, 115, BitOR($WS_MAXIMIZEBOX,$WS_SYSMENU,$WS_CAPTION,$WS_MAXIMIZE,$WS_POPUPWINDOW,$WS_TABSTOP,$WS_BORDER,$WS_CLIPSIBLINGS))
    $Group1 = GUICtrlCreateGroup("Map", 16, 8, 601, 313)
    $Label5 = GUICtrlCreateLabel("1", 112, 96, 10, 17)
    $Pic1 = GUICtrlCreatePic("C:\Dokumente und Einstellungen\All Users\Dokumente\Eigene Bilder\Beispielbilder\Sonnenuntergang.jpg", 32, 24, 577, 289, BitOR($SS_NOTIFY,$WS_GROUP))
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group2 = GUICtrlCreateGroup("Legende", 16, 336, 601, 97)
    $Label1 = GUICtrlCreateLabel("Bad Homburger Intensivklinik", 40, 360, 142, 17)
    $Label2 = GUICtrlCreateLabel("Frankfurter Uni Klinik", 40, 384, 102, 17)
    $Label3 = GUICtrlCreateLabel("1", 24, 360, 10, 17)
    $Label4 = GUICtrlCreateLabel("2", 24, 384, 10, 17)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

    [/autoit] [autoit][/autoit] [autoit]

    EndSwitch
    WEnd

    [/autoit]


    jetzt will ich das das label erstens nicht diese weiße farbe hat. und das man es auf dem bild verschieben kann. anstatt dem bild soll da irgendwann noch ne karte hin. und die labels solln dann durch fähnchen mit nummern ersetzt werden. und wie mact man das das label in den vordergrund kommt?


    mfg bjoerni

    Einmal editiert, zuletzt von bjoerni (26. Juni 2007 um 21:35)

  • 1. welche weiße Farbe? Meinst du den Hintergrund vom Label? Falls ja:

    [autoit]

    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

    [/autoit]


    Das musst du unter den Label setzen, dessen Hintergrund transparent werden soll. Oder du schreibst es so:

    [autoit]

    GUICtrlSetBkColor($Label1, $GUI_BKCOLOR_TRANSPARENT)

    [/autoit]


    Das nur als Beispiel.

    2. Wie meinst du das mit verschieben? Dass der User selbst die Fahnen verschieben kann, ohne es coden zu müssen?
    3. Das/der (?) Label ist automatisch im vordergrund, sofern du es unter dem Bild erstellst.
    4. Bitte ein Topic verwenden, wodurch jeder sofort erkennt, worum es geht ...

    Einmal editiert, zuletzt von Sn0opy (26. Juni 2007 um 22:05)

  • Also, ich habe eines meiner Skripte aus meiner Experimentierphase, da könntest Du Dir eventuell was abschauen, wie Du die Labels bewegst. Ist aber nur ein Entwurf.

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>
    #include <Misc.au3>

    [/autoit] [autoit][/autoit] [autoit]

    $GUI = GUICreate("Test", 300, 300)
    $example = GUICtrlCreateLabel("Label", 10, 10) ;Ein verschiebbares Label
    GUICtrlSetCursor(-1, 0) ;Setzt einen Cursor über der Control
    $example2 = GUICtrlCreateLabel("Grafik", 25, 38) ;Ein verschiebbares Label der Grafik
    $example1 = GUICtrlCreateGraphic(10, 40, 10, 10);, -1, -1,$SS_CENTERIMAGE) ;Eine verschiebbare Grafik
    GUICtrlSetCursor(-1, 0) ;Setzt einen Cursor über der Control
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0x000000, 0xffffff) ;Farben der folgenden Ellipse (oder in diesem Fall ein Kreis)
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 10, 10) ;Setzt einen Punkt als Grafik
    $button = GUICtrlCreateButton("Fließtext", 10, 260)

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState()

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $example
    $coords = WinGetPos($GUI) ;Auslesen der Fensterposition für _MouseTrap
    _MouseTrap($coords[0], $coords[1] + 27, $coords[0] + $coords[2], $coords[1] + $coords[3]) ;Begrenzt den Cursor auf die GUI
    Do
    $a = GUIGetCursorInfo() ;Cursorposition auslesen
    GUICtrlSetPos($example, $a[0] - 10, $a[1] - 10);Die Position der Control an Cursorposition anpassen
    ;~ Sleep(100)
    Until $a[2] = 0
    _MouseTrap() ;Hebt die Cursorbegrenzung auf
    Case $msg = $example1
    $coords = WinGetPos($GUI) ;Auslesen der Fensterposition für _MouseTrap
    _MouseTrap($coords[0], $coords[1] + 27, $coords[0] + $coords[2], $coords[1] + $coords[3]);Begrenzt den Cursor auf die GUI
    Do
    $a = GUIGetCursorInfo() ;Cursorposition auslesen
    GUICtrlSetPos($example1, $a[0] - 10, $a[1] - 10);Die Position der Control an Cursorposition anpassen
    GUICtrlSetPos($example2, $a[0] + 5, $a[1] - 12);Die Position der Control an Cursorposition anpassen
    ;~ Sleep(50)
    Until $a[2] = 0
    _MouseTrap() ;Hebt die Cursorbegrenzung auf
    Case $msg = $button
    $vertscroll = 290
    $horizontal = 100
    $fliesstext = GUICtrlCreateLabel("Fließtext", $horizontal, 10)
    For $vertscroll = 290 To 10 Step - 3
    GUICtrlSetPos($fliesstext, $horizontal, $vertscroll)
    Sleep(25)
    $horizontal += 2
    Next
    GUICtrlDelete($fliesstext)
    Case $msg = $GUI_EVENT_CLOSE
    ExitLoop
    EndSelect
    WEnd

    [/autoit]

    Einmal editiert, zuletzt von unearth (27. Juni 2007 um 21:56)

  • hi


    warum sieht man bei folgendem code die punkte nicht? oder wie griegt man sie über das bild?


    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>
    #include <Misc.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Local $Label5, $Label6, $example
    #Region ### START Koda GUI section ### Form=D:\desktop\autoit\mama projekt\AForm1.kxf
    $Form1_1 = GUICreate("AForm1", 650, 500, 193, 115, BitOR($WS_SYSMENU,$WS_CAPTION,$WS_POPUPWINDOW,$WS_TABSTOP,$WS_BORDER,$WS_CLIPSIBLINGS))
    $Group1 = GUICtrlCreateGroup("Map", 16, 8, 601, 313)
    $Pic1 = GUICtrlCreatePic("C:\Dokumente und Einstellungen\All Users\Dokumente\Eigene Bilder\Beispielbilder\Sonnenuntergang.jpg", 32, 24, 577, 289, BitOR($SS_NOTIFY,$WS_GROUP))
    GUICtrlSetState($Pic1, $GUI_DISABLE)
    $Label5 = GUICtrlCreateGraphic(100, 40, 10, 10);, -1, -1,$SS_CENTERIMAGE) ;Eine verschiebbare Grafik
    GUICtrlSetCursor(-1, 0) ;Setzt einen Cursor über der Control
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0x000000, 0xffffff) ;Farben der folgenden Ellipse (oder in diesem Fall ein Kreis)
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 10, 10) ;Setzt einen Punkt als Grafik

    [/autoit] [autoit][/autoit] [autoit]

    $Label6 = GUICtrlCreateGraphic(100, 60, 10, 10);, -1, -1,$SS_CENTERIMAGE) ;Eine verschiebbare Grafik
    GUICtrlSetCursor(-1, 0) ;Setzt einen Cursor über der Control
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0x000000, 0xffffff) ;Farben der folgenden Ellipse (oder in diesem Fall ein Kreis)
    GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 0, 10, 10) ;Setzt einen Punkt als Grafik

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlSetState($Pic1, $GUI_DISABLE)

    [/autoit] [autoit][/autoit] [autoit]

    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group2 = GUICtrlCreateGroup("Legende", 16, 336, 601, 97)
    $Label1 = GUICtrlCreateLabel("Bad Homburger Intensivklinik", 40, 360, 142, 17)
    $Label2 = GUICtrlCreateLabel("Frankfurter Uni Klinik", 40, 384, 102, 17)
    $Label3 = GUICtrlCreateLabel("1", 24, 360, 10, 17)
    $Label4 = GUICtrlCreateLabel("2", 24, 384, 10, 17)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Label5
    $coords = WinGetPos($Form1_1) ;Auslesen der Fensterposition für _MouseTrap
    _MouseTrap($coords[0], $coords[1] + 27, $coords[0] + $coords[2], $coords[1] + $coords[3]) ;Begrenzt den Cursor auf die GUI
    Do
    $a = GUIGetCursorInfo() ;Cursorposition auslesen
    GUICtrlSetPos($Label5, $a[0] - 10, $a[1] - 10);Die Position der Control an Cursorposition anpassen
    Until $a[2] = 0
    Case $Label6
    $coords = WinGetPos($Form1_1) ;Auslesen der Fensterposition für _MouseTrap
    _MouseTrap($coords[0], $coords[1] + 27, $coords[0] + $coords[2], $coords[1] + $coords[3]) ;Begrenzt den Cursor auf die GUI
    Do
    $a = GUIGetCursorInfo() ;Cursorposition auslesen
    GUICtrlSetPos($Label6, $a[0] - 10, $a[1] - 10);Die Position der Control an Cursorposition anpassen
    Until $a[2] = 0
    EndSwitch
    WEnd

    [/autoit]


    mfg bjoerni