The true Window$
[You Need]
Cloggy's D3D Plugin
Type oWindow
w as integer
h as integer
x as integer
y as integer
title as string
img as integer
dragging as integer
prio as integer
image as integer
icons as integer
oldx as integer
oldy as integer
oldw as integer
oldh as integer
minimized as integer
app as integer
Endtype
Global Windows
Global MXX
Global MYY
Global GrapX
Global GrapY
Global DraggingMarking
Global MarkDragX
Global MarkDragY
Global highestprio
Global DirSelected
Global TaskbarImg
Global StartOpen
Global MouseCLK
Global ImportantZone
Global CantDrag
Global CurrentPaint=1000
Dim PaintzorUtils(1000,1) as integer
Dim Window(0) as oWindow
Global OutlookTime
CreateWindowImages()
Create Bitmap 1,11,11
rem Ink ,RGB(0,128,255)
D3D_Box 0,0,10,10,RGB(0,128,255)
rem Ink RGB(255,255,255),RGB(255,255,255)
D3D_Line 0,10,0,0,RGB(255,255,255)
D3D_Line 0,10,10,10,RGB(255,255,255)
D3D_Line 0,0,10,0,RGB(255,255,255)
D3D_Line 10,0,10,11,RGB(255,255,255)
D3D_Line 0,3,10,3,RGB(255,255,255)
Get image 4,0,0,11,11,RGB(255,255,255)
Delete Bitmap 1
MakeTaskBar()
MakeWindow(4,"Test Window",10,10,640,480,3,1)
MakeWindow(4,"Test Window2",50,50,640,480,3,1)
MakeWindow(4,"Test Window3",200,200,100,300,3,1)
MakeWindow(4,"[SHOW FPS]",300,300,300,300,0,1)
Sync on
Sync Rate 0
Backdrop Off
Do
MXX=Mousex()
MYY=Mousey()
If DraggingMarking>0 or NoneDragging()=0
If MYY>Screen Height()-25 then MYY=Screen Height()-27
Endif
CheckKeys()
DrawDir()
HandleWindows()
DrawTaskBar()
fastsync
cls 0
Loop
Function HandleWindows()
For wina=0 to windows-1
If Window(wina).prio>0 and Window(wina).minimized=0
LowestPrio=999
For wina2=0 to windows-1
if Window(wina2).prio>0 and Window(wina2).minimized=0
if Window(wina2).prio<LowestPrio and Window(wina2).prio>oldPrio then LowestPrio=Window(wina2).prio:win=wina2
endif
Next wina2
oldPrio=LowestPrio
img=Window(win).img:title$=Window(win).title
x=Window(win).x:y=Window(win).y
w=Window(win).w:h=Window(win).h
Paste Image Window(win).image,x,y
if window(win).title="[SHOW FPS]" then fpsWin=1:window(win).title="FPS : "+str$(screen fps())
witdth=window(win).w-text width(window(win).title)
lens=len(window(win).title)
For tx=0 to witdth
Text x+13+(tx*8),y,mid$(window(win).title,tx)
if tx=lens then exit
Next tx
if fpsWin=1 then window(win).title="[SHOW FPS]":fpsWin=0
HandleMouseEvents(Win)
endif
Next wina
Endfunction
Function DrawDir()
if DirSelected=0 then D3D_box 10,10,60,50,rgb(232, 197, 115) else D3D_box 10,10,60,50,rgb(0, 197, 255)
text 10,60,"Window$"
If Mouseclick() and mouseCLK=0
For Win=0 to windows-1
If Window(win).prio>0 and Window(win).minimized=0
If MouseArea(Window(win).x,Window(win).y,Window(win).x+Window(win).w+1,Window(win).y+Window(win).h) then bad=1
endif
Next Win
If bad=0
If MouseArea(10,10,60,50)
If DirSelected=1 then MakeWindow(4,"Window$",400,400,640,480,3,1):DirSelected=2
If DirSelected=0 then DirSelected=1
Else
DirSelected=0
Endif
Endif
mouseCLK=1
Endif
If DirSelected=2
If mouseclick()=0 then DirSelected=0
Endif
If mouseCLK=1
If mouseclick()=0 then mouseCLK=0
Endif
Endfunction
Function MakeTaskBar()
Create Bitmap 1,screen width(),25
For y=0 to 25
D3D_Line 0,y,screen width(),y,rgb(0,128,255-(25-y))
Next y
For y=0 to 25
D3D_Line 0,y,100,y,rgb(0,255-(25-y),128)
Next y
D3D_Circle screen width()-100,25-12,5,0,RGB(0,0,0)
D3D_Line screen width()-100,25-7,screen width()-100,25,RGB(0,0,0)
D3D_Line screen width()-100,25-25,screen width()-100,25-17,RGB(0,0,0)
D3D_Line screen width()-102,25-12,screen width()-97,25-14,rgb(255,255,255)
D3D_Line screen width()-102,25-12,screen width()-97,25-10,rgb(255,255,255)
D3D_box 5,25-20,20,25-5,rgb(255,255,255)
Text 30,25-20,"Start"
TaskbarIMG=FreeImage()
Get Image TaskbarIMG,0,0,screen width(),25
Delete Bitmap 1
Endfunction
Function DrawTaskBar()
Paste Image TaskbarIMG,0,Screen Height()-25
Text screen width()-80,screen height()-20,get time$()
if windows>8 then wins=7 else wins=windows-1
For i=0 to wins
If Window(i).prio>0 and Window(i).app>0
If Window(i).prio=HighestPrio
D3D_Box 120+(x*91),screen height()-23,210+(x*91),screen height()-2,Rgb(0, 128, 192)
Endif
D3D_Line 120+(x*91),screen height()-2,210+(x*91),screen height()-2,Rgb(255,255,255)
D3D_Line 120+(x*91),screen height()-2,120+(x*91),screen height()-23,Rgb(255,255,255)
D3D_Line 120+(x*91),screen height()-23,210+(x*91),screen height()-23,Rgb(255,255,255)
D3D_Line 210+(x*91),screen height()-23,210+(x*91),screen height()-2,Rgb(255,255,255)
Paste Image window(i).img,124+(x*91),screen height()-16
if window(i).title="[SHOW FPS]" then fpsWin=1:window(i).title="FPS : "+str$(screen fps())
lens=len(window(i).title)
For tx=0 to 8
Text 127+(x*91)+(tx*8),Screen Height()-20,mid$(window(i).title,tx)
if lens=tx then exit
Next tx
if fpsWin=1 then window(i).title="[SHOW FPS]":fpsWin=0
If MouseClick() and DraggingMarking=0 and NoneDragging()
If MouseArea(120+(x*91),screen height()-23,210+(x*91),screen height()-2)
setWinPrio(i)
Window(i).minimized=0
Endif
Endif
inc x,1
Endif
Next i
Endfunction
Function WindowByTitle(title$)
For win=0 to windows-1
if window(win).title=title$ then found=1:o=win
Next win
if found=0 then o=-1
Endfunction o
Function HandleMouseEvents(Win)
If MouseArea(Window(win).x,Window(win).y+15,Window(win).w,Window(win).h)
If NoneDragging()
CantDrag=1
Else
CantDrag=0
Endif
Else
CantDrag=0
Endif
If Window(win).title="100 Diffrent ways to make suicude!"
ink 0,0
Center Text Window(win).x+Window(win).w/2,Window(win).y+50,"Are you depressed because your Window$ is crashing all the time?"
Center Text Window(win).x+Window(win).w/2,Window(win).y+60,"Well dont be anymore!"
Center Text Window(win).x+Window(win).w/2,Window(win).y+70,"Because we offer 100 ways to make suicude and say good bye to Window$ :)"
Center Text Window(win).x+Window(win).w/2,Window(win).y+80,"1. Eat your dog!"
Center Text Window(win).x+Window(win).w/2,Window(win).y+90,"2. Eat your cat! (We highly recommend to eat Benjamin!)"
Center Text Window(win).x+Window(win).w/2,Window(win).y+100,"3. Get into Apollo and insult the TGC and Dark Basic all the way you can!"
Center Text Window(win).x+Window(win).w/2,Window(win).y+120,"Find the 97 other ways somewhere!"
Center Text Window(win).x+Window(win).w/2,Window(win).y+160,"Your Lovely, HotChick_x667"
ink rgb(255,255,255),rgb(255,255,255)
Endif
If Window(win).title="Out@$@£€€//**look"
If Timer()<OutLookTime
For x=0 to rnd(19)+1
dots$=dots$+"."
Next x
Ink 0,0
Center Text Window(win).x+Window(win).w/2,Window(win).y+Window(win).h/2,"Starting Out@$@£€€//**look "+dots$
Ink Rgb(255,255,255),Rgb(255,255,255)
Endif
If Timer()>OutLookTime
Ink 0,0
For x=0 to 2
If MouseArea(Window(win).x+300,Window(win).y+100+(20*x)-5,Window(win).x+Window(win).w,Window(win).y+100+(20*x)+15)
D3D_Box Window(win).x+300,Window(win).y+100+(20*x)-5,Window(win).x+Window(win).w,Window(win).y+100+(20*x)+15,RGB(0,0,255)
If Mouseclick() and CantDrag=0 and NoneDragging()
If x=0 then MakeWindow(4,"100 Diffrent ways to make suicude!",100,100,640,480,3,1)
If x=1 then BlueScreen("0F","0534:X3000O4","EXD DDM(0"+str$(rnd(8)+1)+")","002FROX4",win)
If x=2 then ErrorMessage("Have a good day!","Unfortunally Window$ found that mail on your inbox and took the 1 billion to in their wallets.")
Endif
Endif
Next x
Text Window(win).x+5,Window(win).y+25,"You have "+str$(rnd(9999))+" new mails!"
Text Window(win).x+300,Window(win).y+100,"NEW : 100 Diffrent ways to make suicude!"
Text Window(win).x+300,Window(win).y+120,"NEW : This is not a virus!"
Text Window(win).x+300,Window(win).y+140,"NEW : YOU HAVE WON 1 BILLION!!!"
Text Window(win).x+5,Window(win).y+Window(win).h-50,"Whats New?"+Chr$(10)+Chr$(13)+"Window$ sends nowdays all your passwords"+Chr$(10)+Chr$(13)+"and your personal informations to all strangers! Isnt that fun :)"
Ink Rgb(255,255,255),Rgb(255,255,255)
Endif
Endif
If Window(win).title="Pa$££$@in£€£$ttor"
If MouseArea(Window(win).x,Window(win).y+15,Window(win).w,Window(win).h)
If Mouseclick()
If CurrentPaint=1000
ErrorMessage("ER0R!","Cannot paint because window$ failed to intialize: PAINTZOR UTILS v2.0")
ErrorMessage("WinHelp","Window$ tries now to start the PAINTZOR UTILS v2.0")
Undim PaintzorUtils(0)
Dim PaintzorUtils(1000,1) as integer
ErrorMessage("WinHelp","PAINTZOR UTILS v2.0 Intialized!")
CurrentPaint=0
Else
PaintzorUtils(CurrentPaint,0)=MXX-Window(win).x
PaintzorUtils(CurrentPaint,1)=MYY-Window(win).y
inc CurrentPaint,1
Endif
Endif
Endif
For x=0 to Currentpaint
D3D_Dot Window(win).x+PaintzorUtils(x,0),Window(win).y+PaintzorUtils(x,1),RGB(0,0,0)
Next x
Endif
If Window(win).title<>"Start"
If Mouseclick() and DraggingMarking=0
If Window(win).icons>0
If Window(win).icons>=1
If MouseArea(Window(win).x+Window(win).w-10,Window(win).y+1,Window(win).x+Window(win).w-1,Window(win).y+13) and NoneDragging()
DestoroyWindow(win)
Endif
Endif
If Window(win).icons>=2
If MouseArea(Window(win).x+Window(win).w-25,Window(win).y+1,Window(win).x+Window(win).w-15,Window(win).y+13) and NoneDragging()
DestoroyWindow(win)
If Window(win).w=Screen Width() and Window(win).h=Screen Height()
MakeWindow(4,Window(win).title,Window(win).oldx,Window(win).oldy,Window(win).oldw,Window(win).oldh,Window(win).icons,Window(win).app)
Window(win).oldx=0:Window(win).oldy=0:Window(win).oldw=0:Window(win).oldh=0
Else
Window(win).oldx=Window(win).x:Window(win).oldy=Window(win).y
Window(win).oldw=Window(win).w:Window(win).oldh=Window(win).h
MakeWindow(4,Window(win).title,0,0,screen width(),screen height(),Window(win).icons,Window(win).app)
Endif
Endif
Endif
If Window(win).icons>=3
If MouseArea(Window(win).x+Window(win).w-40,Window(win).y+1,Window(win).x+Window(win).w-27,Window(win).y+13) and NoneDragging()
Window(win).minimized=1
Window(win).prio=1
Endif
Endif
Endif
If Window(win).minimized=0 and Window(win).prio>0
If Window(win).w<Screen Width() and Window(win).h<Screen Height()
If CantDrag=0
If MouseArea(Window(win).x,Window(win).y,Window(win).x+Window(win).w+1,Window(win).y+15) and NoneDragging() or Window(win).Dragging=1
If Window(win).Dragging=0
GrapX=MXX-Window(win).x
GrapY=MYY-Window(win).y
SetWinPrio(win)
Endif
Window(win).x=MXX
Window(win).y=MYY
Window(win).x=Window(win).x-GrapX
Window(win).y=Window(win).y-GrapY
Window(win).Dragging=1
Endif
Endif
Endif
Endif
Endif
Endif
If Window(win).title="Start"
If MouseArea(0,Screen Height()-25,100,Screen Height())=0
ImportantZone=0
Endif
If Window(win).prio>0
D3D_Line 1,Screen Height()-60,Window(win).w,Screen Height()-60,RGB(0,0,0)
ink rgb(0,0,0),rgb(0,0,0)
if MouseArea(1,Window(win).h,Window(win).w,Screen Height()-60)
D3D_Box 1,Window(win).h,Window(win).w,Screen Height()-60,RGB(0,0,255)
ImportantZone=1
If Mouseclick()
MakeWindow(4,"AllProg",Window(win).w,200,200,Screen Height()-25,0,0)
Endif
endif
Text 20,Screen Height()-50,"All Programs ->"
For times=0 to 5
if MouseArea(1,Screen Height()-(120+(50*times)),Window(win).w,Screen Height()-(80+(50*times)))
ImportantZone=1
D3D_Box 1,Screen Height()-(120+(50*times)),Window(win).w,Screen Height()-(80+(50*times)),RGB(0,0,255)
If Mouseclick()
MakeWindow(4,"Pa$££$@in£€£$ttor",100,100,640,480,3,1)
Endif
endif
D3D_Box 10,Screen Height()-(120+(50*times)),40,Screen Height()-(80+(50*times)),RGB(128, 0, 64)
text 60,Screen Height()-(100+(50*times)),"Pa$££$@in£€£$ttor"
next times
Line 1,Screen Height()-(120+(50*6)),Window(win).w,Screen Height()-(120+(50*6))
For times=7 to 8
if MouseArea(1,Screen Height()-(120+(50*times)),Window(win).w,Screen Height()-(80+(50*times)))
ImportantZone=1
D3D_Box 1,Screen Height()-(120+(50*times)),Window(win).w,Screen Height()-(80+(50*times)),RGB(0,0,255)
If Mouseclick()
MakeWindow(4,"Out@$@£€€//**look",100,100,640,480,3,1):OutLookTime=Timer()+10000
Endif
endif
D3D_Box 10,Screen Height()-(120+(50*times)),40,Screen Height()-(80+(50*times)),RGB(128, 0, 64)
text 60,Screen Height()-(100+(50*times)),"Out@$@£€€//**look"
next times
ink rgb(255,255,255),rgb(255,255,255)
Endif
Endif
If ImportantZone=0
If Mouseclick()
If MouseArea(0,Screen Height()-25,100,Screen Height())
If StartOpen=0 then MakeWindow(4,"Start",0,200,200,Screen Height()-25,0,0)
StartOpen=1
Else
If ImportantZone=0
StartOpen=0
win=WindowByTitle("Start")
if win>-1 then DestoroyWindow(win)
win=WindowByTitle("AllProg")
if win>-1 then DestoroyWindow(win)
Endif
Endif
Endif
Endif
If win<=Array COunt(window(0))
If Mouseclick()=0 then Window(win).Dragging=0
Endif
Endfunction
Function BlueScreen(a$,b$,c$,d$,win)
Do
D3D_Box 0,0,Screen Width(),Screen Height(),RGB(0,0,255)
D3D_Box Screen Width()/2-50,Screen Height()/2-19,Screen Width()/2+50,Screen Height()/2-6
ink RGB(0,0,255),RGB(0,0,255)
Center Text Screen Width()/2,Screen Height()/2-20,"Window$"
ink rgb(255,255,255),rgb(255,255,255)
Center Text Screen Width()/2,Screen Height()/2,"A fatal exception "+a$+" has occured at "+b$+" in "+c$+" +"
Center Text Screen Width()/2,Screen Height()/2+10,d$+". The application will be terminated."
Center Text Screen Width()/2,Screen Height()/2+40,"* Press any key to terminate the current application."
Center Text Screen Width()/2,Screen Height()/2+50,"* Press CTRL+ALT+DEL again to restart your computer. You will"
Center Text Screen Width()/2,Screen Height()/2+60," lose any unsaved information in all applications."
Center Text Screen Width()/2,Screen Height()/2+80,"Press any key to continue"
Sync
If Keystate(29) or Keystate(157)
If Keystate(56) or Keystate(184)
If Keystate(211) or Keystate(83)
Exit Prompt "BLUE SCREEN CRASHED! Because 1 was not 0!!","CRASH!"
End
Endif
Endif
Endif
If ScanCode()>0 and Keystate(29)=0 and Keystate(157)=0 and Keystate(56)=0 and Keystate(184)=0 and Keystate(211)=0 and Keystate(83)=0 then exit
Loop
DestoroyWindow(win)
Endfunction
Function ErrorMessage(Title$,Message$)
Cls 0
If Text Width(Title$)>Text Width(Message$) then Longest=Text Width(Title$) else Longest=Text Width(Message$)
Height=Text Height(Title$)+Text Height(Message$)
error=MakeWindow(4,Title$,0,screen height()/2,Longest+10,Height,0,0)
win=error
img=Window(win).img:title$=Window(win).title
x=Window(win).x:y=Window(win).y
w=Window(win).w:h=Window(win).h
Paste Image Window(win).image,x,y
witdth=window(win).w-text width(window(win).title)
lens=len(window(win).title)
For tx=0 to witdth
Text x+13+(tx*8),y,mid$(window(win).title,tx)
if tx=lens then exit
Next tx
Ink 0,0
Text 5,screen height()/2+19,Message$
ink Rgb(255,255,255),Rgb(255,255,255)
sync
Wait Key
DestoroyWindow(error)
Endfunction
Function CheckKeys()
If Mouseclick() and NoneDragging() or DraggingMarking=1
For Win=0 to windows-1
If Window(win).prio>0 and Window(win).minimized=0
If MouseArea(Window(win).x,Window(win).y,Window(win).x+Window(win).w+1,Window(win).y+Window(win).h) then bad=1
Endif
Next Win
If bad=0 or DraggingMarking=1
If DraggingMarking=0
MarkDragX=MXX
MarkDragY=MYY
Endif
D3D_Line MarkDragX,MarkDragY,MXX,MarkDragY,Rgb(255,255,255)
D3D_Line MarkDragX,MarkDragY,MarkDragX,MYY,Rgb(255,255,255)
D3D_Line MXX,MarkDragY,MXX,MYY,Rgb(255,255,255)
D3D_Line MarkDragX,MYY,MXX,MYY,Rgb(255,255,255)
DraggingMarking=1
Endif
Endif
If Mouseclick()=0 then DraggingMarking=0
Endfunction
Function FindWindow()
for win=0 to windows-1
if window(win).prio=0 then ok=win:found=1
next win
if found=0 then ok=-1
Endfunction ok
Function DestoroyWindow(win)
window(win).prio=0:window(win).dragging=0
Endfunction
Function SetWinPrio(win)
If Window(win).prio>0 and Window(win).minimized=0
For wina=0 to windows-1
if wina<>win
if window(wina).prio>high then high=window(wina).prio
endif
Next wina
window(win).prio=high+1
highestprio=high+1
endif
Endfunction
Function NoneDragging()
For win=0 to windows-1
If Window(win).prio>0 and Window(win).minimized=0
if Window(win).dragging=1 then bad=1
endif
Next win
if bad=1 then ok=0 else ok=1
Endfunction ok
Function MouseArea(x1,y1,x2,y2)
if x1<x2 then first=x1:second=x2:else first=x2:second=x1
if y1<y2 then first2=y1:second2=y2:else first2=y2:second2=y1
If MXX>first and MXX<second
If MYY>first2 and MYY<second2
ok=1
Endif
Endif
Endfunction ok
Function MakeWindow(Img,Title$,x,y,w,h,icons,app)
Lock Pixels
found=FindWindow()
if found>-1 then windowsi=found else windowsi=windows
if found=-1 then Dim Window(windows) as oWindow
Window(windowsi).img=img:Window(windowsi).title=title$
Window(windowsi).x=x:Window(windowsi).y=y
Window(windowsi).w=w:Window(windowsi).h=h
Window(windowsi).prio=Windows+1:highestprio=Windows+1
Window(windowsi).icons=icons:Window(windowsi).app=app
returni=Windowsi
Create Bitmap 1,w+3,h+18
D3d_Box 0,0,w,h+15,RGB(255,255,255)
For yi=0 to 15
D3D_Line 0,yi,w+3,yi,rgb(0, 128, 255-yi)
Next yi
For mx=0 to 2
D3D_Line mx,15,mx+w,15,rgb(0, 128, 192)
D3D_Line mx,15,mx,15+h+1,rgb(0, 128, 192)
For yi=1 to 3
D3D_Line mx,15+h+yi,mx+w+1,15+h+yi,rgb(0, 128, 192)
Next yi
D3D_Line mx+w,15,mx+w,15+h+2,rgb(0, 128, 192)
Next mx
if icons>=0 then Paste Image Img,4,15-13
if icons>=1 then Paste Image 1,w-10,15-13
if icons>=2 then Paste Image 2,w-25,15-13
if icons>=3 then Paste Image 3,w-40,15-13
image=freeImage()
Get Image image,0,0,w+3,h+18
Window(windowsi).image=image
Delete bitmap 1
if found=-1 then Inc windows,1
Unlock pixels
Endfunction returni
Function FreeImage()
repeat
inc o,1
Until image exist(o)=0
Endfunction o
Function CreateWindowImages()
Create Bitmap 1,11,11
D3D_Box 0,0,10,10,RGB(255,0,0)
D3D_Line 7,2,2,7,RGB(255,255,255)
D3D_Line 7,7,2,2,RGB(255,255,255)
D3D_Line 0,10,0,0,RGB(255,255,255)
D3D_Line 0,10,10,10,RGB(255,255,255)
D3D_Line 0,0,10,0,RGB(255,255,255)
D3D_Line 10,0,10,11,RGB(255,255,255)
Get image 1,0,0,11,11,1
Delete Bitmap 1
Create Bitmap 1,11,11
D3D_Box 0,0,10,10,RGB(0,128,255)
D3D_Line 0,10,0,0,RGB(255,255,255)
D3D_Line 0,10,10,10,RGB(255,255,255)
D3D_Line 0,0,10,0,RGB(255,255,255)
D3D_Line 10,0,10,11,RGB(255,255,255)
D3D_Line 2,6,2,2,RGB(255,255,255)
D3D_Line 2,6,6,6,RGB(255,255,255)
D3D_Line 2,2,6,2,RGB(255,255,255)
D3D_Line 6,2,6,7,RGB(255,255,255)
Get image 2,0,0,11,11,1
Delete Bitmap 1
Create Bitmap 1,11,11
D3D_Box 0,0,10,10,RGB(0,128,255)
D3D_Line 0,10,0,0,RGB(255,255,255)
D3D_Line 0,10,10,10,RGB(255,255,255)
D3D_Line 0,0,10,0,RGB(255,255,255)
D3D_Line 10,0,10,11,RGB(255,255,255)
D3D_Line 2,8,7,8,RGB(255,255,255)
Get image 3,0,0,11,11,1
Delete Bitmap 1
Endfunction
Click For Details!