Debug WinRT app on second monitor with Visual Studio 2012 - windows-8

When I run or debug a winrt application, Visual Studio 2012 seems to start it always on the same monitor.
How can I force Visual Studio 2012 to start the app on my other monitor?

Windows will deploy to which ever monitor you last viewed the Start screen on. So, here is what I do.
Start VS in Main Monitor
Bring up charms bar on Secondary monitor and select the Start charm
Launch debug from VS in Main Monitor
Your app should now launch in the secondary monitor.
I don't know if there is a way to set an option to do this - I haven't found one but haven't looked very hard since this works easy enough for me.

On Win8.1, it seems like the app always opens on the primary display. I swapped my primary and secondary displays (right click on desktop -> screen resolution -> "Make this my main display").
I also customized my taskbar so that it appears on all monitors (right click on task bar -> properties -> "Show taskbar on all displays").

I think, it is impossible.
The only solution you have is to move it to that monitor and then open Start Screen only on it while debugging.
In this case Win Store apps will open there

You cannot force the app to start on the second monitor but you can move Visual Studio 2012 to the second monitor and start the WinRT app on the first monitor. Swap or move the primary monitor if needed.

You do just active the Metro screen where you want to start the app ! Or after you can use these shortcut : Win+PageUp and Win+PageDown to switch

You can also drag the app itself to the alternative monitor. As others have noted, the apps will continue to open on the last monitor that you used.
Update: If you have Visual Studio 2013, the latest update remembers which monitor was being used to run the WinRT app and opens it on that screen.

Related

Visual Studio 2022 opening Bing.com on Shift-F12

I have a new installation of VS2022 (Current). If I right click on some C# code it will show "Find All References (Shift-F12)". Clicking on it will work. However, if I actually press Shift-F12, it will open an embedded browser window pointing to www.bing.com. If I go to Tools/Options/Keyboard, select "Press Shortcut Keys" and press Shift-F12 it opens up the windows search screen rather than telling me what it's bound to within VS2022.
Any ideas how to diagnose or, preferable, stop this behaviour and revert to Shift-F12 doing "Find All References"?
So the answer to this one is on the weird side. Turns out I started using a bluetooth keyboard on the same day as starting to use Visual Studio 2022. The bluetooth keyboard treats the function keys as meta commands whilst the laptop keyboard does not. F12, of course, is "Open Search". To complicate matters, it turns out that Visual Studio 2022 intercepts this command. Whilst normally it opens up the Windows Search window, while in VS2022 in regular mode it instead starts an embedded web browser within Visual Studio. Not sure why you'd want that behaviour, but it does it.
The solution is to reconfigure your bluetooth keyboard.

App modeller, Identify button not showing up in blueprism spying

I am creating calculator VBO in blueprism object studio.
In application modeller I gave calc.exe path and able to launch calculator, but I am not getting identify option to spy on any element..
In Element, After clicking Launch buttion, identify is appearing for a split of sec and Launch button is coming back instead of Identify
PS- As mentioned in videos and links, I have launched calc via application modeller not directly via windows..
I am using windows 10, BluePrism V.5.0.11.0 versionenter image description here
Windows 10 calculator is complicated case, please consider using different application in your training. For example paint is much simpler to get started.
If you really need to get that going, then you may need to launch application first, using one object, and afterwards use second object to attach and interact with it.
can be two reasons
1. Either your application is not launched properly.
2. Sometimes we face problems with some versions of applications.
The best way to fix your problem is
Edit your settings remove the application path from the navigate stage.
Launch the application separately
Open Navigate stage > Action > Attach
Provide the window title within quotes (example: "Calculator")
Click OK then run the object
Now if you go to application modeller
You will be able to see the identify button under the element.
Hope this will help you.
I resolved this by unchecking "Disable invasive techniques (hooking)".
The Windows 10 calculator runs with process name win32calc which is also located under c:\windows\system32.
So when you launch the application please make you identify the applications process name and its location
I resolved this by circumventing to windows 7 calculator instead of a windows 10 calculator on windows 10.
Link to download win 7 calculator for win 10-
https://winaero.com/download.php?view.1795
This will be installed in the same place as your default calculator.
Inside-
C:\Windows\System32
The name of the app in my case was "calc1.exe" to avoid collisions with the default calculator.
I used this as my base reference app for spying and it worked.
Also note, the hover to highlight button seems to be a bit buggy, try a bit hit and trail to get you required button to be highlighted and mark using "Ctrl+LeftClick"

