[B3D, B+] Anwendung ohne Fenster, frei positionierbar

Übersicht BlitzBasic DLLs und Userlibs

Neue Antwort erstellen

EPS

Betreff: [B3D, B+] Anwendung ohne Fenster, frei positionierbar

BeitragMo, Jul 10, 2006 11:18
Antworten mit Zitat
Benutzer-Profile anzeigen
saublöder Titel, hoffe trotzdem das jemand den Code sinnvoll findet. Hatte schonmal was ähnliches gemacht, aber das hier ist wesentlich schneller und fortschrittlicher Wink

Code: [AUSKLAPPEN]
;========================================
; Fensterlose Applikation für [B3D, B+]; Freeware '2006 by East-Power-Soft

; Diese Funktionen "verstecken" das BlitzBasic Fenster (Titelleiste und Rahmen) und zeigen nur dessen Inhalt an
; Die Fensterposition kann verändert werden.

; Die nachfolgenden Zeilen (ohne REM) in eine decls Datei kopieren und im Userlibs Ordner von BB speichern:

;.lib "gdi32.dll"
;dll_CreateRectRgn% (X1%, Y1%, X2%, Y2%) : "CreateRectRgn"
;dll_DeleteObject% (hObject%) : "DeleteObject"

;.lib "user32.dll"
;dll_GetSystemMetrics% (nIndex%) : "GetSystemMetrics"
;dll_GetWindowRect% (hwnd%, lpRect*) : "GetWindowRect"
;dll_GetDesktopWindow% () : "GetDesktopWindow"
;dll_SetWindowPos% (hwnd%, hWndInsertAfter%, x%, y%, cx%, cy%, wFlags%) : "SetWindowPos"
;dll_GetActiveWindow% () : "GetActiveWindow"
;dll_SetWindowRgn% (hWnd%, hRgn%, bRedraw%) : "SetWindowRgn"
;========================================

Graphics 400,240,0,2

gw = GraphicsWidth()
gh = GraphicsHeight()
dw = DesktopWidth()
dh = DesktopHeight()

s$ = "......Fensterlose Applikation....."


