Ooops
January 19, 2021, 06:14:36 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Forum
Help
Search
Gallery
Login
Register
SyntaxBomb - Indie Coders
»
Languages & Coding
»
Blitz Code Archives
»
BlitzPlus Gui
»
[bb] Win 3.11 style window by Nebula [ 1+ years ago ]
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: [bb] Win 3.11 style window by Nebula [ 1+ years ago ] (Read 550 times)
BlitzBot
Jr. Member
Posts: 1
[bb] Win 3.11 style window by Nebula [ 1+ years ago ]
«
on:
June 29, 2017, 12:28:39 AM »
Title :
Win 3.11 style window
Author :
Nebula
Posted :
1+ years ago
Description :
Empty Windows 3.11 style window with minimize close and titlebar movement and no resizing.
One function call deals with the window.
Code :
Code: BlitzBasic
Global
mywin
Global
wintitle$ =
"My window"
Global
winx =
100
Global
winy =
100
Global
winwidth =
320
Global
winheight =
200
Global
myox,myoy
Global
buttonmin
Global
buttonclose
Global
mytbar
Global
mylock
makemywin
While
myExit =
False
we = WaitEvent
(
)
mywin we
Wend
End
Function
makemywin
(
)
mywin = CreateWindow
(
wintitle$ ,winx,winy,winwidth,winheight,Desktop
(
)
,
0
)
buttonmin = CreateButton
(
"--"
,GadgetWidth
(
mywin
)
-
64
,+
1
,
32
,
16
-
2
,mywin
)
buttonclose = CreateButton
(
"X"
,GadgetWidth
(
mywin
)
-
32
,+
1
,
32
,
16
-
2
,mywin
)
mytbar = CreateCanvas
(
0
,
0
,GadgetWidth
(
mywin
)
,
16
,mywin
)
SetBuffer
CanvasBuffer
(
mytbar
)
ClsColor
0
,
0
,
200
Cls
Color
255
,
255
,
255
Text
10
,
2
,wintitle$
FlipCanvas mytbar
End Function
Function
mywin
(
action
)
Select
action
Case
$401
; button
If
EventSource
(
)
= buttonmin
Then
MinimizeWindow
(
mywin
)
If
EventSource
(
)
= buttonclose
Then
End
Case
$201
; mousedown
If
EventSource
(
)
= mytbar
mylock =
True
myox = EventX
(
)
myoy = EventY
(
)
End If
Case
$202
; mouseup
If
EventSource
(
)
= mytbar
mylock =
False
End If
Case
$203
; mousemove
If
EventSource
(
)
= mytbar
If
mylock =
True
Then
SetGadgetShape mywin,
MouseX
(
)
-myox,
MouseY
(
)
-myoy,ClientWidth
(
mywin
)
,ClientHeight
(
mywin
)
End If
End If
Case
$206
;mouseleave
If
EventSource
(
)
= mytbar
mylock=
False
End If
End Select
End Function
Comments :
Zeachco(Posted 1+ years ago)
Nice little tips to make a customed window interface ;)thx
bytecode77(Posted 1+ years ago)
but not very nice to post in a 1 year old thread...
Yan(Posted 1+ years ago)
...But perfectly acceptable in the code archives...
Ked(Posted 1+ years ago)
Agreed.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
SyntaxBomb - Indie Coders
»
Languages & Coding
»
Blitz Code Archives
»
BlitzPlus Gui
»
[bb] Win 3.11 style window by Nebula [ 1+ years ago ]
SimplePortal 2.3.6 © 2008-2014, SimplePortal