lstratman / EasyTabs

Library to enable .NET WinForms apps to easily render a set of tabs in their titlebar space, similar to Chrome, Firefox, Edge, etc.
https://lstratman.github.io/EasyTabs
155 stars 71 forks source link

How to set some password on tabs for parent controls #60

Closed jarno9981 closed 3 years ago

jarno9981 commented 3 years ago

C# winforms easytabs is it possible to set password for parent controls example if you visit a site the tab pause and some textbox with button ask for password to continu,

(How to change tab icon if you visit youtube how to get youtube icon in tab)

jarno9981 commented 3 years ago

@Haltroy now idee how to do it?? ^

Haltroy commented 3 years ago

First of all, I'm not the maintainer of this repository. This repository belongs to @lstratman, not me. Don't believe me? check the name of this repository. So please don't expect me to answer all the questions.

Second of all, yes, you can do that. After all, you can add any controls as long as you want. However, you have to add them by yourself since abstract classes cannot be drawn in design mode. So you have to edit your form's designer file and add your controls that way. Of course you have to make them Visible = false; and Enabled = false; in design and turn those back to true in a void that can be Invoked when you want to show them but keep in mind that this will not stop the media playing or the page load.

And third, changing tab icon is simple,. Just change the icon of the tab form (not the parent) and ((assuming that you use CefSharp, which is popular with this repository)) implement a Display Handler to your Chromium browser. Use OnFaviconUrlChange event to change icon. The only thing that you need to do is download the favicon and (if it's not a icon but an image, yes sometimes that happens) convert to icon and set it to your tab form. See a simple implementation here.