making a thumbnail toolbar (windowsAPICodePack,windows 7) button invisible in vb.net - vb.net

I'm trying to make a thumbnail toolbar button (TTB from now on)visible when the it is clicked. I know how to do stuff when it is clicked, AddHandler etc. But if I tell it TTB.visible=false then it doesn't become invisible. If I put TTB.enabled = False it will be disabled, so it's only the visible that isn't working.
Also I put a button on my form (not a TTB) and when that is click wrote, TTB.visible = false and that didn't work, so there is no way to make it invisible.

Try set TTB.visible=true after you Add it into toolbar button list.

Related

VB.Net One button to show hidden buttons

I'm a complete noob at this, but does anyone know a simple code that will get hidden buttons to show apon clicking another button?
Thanks!!
In the click event of the button that you want to unhide the other buttons just put
Button1.Visible = True
Button2.Visible = True
Etc.
Replace Button1 with the actual button name.
That’s it

Invalidating panel scrollbars

I have set a Panel to AutoScroll = True.
I host a button in this panel.
When I set the button to a new location outside the panel's visible area...
.Location = New Point(2000, 0)
... this doesn't make the scrollbars appear.
How could I force the panel to invalidate / check again if the scrollbars should be shown?
I got it:
I need to set the button's parent to something else, then add it to the panel again which raises the ControlAdded event.

How to disable clicking Webbrowser, but still able to scroll WebBroswer

I have a WebBrowser in my VB.net form. I want to disable from users clicking links in the Webbrowser, but still able to scroll the Webbrowser.
I found this code but it locks up the whole WebBroswers so I can't click links or scroll, but I need to be able to scroll.
DirectCast(WebBrowser1, Control).Enabled = False
Just set the following property:
WebBrowser1.AllowNavigation = False
A hacky work-around to change the address from code would be to turn AllowNavigation on again, but it requires a BeginInvoke to allow the navigation to take place before turning it off again:
WebBrowser1.AllowNavigation = True
WebBrowser1.Navigate("new web address...")
Me.BeginInvoke(New Action(Sub() WebBrowser1.AllowNavigation = False))

How can I disable button press?

I'm trying to make some controls just for their view. For example I need a button which remains unpressed when it's pressed, like it seems on visual basic editor. How can I make this button?
Edit: Here is what I want
Before press:
After press:
Just a few possibilites
WinForms: yourButton.Enabled = false
WPF: yourButton.IsHitTextVisible = false
Make a image of a button and place it in your form

vb.net hide button text or make image on button cover text

I dynamically create buttons on a form and use the button text as ids so that I can pass that to an SQL query to pull saved data about that button when necessary, but I also use an image over buttons that have information saved about them. What I need to know is how do I keep the text on the button from appearing when there is an image assigned to that button? By default vb.net shows both the text and the image and no TextImageRelation values allow for the image to take precedence. I tried changing the text color to transparent, but the outline of the text is still visible through the image. Is there anyway to keep the text value as it is but just show the image on the button?
Don't use the .Text property of the button to store your information. Use the .Tag property for your IDs. Just set the .Text property to "" (empty string), that way it won't interfere with your image.
not sure, but why not just set the value to a variable to be passed to the SQL on the button click event and not place the text on the button? If you are using the same button click event for several buttons you could check the sender's ID and then set the variable based on that.
To Enable "Button1" Click (Visible)
Button1.Enable = True
To Disable "Button1" Click (Visible)
Button1.Enable = False
Hide "Button"
Button1.Visible = True
or
Button1.Show()
Show "Button"
Button1.Visible = False
or
Button1.Hide()
You can Also Used the code to any Tools (TextBox, Label, ComboBox, Radio Button, Button, Link, GroupBox)