Is their a way to make a command button back to vb default with code please
Thanks Paul
Printable View
Is their a way to make a command button back to vb default with code please
Thanks Paul
How do you mean "back to vb default" ?Quote:
Originally posted by whothis
Is their a way to make a command button back to vb default with code please
Thanks Paul
As in when we double click on the CommandButton in the ToolBox
and it goes on the form yer know Command1
Errr...why do you want to do it at runtime???
VB Code:
Command1.Default = True
Woof
PS...are you going to Creamfields on Saturday?
Woof
Thats what i need to do at runtime other thing are involed which i find hard to explain .Quote:
Originally posted by Wokawidget
Errr...why do you want to do it at runtime???
VB Code:
Command1.Default = True
Woof
Thanks for the help ill try it out .
Creamfeilds nar kids are thou in there christain dior wierd wellies lol
Dont set the command button back to its (default) as in when it was on the toolbox .i can do this but i thought instead of code the color ,size,caption,font etc i thought their might of been some quick code called default ..?
U mean default props???
No, no quick way :(
I will be there...with my wierd wellies ;)
Woof
well, you could store all the information at loadtime and them call them all back with a subroutine...
oooooooooh, hell, I get it now.....
Try this:
VB Code:
dim objTempCmd as CommandButton set objTempCmd = myForm.Controls.Add "VB.CommandButton","TempCmd" Button1.Backcolor = objTempCmd.BackColor . . . . 'You can set as many or as little of the properties as you want 'When done, remove the temp button myForm.Controls.Remove "TempButton"
I think that will work....
TG
also you can make true the keypreview propertiy and then when key pressed if keyAscii = 13 then command1.click