Is their a way to make a command button back to vb default with code please Thanks Paul
Originally posted by whothis 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" ?
Give your music collection a whole new life with PartyTime Jukebox
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
Command1.Default = True
My .NET Tutorials: • Silverlight Enabled WebPart in WSS My VB.NET Code Examples: • Create IIS Virtual Directory • Validate Login Against Active Directory • Automatically retrieve Identity field value from inserted DataRow using SQL Server and ADO.NET My ASP.NET Code Examples: • Login To Website (Forms Authentication) • Login To Website (Custom Authentication) My VB6 Code Projects: • Multithreading In VB6 • Custom Tooltips • Multi Language Support • Item Selector Control • Annimated Systray Icon • Simple Effective Graph Control • Download From Web • LiveUpdate, download application updates from the web automatically • Systray Notification Messages • Skin A Form • API Timer • Badger Messenger, an MSN clone that uses the MSN Network • Wokawidgets VB6 Component Suite
PS...are you going to Creamfields on Saturday? Woof
Originally posted by Wokawidget Errr...why do you want to do it at runtime??? VB Code: Command1.Default = True Woof Thats what i need to do at runtime other thing are involed which i find hard to explain . 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
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 don't respond to private (PM) requests for help. It's not conducive to the general learning of others.* * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.* * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft * * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *
also you can make true the keypreview propertiy and then when key pressed if keyAscii = 13 then command1.click
Regards, Vishalgiri Goswami Gujarat, ( INDIA ). ---------------------
Forum Rules