English
Source / code snippets

Icons Profaninterne draw

 

CompileMarkSeparation
Source wurde am 15.07.2007 aus der MMJ-Quellcodesammlung (Dietmar Horn) in die Babyklappe auf XProfan.Com abgelegt:
profaninterne Icons zeichnen
Lauffähig ab Profan-Version 6.6
Erklärung:
----------
Dieses Beispiel demonstriert, wie Icons auf dem Hauptfenster
positioniert werden können und verwendet alle profaninternen Icons.
Es bedeuten:
------------
Titel$     der Text der Titelzeile des Hauptfensters
x%         die vertikale Ausdehnung des Hauptfensters
y%         die horizontale Ausdehnung des Hauptfensters
exit%      Handle des Beenden-Buttons
b%         Breite des Beenden-Buttons
h%         Höhe des Beenden-Buttons
bild$      Dateiname des Bitmaps
icon$      Name des profaninternen Icons
declare Titel$,x%,y%,e%
declare i%,j%
declare icon$
declare b%,h%
declare bild$

PROC INIT

    x% = 325
    y% = 235
    b% = 100
    h% = 25
    let bild$ = WOLKEN.BMP
    let icon$ = A
    Titel$=Ich bin ein kleines Profan²-Programm
    WindowStyle 48
    WindowTitle Titel$
    SetTrueColor 1

ENDPROC

PROC MENU

    PopUp Icon
    AppendMenu 101,A
    AppendMenu 102,DOS
    AppendMenu 103,EIMER
    AppendMenu 104,GESICHT
    AppendMenu 105,SAND
    AppendMenu 106,WASSER
    AppendMenu 107,MUELL
    AppendMenu 108,BAUM
    AppendMenu 109,DRUCKER
    AppendMenu 110,EIS
    AppendMenu 111,KNOPF1
    AppendMenu 112,MUENZE
    AppendMenu 113,STEIN
    AppendMenu 114,WEG
    AppendMenu 115,COMPUTER
    AppendMenu 116,EDITOR
    AppendMenu 117,FILEICON
    AppendMenu 118,KNOPF2
    AppendMenu 119,PROFAN
    AppendMenu 120,TEXT
    AppendMenu 121,WINDOWS
    AppendMenuBar 99,Be&enden

ENDPROC

PROC HAUPTFENSTER

    Window (%MaxX - x%) / 2,(%MaxY - y%) / 2 - x%,y%
    MENU
    cls rgb(255,255,255)
    UseFont Arial,16,0,0,0,0
    SetDialogfont 1

ENDPROC

PROC ICONS

    clear i%
    clear j%

    while lt(j%,Height(%HWnd))

        while lt(i%,Width(%HWnd))

            DrawIcon icon$,i%,j%
            i% = i% +32

        wend

        i% = 0
        j% = j% +32

    wend

ENDPROC

#####################################################
INIT
HAUPTFENSTER
ICONS
clear e%

whilenot e%

    Waitinput

    If MenuItem(99)

        e%=1

    elseif MenuItem(101)

        let icon$=A
        cls rgb(255,255,255)
        ICONS

    elseif MenuItem(102)

        let icon$=DOS
        cls rgb(255,255,255)
        ICONS

    elseif MenuItem(103)

        let icon$=EIMER
        cls rgb(255,255,255)
        ICONS

    elseif MenuItem(104)

        let icon$=GESICHT
        cls rgb(255,255,255)
        ICONS

    elseif MenuItem(105)

        let icon$=SAND
        cls rgb(255,255,255)
        ICONS

    elseif MenuItem(106)

        let icon$=WASSER
        cls rgb(255,255,255)
        ICONS

    elseif MenuItem(107)

        let icon$=MUELL
        cls rgb(255,255,255)
        ICONS

    elseif MenuItem(108)

        let icon$=BAUM
        cls rgb(255,255,255)
        ICONS

    elseif MenuItem(109)

        let icon$=DRUCKER
        cls rgb(255,255,255)
        ICONS

    elseif MenuItem(110)

        let icon$=EIS
        cls rgb(255,255,255)
        ICONS

    elseif MenuItem(111)

        let icon$=KNOPF1
        cls rgb(255,255,255)
        ICONS

    elseif MenuItem(112)

        let icon$=MUENZE
        cls rgb(255,255,255)
        ICONS

    elseif MenuItem(113)

        let icon$=STEIN
        cls rgb(255,255,255)
        ICONS

    elseif MenuItem(114)

        let icon$=WEG
        cls rgb(255,255,255)
        ICONS

    elseif MenuItem(115)

        let icon$=COMPUTER
        cls rgb(255,255,255)
        ICONS

    elseif MenuItem(116)

        let icon$=EDITOR
        cls rgb(255,255,255)
        ICONS

    elseif MenuItem(117)

        let icon$=FILEICON
        cls rgb(255,255,255)
        ICONS

    elseif MenuItem(118)

        let icon$=KNOPF2
        cls rgb(255,255,255)
        ICONS

    elseif MenuItem(119)

        let icon$=PROFAN
        cls rgb(255,255,255)
        ICONS

    elseif MenuItem(120)

        let icon$=TEXT
        cls rgb(255,255,255)
        ICONS

    elseif MenuItem(121)

        let icon$=WINDOWS
        cls rgb(255,255,255)
        ICONS

    endif

wend

end
 
07/16/07  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.121 Views

Untitledvor 0 min.
H.Brill10/01/23
AndreasS12/22/18
Jörg Sellmeyer06/23/18
Wolle4904/02/15
More...

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie