I created a custom class. I want to create a Bunifu button on that class, the problem is the only type of controls that Visual Studio let me create is the defaults one, because I used the (System.Windows.Forms) library. How can I call a bunifu button on a class? Maybe call some library? Thank you! :)
C# Bunifu - How can I use/call any type of Bunifu control on a custom class?
5.4k Views Asked by Joao Mane At
2
There are 2 best solutions below
0
On
All you'll need to do is add a reference to the Bunifu.UI.WinForms.BunifuButton.dll control in your project by navigating to where the file is located in your Computer, then you can write this sample code in your main Form's Load event:
[C#]
Bunifu.UI.WinForms.BunifuButton.BunifuButton bunifuButton =
new BunifuButton.BunifuButton();
bunifuButton.Location = new System.Drawing.Point(70, 70);
bunifuButton.ButtonText = "Hello world";
bunifuButton.Click += (senderObject, eventArgs) => {
MessageBox.Show("Hello there...");
};
Controls.Add(bunifuButton);
[VB.NET]
Dim bunifuButton As New Bunifu.UI.WinForms.BunifuButton.BunifuButton()
bunifuButton.Location = new System.Drawing.Point(70, 70)
bunifuButton.ButtonText = "Hello world"
AddHandler bunifuButton.Click, Sub(senderObject, eventArgs)
MsgBox("Hello there...")
End Sub
Controls.Add(bunifuButton)
Hope this helps!
You have to reference to Bunifu framework you can download it from their website
https://bunifuframework.com/products/bunifu-ui-winforms/
add
Bunifu_UI_v1.5x.dllto your ptoject Go totoolbox--> Choose Items --> BrowseSelect the dll file and you will have all the tools including Bunifu Button.