calculator icon indicating copy to clipboard operation
calculator copied to clipboard

Single calc instance and window vs. Multiple calc windows

Open TristanYoung opened this issue 5 years ago • 39 comments

Problem Statement Entering calculations into the calculator can be tedious when working across multiple program windows. Compounding the problem is when multiple calculator instances are running. Selecting the wrong instance can cause calculation errors, and wastes time. This can be detrimental when calculating prices and margins, precise dimensions, etc. Some tasks are better left to spreadsheets, but for quick calculations, a calculator is optimal.

Many keyboards have a calculator button for quick access to the calculator. This makes calling up a calculator instance quick and easy the first time, but for subsequent recall of the same instance, the button is useless if you want to recall/reuse a single instance.

Create a calculator instance that can launched by hotkey or calculator button, that can be easily recalled without ALT-TABBING or WIN-TABBING through 20 or so windows. The target audience is anyone who requires a single instance and speed. It's common to have a single handheld calculator, rather than a desk full of calculators - as it simplifies working at the desk - apply that to the Windows desktop.

A multi-instance-only calculator, or a single-instance-only calculator is not universally appealing.

My own uses are mixed business/financial, machining and optical calculations, and home/school. The goal is to improve speed and accuracy, reduce error and frustration.

Evidence or User Insights I don't have so much any evidence or user insight, other than my own use-cases. I have google searched and found many people complaining about multiple calculator instances, and trying to figure out ways to force single instance behaviour.

Single-instance is the way the calculator used to operate. It's no different than having a single handheld calculator. There will be people that want single-instance, and other people that will want multiple-instance, and even some that will want to switch between the two on-demand. It's reasonable to believe that not everyone likes things the same cookie-cutter way. That is one of the things that made Windows go from a horrible user experience to a great one - has lead to Windows 10's success over Windows 8.

Proposal

  • State-savable toggle button (1st choice - most visible, most easy)
  • State-savable menu option (2nd choice - less visible, awkward)
  • Command-line parameter (worst choice - invisible to less-technically-inclined users)

Being able to change the single/multi instance state in an easy manner should meet everyone's needs.

If a button is used (my strong preference):

The wording or glyph representing the option should impart the meaning - such as: - Single Window / Multi Window - Dynamic glyph using the existing calculator icon: ---> Single icon = single instance ---> Two overlapping icons = multiple instance

When single-instance state is enabled in one instance, and there are other instances running, the user should be asked if they are sure they want to close the other instances. The default should be NO, in order to prevent the loss of data in other instances.

The question should be answerable using the user's input method of choice: - the mouse to click on relatively-positioned YES / NO buttons that don't require extreme mouse movements to reach (suitable for ultra-wide display users) - TAB to change between NO / YES, ENTER to select the choice

Goals

  • Adapt the calculator so that it functions the way some people expect or need it to.
  • Provide greater customization based on the sometimes dynamic needs of the user.
  • Reduce the time it takes to activate the one specific calculator instance needed.
  • Reduce error caused by entering calculations into wrong instances.

Non-Goals Cater only to advanced users familiar with command-line parameters.

Low-Fidelity Concept It's a toggle button for single instance/multi instance, that also saves the state to the registry, and can close multiple instances. A picture can be supplied if it's really necessary.

A team member edited this comment to capture details from discussion below.

TristanYoung avatar Mar 09 '19 07:03 TristanYoung

Originally it was a single instance app, but the feedback wanted it to support multi-instance. I agree it could be added as an optional setting. Software like VLC gives the choice

mdtauk avatar Mar 09 '19 07:03 mdtauk

What if we add a command line parameter like --singleInstance to prevent the creation of extra windows, you will then be able to modify HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\18 and run calc.exe --singleInstance instead of calc.exe.

Would it be ok for you?

rudyhuyn avatar Mar 09 '19 08:03 rudyhuyn

Thank you for suggesting the command-line parameter. Adding a command-line parameter would be a great idea.

Will there be opportunity to advertise/expose this functionality to others somehow - like in the help documents?

TristanYoung avatar Mar 09 '19 13:03 TristanYoung

I still have XP machines, and the default XP calculator app is supposed to be single instance I believe. It behaves that way, except when OpenOffice Calc opens up - for some reason multiple calculators open up whenever OOC is running. Close OOC, and then the calculator app returns to normal. Heheheh.

TristanYoung avatar Mar 09 '19 13:03 TristanYoung

This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.

MicrosoftIssueBot avatar Mar 09 '19 20:03 MicrosoftIssueBot

I've a diff ready, but there is some little tricks I want to confirm with the community and Microsoft before sending it.

We can't use calc.exe in command lines, it looks like Windows uses a "fake" .exe stored somewhere on Windows to launch the custom protocol (ms-calculator or calculator used by the win10 calculator).

In fact, this project doesn't even use the recently added UWP CommandLine handler (Windows 10 1803). So to be able to use command line, we can't use calc.exe, we need another name. I was thinking about Calculator.exe but please, send suggestions!

So let me confirm if:

  • we want the application to manage a --singleInstance command line argument
  • keep calc.exe working (of course)
  • add the UWP AppExecutionAlias Calculator.exe with the optional --singleInstance parameter.

rudyhuyn avatar Mar 10 '19 00:03 rudyhuyn

Thank your for working on this idea/behaviour.

Personally, I don't mind if it's done via command-line, or even a little push-pin icon to set single-instance or multi-instance.

Creating a separate Calculator.exe will satisfy the needs, however it's too bad that you have to create a new name and can't reuse the existing one.

There are times when someone might want to switch to multi-instance, after doing a bunch of calculations in the single instance calculator, and then switch back.

Are we trying to keep the GUI simple and uncluttered, and is it feasible to make it switchable after it's already launched, and storing the single/multi instance state? I also like the idea of providing a visible toggle for less-savvy users, and would get around having to create the second executable.

Just throwing that out there. I'm grateful for any improvements :)

TristanYoung avatar Mar 10 '19 01:03 TristanYoung

I don't think a toggle would be that useful. You already have 2 ways to launch the calculator and already have the choice between:

  • click on the icon in the App list (start menu) -> multi instance
  • click on the icon in the task bar -> will open the existing window (or create a new one if first instance)

The big issues to fix are:

  • the calculator key on Keyboards
  • allow scripts (Dos, Powershell...) to select how they want to launch the app.

For both scenarios, the command line parameter can fix the issue.

rudyhuyn avatar Mar 10 '19 01:03 rudyhuyn

Why not just make ms-calculator: protocol aware of the strings passed to it? See App.xaml.cpp L457.

PowerShell can just run Start-Process ms-calculator:lastusedview|scientific.

GeeLaw avatar Mar 10 '19 16:03 GeeLaw

We can also modify the protocol and add a parameter, but the command line will still be necessary for all applications expecting (and only supporting) a path and not a protocol. I'm not sure AppKeys for example support protocols

rudyhuyn avatar Mar 10 '19 21:03 rudyhuyn

Thanks for the feature suggestion. This does sound like an interesting idea. We have a process in place for feature suggestions that impact the end-user experience, which includes a template that helps frame the feature pitch. Please update using that template.

We can't use calc.exe in command lines, it looks like Windows uses a "fake" .exe stored somewhere on Windows to launch the custom protocol (ms-calculator or calculator used by the win10 calculator).

We rely on the calc.exe in System32 for backwards compatibility reasons (e.g., references to "C:\Windows\System32\calc.exe")

image

grochocki avatar Mar 11 '19 04:03 grochocki

@TristanYoung When you get the chance, can you update your idea with more details following the feature pitch template from our New Feedback Process?

grochocki avatar Apr 02 '19 00:04 grochocki

I'm used to fixing problems head-on, rather than discussing them. I'll give it a shot though.

Problem Statement Entering calculations into the calculator can be tedious when working across multiple program windows. Compounding the problem is when multiple calculator instances are running. Selecting the wrong instance can cause calculation errors, and wastes time. This can be detrimental when calculating prices and margins, precise dimensions, etc. Some tasks are better left to spreadsheets, but for quick calculations, a calculator is optimal.

Many keyboards have a calculator button for quick access to the calculator. This makes calling up a calculator instance quick and easy the first time, but for subsequent recall of the same instance, the button is useless as it launches additional instances.

Create a calculator instance that can launched by hotkey or calculator button, that can be easily recalled without ALT-TABBING or WIN-TABBING through 20 or so windows. The target audience is anyone who requires a single instance and speed. It's common to have a single handheld calculator, rather than a desk full of calculators - as it simplifies working at the desk - apply that to the Windows desktop.

A multi-instance-only calculator, or a single-instance-only calculator is not universally appealing.

My own uses are mixed business/financial, machining and optical calculations, and home/school. The goal is to improve speed and accuracy, reduce error and frustration.