SSMS SQL SERVER Management Studio 2012 startup freeze

I have a strange situation. IT installed SSMS on my laptop and it runs well the first time, connected to my SQL servers remotely etc. But then it's frozen. I forced quit and then started SSMS again. Now it's totally frozen, no popup window at all to enter the server-connection text string. Then I did a force quit and got a pop up window (see it here ).
Microsoft SQL Server Management Studio has detected that an operation is blocking user input. This can be caused by an active modal dialog or a task that needs to block user interaction. Would you like to shut down anyway?
Has anyone seen this before? My IT department has no clue.
Often this is due to the new connection dialog being off screen (usually due to changing monitor setup e.g. 1 to 2 monitors or resolution change etc).
If so the really easy fix (if your connection dialog just needed approval without changing fields) is :
Focus on SSMS and Hit Enter/Return
..or the easy fix (if above does not work - as your last connection is not ready to go) is:
Alt Tab to SSMS
Alt + Space - context menu
M - select Move (in offscreen context menu)
Arrow Key(s) - to move it back onto screen
As per answers here from #Eirik Toft and here from #Lee Chetwynd
Fixed an issue which presented the same on my machine today by renaming a entry in my registry:
After some digging there seems to be multiple issues that can produce the same error (Application, settings, registry). This blog entry covers it pretty well:
http://www.armedia.com/blog/2012/08/sql-server-management-studio-freeze/
In my case deleteing the SQL server management studio folder under AppData ( c:\users\%userName%Appdata\raoming\microsoft\ ) didn't work.
However I was successfully after deleting / renaming the regisitry entry:
[HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server]
(update)
Worked out the underlying issue on my laptop - was using additional 2 screens with much higher resolutions which caused windows / SSMS to open up the connect to new data source dialog off all of them. If your using multiple screens try returning to just use the native laptop screen to see if you can find the dialog that SSMS is waiting on your input for.
I just had this same situation, with two additional screens connected to my laptop. SQL Server Management Studio was opened on the third screen, with the modal dialog nowhere to be seen.
Two options:
Press tab three times and enter. This cancels the dialog. Now you can move the window to another screen.
Set Windows to only use one or two screens. SSMS opens on the first and should still open there when you move back to using three screens.
When SSMS is on your primary or secondary screen, the modal dialog opens on the first and should be usable.
It was because multi screen display. Turning off multiscreen to single one resolved it. Reenabled multi screen display after ssms started working
In my case, "Run as Administrator" option worked like charm. I was accessing my server screen with the windows RDP. And when I open SQL Server Management Studio and Visual Studio 2010 user hangs at the moment and wont operate unless sign off r disconnected by administrator.
But when I set compatibility mode of both the application to the "run as Administrator", it starts working fine.
the problem also occurs if you have a touch screen. I fixed this by disabling the local thouch screen when I switch to RDP.

In WinRT how to create an application that is always visible?

