|
-
Oct 18th, 2000, 06:37 PM
#1
Thread Starter
Lively Member
Is it possible to make a button stick and not pop up when it is pressed like with toolbar buttons? Thanks.
-
Oct 18th, 2000, 06:58 PM
#2
Frenzied Member
add the Microsoft Forms 2.0 controls, it includes the Toggle button control
NXSupport - Your one-stop source for computer help
-
Oct 18th, 2000, 08:03 PM
#3
Addicted Member
Another way is to just use a check box and set it's style property to "Graphical"
It looks real nice.
-
Oct 18th, 2000, 08:07 PM
#4
_______
<?>
Code:
'this really looks too cool...
'can't get it to work with the normal button look but
'if I use the sunken 3d effect and call it to set it
'looks really really good...sunken and stays sunken.
'to view it copy and paste this code.
'Form1 Command1
'
Option Explicit
Public PixX, PixY, CTop, Clft, CRgt, CBtm, i, AddX, AddY
Public nowDown As Boolean
Public Sub ThreeDControl(Ctrl As _
Control, nBevel, nSpace, bInset)
PixX = Screen.TwipsPerPixelX
PixY = Screen.TwipsPerPixelY
CTop = Ctrl.Top - PixX
Clft = Ctrl.Left - PixY
CRgt = Ctrl.Left + Ctrl.Width
CBtm = Ctrl.Top + Ctrl.Height
' Color used below:
' dark gray = &H808080
' white = &HFFFFFF
If bInset Then 'inset border
For i = nSpace To (nBevel + nSpace - 1)
AddX = i * PixX
AddY = i * PixY
Ctrl.Parent.Line (Clft - AddX, CTop - _
AddY)-(CRgt + AddX, CTop - AddY), &H808080
Ctrl.Parent.Line (Clft - AddX, CTop - _
AddY)-(Clft - AddX, CBtm + AddY), &H808080
Ctrl.Parent.Line (Clft - AddX, CBtm + _
AddY)-(CRgt + AddX + PixX, CBtm + AddY), &HFFFFFF
Ctrl.Parent.Line (CRgt + AddX, CTop - _
AddY)-(CRgt + AddX, CBtm + AddY), &HFFFFFF
Next
Else 'outset border
For i = nSpace To (nBevel + nSpace - 1)
AddX = i * PixX
AddY = i * PixY
Ctrl.Parent.Line (CRgt + AddX, CBtm + _
AddY)-(CRgt + AddX, CTop - AddY), &H808080
Ctrl.Parent.Line (CRgt + AddX, CBtm + _
AddY)-(Clft - AddX, CBtm + AddY), &H808080
Ctrl.Parent.Line (CRgt + AddX, CTop - _
AddY)-(Clft - AddX - PixX, CTop - AddY), &HFFFFFF
Ctrl.Parent.Line (Clft - AddX, CBtm + _
AddY)-(Clft - AddX, CTop - AddY), &HFFFFFF
Next
End If
End Sub
Private Sub Command1_Click()
If nowDown = False Then
Call ThreeDControl(Command1, 1, 0, True)
Command1.Width = 1215
Command1.Height = 495
nowDown = True
Else
nowDown = False
Command1.Width = 1250
Command1.Height = 525
Command1.Refresh
End If
End Sub
Private Sub Form_Activate()
Call ThreeDControl(Command1, 1, 0, True)
Command1.Width = 1215
Command1.Height = 495
nowDown = True
Call Command1_Click
End Sub
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|