Does anyone out there know how to create a different Shape command button? I'm bored with the regular ones?
Thanks,
quadoc
Printable View
Does anyone out there know how to create a different Shape command button? I'm bored with the regular ones?
Thanks,
quadoc
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
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.
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
[Edited by Megatron on 05-15-2000 at 03:50 PM]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
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?
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.
Thanks Megatron and everyone!!!
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
Jethro, could you email me a copy of the OCX? My email
address is [email protected]. Thanks!!!
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]
kedaman, what is the transparent control? Does it let me
create different shape command button? Thanks!
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.