Evidence or User Insights I don't have so much any evidence or user insight, other than my own use-cases. I have google searched and found many people complaining about multiple calculator instances, and trying to figure out ways to force single instance behaviour.

Single-instance is the way the calculator used to operate. It's no different than having a single handheld calculator. There will be people that want single-instance, and other people that will want multiple-instance, and even some that will want to switch between the two on-demand. It's reasonable to believe that not everyone likes things the same cookie-cutter way. That is one of the things that made Windows go from a horrible user experience to a great one - has lead to Windows 10's success over Windows 8.

Proposal

  • State-savable toggle button (1st choice - most visible, most easy)
  • State-savable menu option (2nd choice - less visible, awkward)
  • Command-line parameter (worst choice - invisible to less-technically-inclined users)

Being able to change the single/multi instance state in an easy manner should meet everyone's needs.

If a button is used (my strong preference):

The wording or glyph representing the option should impart the meaning - such as: - Single Window / Multi Window - Dynamic glyph using the existing calculator icon: - Single icon = single instance - Two overlapping icons = multiple instance

When single-instance state is enabled in one instance, and there are other instances running, the user should be asked if they are sure they want to close the other instances. The default should be NO, in order to prevent the loss of data in other instances.

The question should be answerable using the user's input method of choice: - the mouse to click on relatively-positioned YES / NO buttons that don't require exteme mouse movements to reach (suitable for ultra-wide display users) - TAB to change between NO / YES, ENTER to select the choice

Goals

  • Adapt the calculator so that it functions the way some people expect or need it to.
  • Provide greater customization based on the sometimes dynamic needs of the user.
  • Reduce the time it takes to activate the one specific calculator instance needed.
  • Reduce error caused by entering calculations into wrong instances.

Non-Goals Cater only to advanced users familiar with command-line parameters.

Low-Fidelity Concept It's a toggle button for single instance/multi instance, that also saves the state to the registry, and can close multiple instances. A picture can be supplied if it's really necessary.

Sorry if this isn't what you had in mind.

TristanYoung avatar Apr 06 '19 06:04 TristanYoung

Thanks, @TristanYoung!

grochocki avatar Apr 08 '19 04:04 grochocki

You're welcome Grochocki. Sorry, I guess I should have edited my original post.

TristanYoung avatar Apr 08 '19 17:04 TristanYoung

VLC offers a choice on how multiple-instancing works. image

You could have a toggle button, and change the about dialog into a settings screen.

Allow a single instance of Calculator [ ||| ]____]

and have the default set to Off.

mdtauk avatar Apr 09 '19 19:04 mdtauk

Good job @tristanYoung, I fully agree with you

One important piece of information missing here is: why is the calculator multi-instance? While I understand that some users need a multi-instance app, I believe the majority of users would prefer only one instance, but in software development, we should never assume how users use an app, we can be surprised sometimes.

I see 2 possible reasons:

  • User studies show that a majority of users prefer multi-instance.
  • the Windows team needed a first party application to demo UWP multi-instances, but this choice wasn't backed by data or studies.

If it's because of reason 2, it should be reconsidered and a user study can help determine the app's default behavior.

I'm in favor of 2 checkboxes, similar to VLC (thank you Martin for the screenshot, happy to see you here!): [ ] allow multi instance [ ] use only one instance when started from keyboard shortcut (only enabled when the first checkbox is checked).

But should the first one check by default? We can't decide without data.

rudyhuyn avatar Apr 09 '19 19:04 rudyhuyn

Having one calculator open in programmer mode, and another in standard mode can be very useful.

But having the option would make the most sense.

mdtauk avatar Apr 09 '19 21:04 mdtauk

rudyhuyn, from what I understand, people wanted multi-instance, and so it was changed. Calculator for XP was single instance. I can't remember, but I think Windows 7 Calculator was operating as single-instance for me, but it depended on the Microsoft keyboard driver version I used. I also found OpenOffice Calc was one application that would cause the singe-instance feature in XP to break and would not only launch multiple instances, would cause two windows (OO-Calc + Windows Calculator) to be focused at the same time (figure that one out :), which caused me performance problems.

I agree with mdtauk, someone might need multiple calculators configured in different calculator styles.

But there are other cases where I could see the usefulness of multiple calculators, such as when someone is performing a calculation, and temporarily needs to perform other calculations, without losing their initial results.

