Buchempfehlung
MySQL kurz & gut
MySQL kurz & gut
Das preiswerte Taschen- buch stellt MySQL-rele- vante Inhalte systematisch und knapp dar, sodass es sich optimal zum Nach- schlagen beim Pro- grammieren eignet. [Mehr Infos...]
FreeBASIC-Chat
Es sind Benutzer im FreeBASIC-Chat online.
(Stand:  )
FreeBASIC bei Twitter
Twitter FreeBASIC-Nachrichten jetzt auch über Twitter erhalten. Follow us!

fb:porticula NoPaste

Info
Info / Hilfe
Liste
Übersicht / Liste
Neu
Datei hochladen
Suche
Quellcode suchen
Download
Dateidownload

für Westbeam: modifizierte WINDOW.bi

Uploader:MitgliedMuttonhead
Datum/Zeit:08.06.2012 23:39:14

Declare Sub DrawWindow(id As Integer)
Declare Sub WindowToTop(id As Integer)
'****************************
'****************************
'****************************
declare Sub WindowToBottom(id As Integer)
'****************************
'****************************
'****************************
Declare Sub WinAdd()

Sub DrawWindow(id As Integer)
    Dim As Integer x,y,w,h,t
    Dim As String textboxtext
    x=3
    y=3
    w=win(id).w
    h=win(id).h
    textboxtext=win(id).textboxtext
    t=(win(id).w/2-Len(win(id).title)*4)
        For i As Integer=1 To win(id).w/2-8
            Put win(winZ(id)).img,(x+16+2*i,y),wino,Trans
        Next
        Line win(winZ(id)).img, (x-1,y-1)-(w+1,h+1),&h808080,B
        Line win(winZ(id)).img, (x-3,y-3)-(w+3,h+3),&h808080,B
        Line win(winZ(id)).img, (x-2,y-2)-(w+2,h+2),&hFFFF00,B
        Line win(winZ(id)).img, (x+17,y-3)-(x+17,y-2),&h808080
        Line win(winZ(id)).img, (x-3,y+18)-(x-2,y+18),&h808080
        Line win(winZ(id)).img, (w-17,y-3)-(w-17,y-2),&h808080
        Line win(winZ(id)).img, (w+3,y+18)-(w+2,y+18),&h808080
        Line win(winZ(id)).img, (x+17,h+3)-(x+17,h+2),&h808080
        Line win(winZ(id)).img, (x-3,h-18)-(x-2,h-18),&h808080
        Line win(winZ(id)).img, (w-17,h+3)-(w-17,h+2),&h808080
        Line win(winZ(id)).img, (w+3,h-18)-(w+2,h-18),&h808080
        Line win(winZ(id)).img, (x,y+19)-(w,h),&hFFFFFF,BF
        Put win(winZ(id)).img, (x,y),winc,Trans
        Line win(winZ(id)).img, (x,y+18)-(w,y+18),&hCCCCCC
        Line win(winZ(id)).img, (x+17,y)-(x+17,y+17),&h808080
        If win(winZ(id)).textbox=1 Then
            Line win(winZ(id)).img,(x,h-23)-(w,h),&hc0c0c0,BF
            Line win(winZ(id)).img,(x,h-23)-(w,h-23),&h000000
            Line win(winZ(id)).img,(x+8,h-20)-(w-8,h-3),&h808080,B
            Line win(winZ(id)).img,(x+8,h-3)-(w-8,h-3),&hFFFFFF
            Line win(winZ(id)).img,(w-8,h-3)-(w-8,h-20),&hFFFFFF
            Color &h000000
            Draw String win(winz(id)).img,(x+12,h-18),textboxtext
        End If
        For i As Integer=1 To win(id).w/2-8
            Put win(winZ(id)).img2,(x+16+2*i,y),winog,Trans
        Next
        Line win(winZ(id)).img2, (x-1,y-1)-(w+1,h+1),&h808080,B
        Line win(winZ(id)).img2, (x-3,y-3)-(w+3,h+3),&h808080,B
        Line win(winZ(id)).img2, (x-2,y-2)-(w+2,h+2),&hCCCCCC,B
        Line win(winZ(id)).img2, (x+17,y-3)-(x+17,y-2),&h808080
        Line win(winZ(id)).img2, (x-3,y+18)-(x-2,y+18),&h808080
        Line win(winZ(id)).img2, (w-17,y-3)-(w-17,y-2),&h808080
        Line win(winZ(id)).img2, (w+3,y+18)-(w+2,y+18),&h808080
        Line win(winZ(id)).img2, (x+17,h+3)-(x+17,h+2),&h808080
        Line win(winZ(id)).img2, (x-3,h-18)-(x-2,h-18),&h808080
        Line win(winZ(id)).img2, (w-17,h+3)-(w-17,h+2),&h808080
        Line win(winZ(id)).img2, (w+3,h-18)-(w+2,h-18),&h808080
        Line win(winZ(id)).img2, (x,y+19)-(w,h),&hFFFFFF,BF
        Put win(winZ(id)).img2, (x,y),winc,Trans
        Line win(winZ(id)).img2, (x,y+18)-(w,y+18),&hCCCCCC
        Line win(winZ(id)).img2, (x+17,y)-(x+17,y+17),&h808080
        If win(winZ(id)).textbox=1 Then
            Line win(winZ(id)).img2,(x,h-23)-(w,h),&hc0c0c0,BF
            Line win(winZ(id)).img2,(x,h-23)-(w,h-23),&h000000
            Line win(winZ(id)).img2,(x+8,h-20)-(w-8,h-3),&h808080,B
            Line win(winZ(id)).img2,(x+8,h-3)-(w-8,h-3),&hFFFFFF
            Line win(winZ(id)).img2,(w-8,h-3)-(w-8,h-20),&hFFFFFF
            Color &h000000
            Draw String win(winz(id)).img2,(x+12,h-18),textboxtext
        End If
