Ywing Posted February 11, 2003 Posted February 11, 2003 Hello: How can I detect the command button once it is click by the user in boolean format? For Example: In VB6, once a command button is click, commandbutton.value = True and when release the click it is False. How to do that in VB.NET? the commandbutton.value is not support by .NET anymore. Pls advice? Thanks... Quote
*Experts* Volte Posted February 11, 2003 *Experts* Posted February 11, 2003 VB6's CommandButton never had that; you are thinking of the CheckBox. If you set the CheckBox's 'Appearance' property to 'Button', it will be a toggle button. Quote
Ywing Posted February 11, 2003 Author Posted February 11, 2003 (edited) I am not using any check box. It is a command button. The commandbutton.value had no replacement. Refer to: .NET HELP( inside .NET program) http://ms-help://MS.VSCC/MS.MSDNVS/vbcon/html/vxconchangestocommandbuttoncontrolinvisualbasicnet.htm (Website) http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vxconchangestocommandbuttoncontrolinvisualbasicnet.asp Please refer to "*********.value" , there is no replacement!!!??? So any advice that i can use back the old command? Or any other way round to determined the command button toggle point? Edited February 11, 2003 by Ywing Quote
Cywizz Posted February 11, 2003 Posted February 11, 2003 I can't see how that functionality could ever be used, even with vb6. :confused: Anyhow, why don't you use the MouseDown and MouseUp event's of the button? Quote Howzit??
Ywing Posted February 11, 2003 Author Posted February 11, 2003 My program needs to determined the clicking to assign a particular pointer. I already use the mouse up, mouse down command etc. WHat i need is to determined rather the mouse click(command control click) to give me the Boolean comparison. So, any solution/suggestions to my question? Thanks... Quote
*Gurus* divil Posted February 11, 2003 *Gurus* Posted February 11, 2003 Yes, use a checkbox if you need something to toggle between two values. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Ywing Posted February 11, 2003 Author Posted February 11, 2003 I wanna use the command button, I am doing a handphone like arrow key to select the particular informations. I am doing a handphone like simulation on the VB.NET Quote
*Gurus* divil Posted February 11, 2003 *Gurus* Posted February 11, 2003 Then you'll have to write the code yourself. Declare a boolean variable and change it where you need to, be it in the click event, mousedown or whatever. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Ywing Posted February 12, 2003 Author Posted February 12, 2003 Are there any coade in VB.NET to replace the buttoncommand.value = True in VB6? Any clue? because i do not want to rewrite all my code. Quote
a_jam_sandwich Posted February 12, 2003 Posted February 12, 2003 write a user control the inherits the Command Button then add the property 'value'. When the click event happens altinate this value between true and false Quote Code today gone tomorrow!
Cywizz Posted February 12, 2003 Posted February 12, 2003 No, create a new usercontrol, inherit from the command button class, and write your own implementation by adding a 'Value' property. Quote Howzit??
a_jam_sandwich Posted February 12, 2003 Posted February 12, 2003 i know what correcting my post LOL :) Quote Code today gone tomorrow!
Cywizz Posted February 12, 2003 Posted February 12, 2003 a_jam_sandwich...at least were validate each other's answer :) Quote Howzit??
a_jam_sandwich Posted February 12, 2003 Posted February 12, 2003 too true :) good un Quote Code today gone tomorrow!
Ywing Posted February 12, 2003 Author Posted February 12, 2003 I am NEW to the .NET environment, I will try to use the inherit. I have to recall back the inherit in C++, since i never use C++ in 3 years. Thanks anyway. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.