A brief survey of people at work plus others elsewhere, some say a single instance is their preference, while others think a multi-instance would work best for them. The people who cited using ALT-TAB to cycle to the calculator rarely have more than 2 or 3 windows open, and don't understand the trials of ALT-TABBING through 20 or so windows.

Since I wear a gazillion hats at work, and sometimes perform my multiple roles near-simultaneously, I speak from the point-of-view of the sales manager, shipper, developer of our company website, book keeper and bill payer. I know for me, a single calculator is greatly appreciated, for speed and accuracy.

TristanYoung avatar Apr 10 '19 01:04 TristanYoung

But should the first one check by default? We can't decide without data.

Doing a user study seems to be complicating things. Since it's multi by default now, why not just keep it multi by default, and let users make the choice to change it?

If a user study is a requirement, let's get it done. Never started one before - how should we start?

TristanYoung avatar Apr 20 '19 03:04 TristanYoung

We reviewed the pitch and would love to explore this idea further! The pitch is a great start, but there are still some open questions. I am moving this issue into planning to iron out some of those details and I created calculator-specs/singleInstanceFlag to track progress. A human will follow up with some feedback on your pitch shortly. Keep in mind that not all ideas that make it into the planning phase are guaranteed to make it to release. For more information on next steps, check out our spec workflow.

ghost avatar Jun 22 '19 00:06 ghost

Thanks everyone for the conversation on this issue. Generally speaking, we like the current multi-instance behavior in cases where the user explicitly launches another instance of Calculator (e.g., middle clicking the task bar icon). However, we recognize there are cases where you may favor programmatically opening an existing instance, when possible (i.e., hardware calculator keyboard button). As such, we would like to move forward with the command parameter/protocol approach, recognizing that there would likely be some work that a Microsoft employee will need to do to update calc.exe.

There has also been some conversation about making this an in-app setting. We considered this approach when reviewing the pitch, and while we certainly could go this route, we generally try to avoid adding "advanced" settings that might be confusing to typical users. I am sure many folks in this thread would not consider this to be an advanced setting, but we have to consider how users of all backgrounds and skill sets use Calculator. Ultimately, we felt that the command line/protocol approach provides enough flexibility to address the pain point without introducing too much complexity.

grochocki avatar Jun 22 '19 00:06 grochocki

I have a very old PR adding a command parameter and forcing single instance ready. Once specs done (including the parameter name) I will update it and submit it.

rudyhuyn avatar Jun 22 '19 00:06 rudyhuyn

Any update re: this?

In the interim I created a AutoHotKey script that overrides current behaviour. It focuses an open instance and launches if no instance is running. https://github.com/alystair/my-productivity-stack/blob/master/Launch%20Calculator.ahk

alystair avatar Mar 11 '20 20:03 alystair

Any update? After install Powertoys, everytime I wanna open calc, it opens a new instance...

ldmik avatar Aug 05 '20 05:08 ldmik

Yeah, that's actually a new annoyance. @alystair 's AHK script fixed the calc button on my keyboard, but now when I'm using PowerToys Run to start it on my laptop (with no HW key), I get a new instance everytime. Having a command line switch isn't that useful there.

Maybe there could be some way of setting a default externally to the calculator app? Perhaps a registry key or a settings file in the user directory?

henriksen avatar Aug 05 '20 17:08 henriksen

I have a very old PR adding a command parameter and forcing single instance ready. Once specs done (including the parameter name) I will update it and submit it.

@rudyhuyn Thoughts on what the parameter name should be?

Once #596 is checked in, we can explore adding a setting like this:

image

I am still concerned that typical users might find this type of setting confusing, so I am curious if we should hide this setting (and I suspect others in the future) behind an "Advanced options" navigation or toggle, like this:

image

image

grochocki avatar Aug 11 '20 06:08 grochocki

I think hiding it behind an "Advanced settings" link is quite reasonable and in line with what I've seen in for instance Windows Settings.

henriksen avatar Aug 11 '20 07:08 henriksen

I think hiding it behind an "Advanced settings" link is quite reasonable and in line with what I've seen in for instance Windows Settings.

Yes but full screen pages should not be used unless there's a lot of options

JaiganeshKumaran avatar Jan 28 '21 13:01 JaiganeshKumaran

hi guys, was this feature added to stop multiple instances... i have been looking for the above settings posted in photo... but cant seem to locate it? thanks in advanced

horze21 avatar Jan 31 '21 21:01 horze21