Jump to content
Xtreme .Net Talk

Toggle property


Recommended Posts

Guest hasnain_razwi
Posted

hi all. does anyone know if a toggle property or method is available in vb.net. i want to create buttons that stay down (in the pressed state) when i click on them.

y did the creators of vb.net take out the inherited control array. it used to be so easy to work with them. but now i have to write a whole lot of code just to make one.:(

Posted

You can either make your own button or you can use Message posting APIs or the mouse_event API

 

Note the APIs are formatted for VB6 the word Long will need to be replaced with Integer(VB6 Long in VB.Net)

.Net allows software to be written for any version of Windows and not break like Unmanaged applications unless using Unmanaged procedures like APIs. If your program uses large amounts of memory but releases it when something else needs it, then what's the problem?
  • *Experts*
Posted

First, you can use a Checkbox and set the appearance to Button (you might want the Flatstyle to System as well).

 

As for why no more control arrays, check out this article or this one. There's another one that's more detailed but I can't find it offhand. Search these forums as the lack of control arrays in .NET is common question.

 

-Ner

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...