SetBuffer BackBuffer()
Window_Hide()
Repeat

   If t<MilliSecs() Then
      t=MilliSecs()+30

      x=(dw-gw)/2 + 200*Cos(i#)
      y=(dh-gh)/2 + 200*Sin(i#)
      i#=(i#+0.5) Mod 360
      
      If p<Len(s$)-1 Then p=p+1 Else p=1

      Color 0,0,$FF0000:Rect 0,0,gw,gh,1
      Color 0,0,$FFFF00:Rect 0,0,gw,gh,0
      Color 0,0,$000000:Text gw/2,gh/2,Left$(s$,p),1,1

   End If
   
   Window_Setpos x,y

   Flip
Until KeyHit(1)



Function DesktopWidth()
;========================================
; Ermittle Windows Desktopbreite
;========================================
   Local struct_rect% = CreateBank(16)

   dll_GetWindowRect(dll_GetDesktopWindow(),struct_rect)
   Local res = PeekInt(struct_rect,8)
   FreeBank struct_rect

   Return res
End Function



Function DesktopHeight()
;========================================
; Ermittle Windows Desktophöhe
;========================================
   Local struct_rect% = CreateBank(16)

   dll_GetWindowRect(dll_GetDesktopWindow(),struct_rect)
   Local res = PeekInt(struct_rect,12)
   FreeBank struct_rect

   Return res
End Function



Function Window_Hide()
;========================================
; Verstecke BB Fenster
;========================================

   Local ww% = GraphicsWidth()
   Local wh% = GraphicsHeight()

   Local xoff% = dll_GetSystemMetrics(7)
   Local yoff% = dll_GetSystemMetrics(8) + dll_GetSystemMetrics(4)

   Local hRgn% = dll_CreateRectRgn(xoff, yoff, ww+xoff, wh+yoff)

   dll_SetWindowRgn(dll_GetActiveWindow(), hRgn, True)
   dll_DeleteObject(hRgn)

End Function



Function Window_SetPos(x%, y%)
;========================================
; Setze BB Fensterposition
;========================================

   Local xoff% = dll_GetSystemMetrics(7)
   Local yoff% = dll_GetSystemMetrics(8) + dll_GetSystemMetrics(4)

   dll_SetWindowPos(dll_GetActiveWindow(),0,x-xoff,y-yoff,0,0,5)

End Function
mGUI - Graphical User Interface für Blitz3D...Informationen gibt es hier

Man kann sich öfter als zweimal im Leben halb tot lachen.

Blitzcoder

Newsposter

BeitragMo, Jul 10, 2006 11:36
Antworten mit Zitat
Benutzer-Profile anzeigen
Gab es sowas nicht schonmal? Funktioniertr ganz gut, aber gehört es nicht in Userlib Forum?

MfG Blitzcoder
P4 3 Ghz@3,55Ghz|GF 6600GT 256MB|Samsung 80GB | 2x Samsung 160GB|2048MB DDR-400 RAM|6 Mbit Flatrate | Logitech G15 | Samsung 225BW-TFT | Ubuntu Gutsy Linux | Windows Vista | Desktop | Blog | CollIDE | Worklog
________________
|°°°°°°°°°°°°°°||'""|""\__,_
|______________ ||__ |__|__ |)
|(@) |(@)"""**|(@)(@)****|(@)

Goodjee

BeitragMo, Jul 10, 2006 12:40
Antworten mit Zitat
Benutzer-Profile anzeigen
is doch keine userlib dabei
"Ideen sind keine Coladosen, man kann sie nicht recyclen"-Dr. House
http://deeebian.redio.de/ http://goodjee.redio.de/

Blitzcoder

Newsposter

BeitragMo, Jul 10, 2006 12:47
Antworten mit Zitat
Benutzer-Profile anzeigen
Also ich bezechne sowas als Userlib: Zitat:
;.lib "gdi32.dll"
;dll_CreateRectRgn% (X1%, Y1%, X2%, Y2%) : "CreateRectRgn"
;dll_DeleteObject% (hObject%) : "DeleteObject"

;.lib "user32.dll"
;dll_GetSystemMetrics% (nIndex%) : "GetSystemMetrics"
;dll_GetWindowRect% (hwnd%, lpRect*) : "GetWindowRect"
;dll_GetDesktopWindow% () : "GetDesktopWindow"
;dll_SetWindowPos% (hwnd%, hWndInsertAfter%, x%, y%, cx%, cy%, wFlags%) : "SetWindowPos"
;dll_GetActiveWindow% () : "GetActiveWindow"
;dll_SetWindowRgn% (hWnd%, hRgn%, bRedraw%) : "SetWindowRgn"
;========================================


MfG Blitzcoder
P4 3 Ghz@3,55Ghz|GF 6600GT 256MB|Samsung 80GB | 2x Samsung 160GB|2048MB DDR-400 RAM|6 Mbit Flatrate | Logitech G15 | Samsung 225BW-TFT | Ubuntu Gutsy Linux | Windows Vista | Desktop | Blog | CollIDE | Worklog
________________
|°°°°°°°°°°°°°°||'""|""\__,_
|______________ ||__ |__|__ |)
|(@) |(@)"""**|(@)(@)****|(@)

EPS

BeitragMo, Jul 10, 2006 13:36
Antworten mit Zitat
Benutzer-Profile anzeigen
Das nächste mal mache ichs ins Userlib Forum bis jemand meckert das da ja BB Code dabei ist und es somit ins Codearchiv gehört Twisted Evil Wink
mGUI - Graphical User Interface für Blitz3D...Informationen gibt es hier

Man kann sich öfter als zweimal im Leben halb tot lachen.

BladeRunner

Moderator

BeitragMo, Jul 10, 2006 13:55
Antworten mit Zitat
Benutzer-Profile anzeigen
~VERSCHOBEN~
Dieser Thread passte nicht in das Forum, in dem er ursprünglich gepostet wurde.
Zu Diensten, Bürger.
Intel T2300, 2.5GB DDR 533, Mobility Radeon X1600 Win XP Home SP3
Intel T8400, 4GB DDR3, Nvidia GF9700M GTS Win 7/64
B3D BMax MaxGUI

Stolzer Gewinner des BAC#48, #52 & #92

oware

BeitragDi, Aug 29, 2006 18:53
Antworten mit Zitat
Benutzer-Profile anzeigen
cool! Ich werds mal direkt in meine Programme einbauen Very Happy
www.myspace.com/oliverpuetz -> Mein Instrumentalprojekt

Neue Antwort erstellen


Übersicht BlitzBasic DLLs und Userlibs

Gehe zu:

Powered by phpBB © 2001 - 2006, phpBB Group