|
-
May 14th, 2000, 08:47 PM
#1
Thread Starter
Lively Member
Does anyone out there know how to create a different Shape command button? I'm bored with the regular ones?
Thanks,
quadoc
-
May 15th, 2000, 12:42 AM
#2
Addicted Member
Easy!
Make a Picture of your command button
With the name of it in the picture.
Put a picture on your form
Put the command button picture in the
pictureBox
Sub Picture1_Click()
'Picture1.picture = loadpicture(Pushes down command button)
'Your Command Button code
'Sleep 1000
'Picture1.picture =loadpicture(reg cmdbut)
end sub
That help??
End sub
-
May 15th, 2000, 01:10 AM
#3
transcendental analytic
As my page is just updated, after struggle and braindamages, you can download a transparent control from my site. The idea is to cut regions with some apis' but that's too much to explain for me on 5 mins.
http://www.geocities.com/kedasu - I know you wanted the link directly to the control, but i want some feedback for my site, i have worked on it in three days.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 15th, 2000, 02:47 AM
#4
Here's a way to make a button from an image. It will respond and act like a real button. I took it from the sample project called MDINote.
You should have 3 images.
imgButton = The main button
imgButtonUp = The unpressed form of the button
imgButtonDn = The pressed form of the button
Code:
Private Sub imgButton_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)
' Show the picture for the down state.
imgButton.Picture = imgButtonDn.Picture
End Sub
Private Sub imgButton_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single)
' If the button is pressed, display the up bitmap when the
' mouse is dragged outside the button's area; otherwise,
' display the down bitmap.
Select Case Button
Case 1
If x <= 0 Or x > imgButton.Width Or Y < 0 Or Y > imgButton.Height Then
imgButton.Picture = imgButtonUp.Picture
Else
imgButton.Picture = imgButtonDn.Picture
End If
End Select
End Sub
Private Sub imgButton_MouseUp(Button As Integer, Shift As Integer, x As Single, Y As Single)
' Show the picture for the up state.
imgButton.Picture = imgButtonUp.Picture
End Sub
[Edited by Megatron on 05-15-2000 at 03:50 PM]
-
May 15th, 2000, 04:17 AM
#5
Thread Starter
Lively Member
Shape Command Button
So what you're telling me if the picture is round the button will becomes round? My post message is to create a different shape buttons like round or eclipse?
-
May 15th, 2000, 04:39 AM
#6
You can have whatever shap of button you ant with the method above. All yoiu have to do is draw your own buttons. (using Paint or some Image editing tool). Draw one for the image Unpressed and Pressed.
-
May 15th, 2000, 05:10 AM
#7
Thread Starter
Lively Member
Shape Command Button
Thanks Megatron and everyone!!!
-
May 15th, 2000, 09:56 AM
#8
Dude, have a control for button shapes
Some one sent me npButton a year or so back, it's an ocx that allows some cool button shapes, e.g round, oval etc with decent colouring. Email if you want the control, its in the public domain
Regards
-
May 15th, 2000, 08:14 PM
#9
Thread Starter
Lively Member
Shape Command Button
Jethro, could you email me a copy of the OCX? My email
address is [email protected]. Thanks!!!
-
May 15th, 2000, 08:44 PM
#10
transcendental analytic
Jethro :)
Just wan't to look at your ocx, i wan't to know if i've missed something in mine ([email protected])
[Edited by kedaman on 05-16-2000 at 04:46 PM]
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 15th, 2000, 11:27 PM
#11
Thread Starter
Lively Member
Shape Command Button
kedaman, what is the transparent control? Does it let me
create different shape command button? Thanks!
-
May 16th, 2000, 12:29 AM
#12
transcendental analytic
Actually it's just a transparent picturebox, a wnd with cutted regions specified by a maskcolor. Well, it's not a commandbutton but you can put it to act as one, changing the image when you click on it (in the event). It's not hard to do at all.
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
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
|