Synchronize click on group of buttons - c#

I am developing my first Windows embedded Compact 7 application. It is c# and .net 3.5
I have a group of buttons. When one of the buttons is clicked, the effect wanted is, that all of the buttons seem to be clicked at the same time.
Solutions I found till now, like
SendKeys.Send("{ENTER}");
or even better
button1.Performclick
seem not to be avalable on WEC7.
Or do I oversee something, that would make them available?

Related

WPF Buttons don't change when pressed

I am using Windows 8 and getting my feet wet with WPF and one of the things that is bugging me is that buttons don't change color when they are being pressed like they would in a WinForms program.
I tried searching and oddly enough I can't see anyone else discussing this so I almost think it's something specific with my setup although as far as I can tell I haven't changed anything that would do this.
The button changes color when I hover over it and when I click it doesn't change, it still looks like I am just hovering.
Is this what it is supposed to do and if so what is the best way to override this and still respect the user's theme colors?
Thanks
UPDATE
To demonstrate what I mean here are screen shots showing a standard button in Windows 7 compared to Windows 8. What I am trying to figure out is how to make WPF button in Windows 8 behave like any other button and make it look like the button is getting pressed in when you press it.

Fancy Buttons like WinZip

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)

Custom control box button

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

WPF C# UI : New Window or Tab?

Our WPF application in the current design opens new windows for list screen.We don't have restrictions on the number of windows you open etc.We are using a ribbon control and well it has tab support.Which is better a new window or a tab? (With windows 7 having a better group of window management etc) Should I go in for tab or leave it as window. I can't make the detail screen tab since well the user click of a item in the grid to select and edit.Any valid suggestions? Thanks in advance.
Tabs in a Ribbon shouldn't change the view. The Ribbon is an enhanced toolbar, not a view changer.
If your using the MS Ribbon via OfficeUI, then there is a stipulation in the design guidelines that the view should never change the appearance of the ribbon (apart from loading context tabs) and that they ribbon should never wholesale change the view.
In regards to your question, do you mean that you have list/grid and you want a view to be able to change the data in the row. Eg. they double click a row, a view appears that gives them the ability to edit that row?
The right way is to ask your users what they like more. If you can't ask users, ask yourself - what you find more convenient - to open\close windows or switch between tabs. I wouldn't rely on win7 task bar as it's grouping behavior can be disabled or users may use another OS. Also I would suggest to check Microsoft guidelines for using ribbon.
Do you need to see more than one pane's content at once? Windows allow this, but tabs do not.
Tabs make management of the various windows easier at the expense of some flexibility.
Are your users likely to be running on multiple windows?
It is really hard to give a confident answer to you on this one without knowing more about your application and your user's requirements.
Windows 7 displays multiple previews on grouped windows of the application, however in case of tab, like IE, you will have to write quite a good custom code to show your tabs in preview of Windows 7 taskbar, which in case of Multiple Windows, it will be done automatically.
Not only that, Windows 7 also lets you put seven toolbar buttons on the preview windows, very few people knows about it because no application currently does it.
For tabs you will need to do extra programming to support multi window preview.
So its better to stay with multi window solution for now.
However in case of IE, if you try to use Windows 7 taskbar, the tabs dont align themselves in correct order of what is displayed in preview, it could be bug, but yes there might be certain limitations because when user chooses the tab to preview you will not be able to show them preview unless you make it active and thats why its little bad.
I recommend playing with Mozilla Firefox and Google Chrome if you want to see tabs at their finest.
Notice that tabs can be teared out into a separate window and windows can be docked as tabs.

How can I create a button with an embedded close button

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.

Categories