In winzip buttons as highlighted, clicking on the button open Menus..
Is it possible in c# or VB.NET Window Form Application?
I am using c# 4.0 2010
It's possible to roll (make) your own controls, hereby thus a button control that handles "hover" and also takes into account to add an image.
You have two (maybe three) options:
I'd say search on codeproject.com for several tutorials on how to make your own buttons.
e.g.: http://www.codeproject.com/Articles/29010/WinForm-ImageButton
Buy a thrid party product (such as the controls from Telerik.com for example).
(maybe try playing with the "Flatstyle" option on the Button: http://msdn.microsoft.com/en-us/library/system.windows.forms.buttonbase.flatstyle(v=vs.110).aspx)
Related
As a learning project in C# .net I am re-creating a Gnome 3 plugin for seeing who of the streamers you follow on Twitch is live. I have the settings form done, I am now working on the interface that is viewed from a click on the taskbar.
This is a rough image of what I want the interface to look like. When two or more streamers are live the interface would add another block and resize the form vertically similar to the menu for selecting a Wifi network in Windows.
What would be the best way for me to complete this?
My current thought is to maybe create a custom control and just place those inside a FlowLayoutPanel with some kind of code to change the vertical size of the form to match the added entries. Maybe this can be done without a custom control and be done with code inside a FlowLayoutPanel? I'm not too sure.
Ideally I would also have a click event in the panel for each streamer so I could then open a browser to their channel. A slight highlight would also be a plus (maybe change the background colour based on mouse hover).
Thanks in advance for any suggestions!
Advice on approach needed.
I would like to give the user the ability to move tabs between 2 monitors.
What is the best approach?
Idea being user first load the form.
TabControls shows with eg 5 tabs
User can drag 01 tab on another monitor.
Is it possible?
Any suggestions?
I would open two windows (one on each monitor) having a Tab-Control on each of them. The moving of a tab from one window to the other I would manage by using Drag'n'Drop.
You need to use some form of Docking container control. Most of the commercial WinForms widget libraries have one, I have worked with Infragistics. There are also free ones like this one DockPanelSuite (or at least free when I used it). These docking controls will handle the transition between docking and floating, similar to the various windows you can drag around in Visual Studio (Properties, ToolBox, etc.).
Some Windows applications add buttons to the control box, which apparently is the name for the group of minimize, maximize, and close buttons. One such application is Skype, which has a button for switching from a one-window-that-contains-everything mode to a one-window-per-conversation mode and vice versa:
I'd like to know how you can do this. I've looked around and can't figure out how. I assume it would require P/Invoke and the Windows API, but I'm not sure what function I'd use.
I think one of these might be what you're looking for:
http://www.codeproject.com/kb/vb/transmenuandtitlebuttons.aspx
http://www.codeproject.com/kb/cs/mintraybtn.aspx
For instance, I have an application that has a main window and then child windows inside of it.
http://screenshots.rd.to/sn/e3hek/sapienfullwindow.png
http://screenshots.rd.to/sn/e3hek/appscreen8.png
What i need is to grab each individual child window of that application, and display them as tabs in my application, or on a panel's handle.
I already have code to kidnap the application and put it into mine, and it works great.
MDI support is already present in the C#. So the first screenshot is using the MDI option.
The second screenshot is using tabbed windows. Now you have two options:
Use this opensource library DockPanelSuite which will let you have tabs in your application. something similar to visual studio interface. You can create forms and then tab it based on your needs. You can even dock them anywhere in the parent form by drag and drop. Just like in visual studio.
The second option is to create a form with tab control covering the whole windows. There you create tabs using the resource editor and hide/show based on the forms you want to display to the end user.
In my opinion, use the first option which gives you lot more customization. Also if you use the dockpanel, you can switch between the views shown in your first screenshot and second one. So user has better control as to how he wants to view. Dockpanel is free to use even in commerical apps and comes with source code. So you can either use the dll or directly incorporate the code in your application.
I am trying to create a panel which will have a set of "buttons" on it.
These buttons should have the following behaviour:
Appear similar to a tag (with
rounded edges)
Contain a red
cross to remove the filter/tag from
the panel, similar to the way internet
explorer tabs have an embedded cross to close the individual tab.
allow the user to click
on the tag and respond like a normal
button (as long as the click is not
in the red cross)
Number 1 is no problem, this is just appearance, however, regarding numbers 2 and 3, I am not sure if there is already code out there do to something similar...and I dont really want to reinvent the wheel if I can avoid it!
My question is: Does anyone know if there is something out there in infragistics which will do this simply, or will I need to write this myself by subclassing winform buttons?
Thanks in advance!
Is this new development or maintenance of an existing project?
If it is maintenance, you have a somewhat tougher time ahead. You'll implement a UserControl, probably segmented into two buttons. Use docking to get the behavior as correct as possible. The far right button would contain your cross image; the left (which would need to auto-expand as you resize the control) would contain your primary button behavior. Play with the visual styles until you get them right (EG, removing borders, etc).
If this is new development, and you haven't gotten too far into it, you might consider using Windows Presentation Framework (WPF) instead of WinForms. It will be easier to build the control and get it to look exactly how you want it. WPF includes an extremely powerful control compositing system which allows you to layer multiple controls on top of each other and have them work exactly as you'd expect, and it carries the added advantage of allowing full visual control out-of-the-box.
Either way, this is more work than dropping in an external component ... I've used Infragistics for years, and I can't think of anything they have which is comparable. The closest, but only if you're building an MDI application and these controls are for window navigation, is the Tabbed MDI window management tools -- and there, only the tabs (which replace window title bars) have this behavior.
I don't think that infragistics can do something like this. The UltraButton control can't.
Implementing a own control wouldn't be that hard.
your probably going to have to make a costume control for this type of work.