End Sub

Sub DrawWindowForGadgets(id As Integer)
win(winZ(id))
'****************************
'****************************
'****************************
'für Draw String alle win(id) zu win(winz(id)) gewandelt
    If id=anz_win Then
        Put (win(winZ(id)).x,win(winZ(id)).y),win(winZ(id)).img,Trans
        Color &hFFFFFF
        Draw String (win(winZ(id)).x+(win(winZ(id)).w/2-Len(win(winZ(id)).title)*4),win(winZ(id)).y+4),win(winZ(id)).title
        If win(winZ(id)).textbox=1 Then
            Color &h000000
            Draw String (win(winz(id)).x+15,win(winz(id)).y+win(winz(id)).h-18),win(winZ(id)).textboxtext
        End If
    Else
        Put (win(winZ(id)).x,win(winZ(id)).y),win(winZ(id)).img2,Trans
        Color &h000000
        Draw String (win(winZ(id)).x+(win(winZ(id)).w/2-Len(win(winZ(id)).title)*4),win(winZ(id)).y+4),win(winZ(id)).title
        If win(winZ(id)).textbox=1 Then
            Color &h000000
            Draw String (win(winz(id)).x+15,win(winz(id)).y+win(winz(id)).h-18),win(winZ(id)).textboxtext
        End If
    End If
End Sub

Sub WindowToTop(id As Integer)
    if id > anz_win then exit sub
    Dim TWinID As Uinteger = winZ(id)
    For X As Uinteger = id To anz_win -1
        winZ(x) = winZ(x + 1)
    Next
    winZ(anz_win) = TWinID
End Sub

'****************************
'****************************
'****************************
Sub WindowToBottom(id As Integer)
    if id > anz_win then exit sub
    Dim BWinID As Uinteger = winZ(id)
    For x As Uinteger = id To 2 step-1
        winZ(x) = winZ(x - 1)
    Next
    winZ(1) = BWinID
End Sub
'****************************
'****************************
'****************************

Sub WinAdd()
    if anz_win > anz_alloc then
        anz_alloc += 25
        'redim Preserve win(anz_alloc) as WizWindow
        'redim Preserve winZ(anz_alloc) as UInteger
    end if
    anz_win+=1
    winZ(anz_win) = anz_win
    win(winZ(anz_win)).img=Imagecreate(win(winZ(anz_win)).w+4,win(winZ(anz_win)).h+4)
    win(winZ(anz_win)).img2=Imagecreate(win(winZ(anz_win)).w+4,win(winZ(anz_win)).h+4)
    win(winZ(anz_win)).iconimg=Imagecreate(32,32)
    Bload win(winZ(anz_win)).icon,win(winZ(anz_win)).iconimg

End Sub