With windows 8, is it possible to create an application that is always visible? For instance, in previous versions of windows, there is the task bar with quick launch icons. Can I create something similar to the quick launch icons that are always on the screen?
If you are referring to a Windows 8 Store app then the answer is no. You can have a live tile and toast notifications that provides updates to the user which may cause the user to launch your application.
A good article to read to understand how your Windows Store apps will run on Windows 8 go here to learn about Application lifecycle (Windows Store apps). This will explain the App execution state.
It is not possible in the RT version, but the same is possible in the desktop version. If you have a desktop app, you can pin it to the taskbar. But any Window store app cannot be pinned to the taskbar. What you can do instead is move the app to the beginning of your Home screen, so anytime you click the Windows button your app will be visible right in front.
Do you mean always visible in the Star Menu screen? If so, you can add tile updating functionality to your application. As long as the user has the application pinned to the Start Menu, he would see the updates. Check the link below for an introductory tutorial.
http://blogs.msdn.com/b/windowsappdev/archive/2012/04/16/creating-a-great-tile-experience-part-1.aspx
"Quick Launch" has a very specific meaning, which you may or may not have been referring to in your question.
Below is the Quick Launch bar in Windows 8 - essentially a toolbar pointing to a location in your %AppData% directory. Prior to Windows 7 it was available by default, but the ability to now pin items directly to the taskbar rather supersedes it. Here's how you can restore Quick Launch if you really want to :)
It's, of course, available only in the Desktop mode and not on the Modern UI, where pinning a tile is the best you can hope for, and it's all up to the user to pin it AND to determine where it shows up on their Start Screen.
Another option worth mentioning (although more like system tray than quick launch) is lock screen presence. If the user chooses so and your app supports that, he can add it to his lock screen:
either as a a badge (up to 7 apps)
or as a tile notification (single app only)
This is not a way for the user to quickly start your app (other answers have already covered these options) but a way to stay visible and keep your user informed.

How can I simulate my Metro app being terminated?

VS2012's default C# "Metro style" project templates include code in App.xaml.cs (in the OnLaunched override) to restore the application state after a suspend-and-terminate. This code only runs when LaunchActivatedEventArgs.PreviousExecutionState is Terminated, i.e., "The app was terminated after being suspended."
How can I force my app to be suspended and terminated, so I can test this suspend/resume functionality in my app?
Things I've tried that don't work:
If I use the "close app" gesture (drag from the top of the screen to the bottom), then the next run's PreviousExecutionState is ClosedByUser.
If I kill the app -- either using Task Manager, or (if I was debugging) with the "stop" button on the VS toolbar -- then the next run's PreviousExecutionState is NotRunning. This is true even if Task Manager showed the app as "Suspended" before I ended task, so clearly it's more nuanced than the description of "terminated after being suspended".
You'd think I could just switch away from my app, and then open lots of other Metro-style apps until my app eventually gets kicked out. But even if I open every single Metro-style app that ships with the Windows 8 Release Preview, that's apparently not enough memory pressure to make Windows terminate my app. (I assume Windows would be less likely to terminate an app that was being debugged, so I launched my app from the Start screen -- no debugger -- before I tried this.)
It does appear that, if I switch away from my app and type into a StackOverflow window for several minutes, that my app will eventually get terminated, so perhaps there's a time-based component to it. But if I have to wait five or ten minutes every time for my app to terminate, that's a pretty slow testing cycle.
Given that this is something developers will have to test, you'd think there would be a nice, easy way for a dev to force an app to suspend-and-terminate. Is there some kind of stress-test app that comes with Visual Studio that will force enough memory pressure? Is there some menu item in Visual Studio that will force termination of my app? How are we supposed to test this?
In Visual Studio 2012, when you're debugging, there are "Suspend", "Resume" and "Suspend and Shutdown" buttons. By default, you should see the buttons while you are debugging your app. See this article for more info on debugging process lifecycle.
I had trouble finding the Suspend control because VS wasn't showing a second row of toolbars for me. As it turns out, this is on the "Debug Location" toolbar. Make sure you have this toolbar turned on and then you should be able to find the Suspend control (and it does work to solve the OP's problem).
If they don't show by default, go to TOOLS -> CUSTOMIZE, and under the Toolbars tab, check the box that says "Debug Location"
I was looking for VS 2013, just in case others came for the same reason.
Source:
http://blogs.msdn.com/b/visualstudio/archive/2012/08/23/new-visual-studio-2012-debugging-features-for-the-windows-8-app-lifecycle-model.aspx
a busy cat http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-29-92-metablogapi/2210.image_5F00_thumb_5F00_1FBA9C1E.png