Open a Console/Command Window when using VS 2008 Express - c#

I have both the VB and C# versions of Visual Studio 2008 Express. When I run a console application in either version, instead of the console opening in an old DOS style command window like it does in VS 2005, it actually blacks out both monitors attached to my computer and treats the entire screen real estate as the console.
Anyone know how to get the app to run in a small command-type window when I run it?
Update:
It's like the console is running Full Screen. If I set a break point, switch from the IDE t the console and then hit Alt+Enter it switches to the small window that I want, but I still can't figure out how to make the app start with the console that way.
I could post a screenshot but it would look like a big black square...no window, no frame, just the inky blackness of frustration.

Try this: Press your windows key + R to open a Run dialog. Type cmd and hit enter. This will open a command prompt. If it opens maximized, then un-maximize ("restore") it. Then close it. Now see if it starts maximized.
I think it's due to Windows saving the default size and placement of windows, and hopefully this will reset the default.
-Edit- Okay try this then: CMD Full Screen Visual Studio

Try pressing Alt+Enter to get out of full screen mode.

Related

How to run/test app in Debug mode (F5) and have Output window still visible during the app run (VS Express 2015)

I am new to Visual Studio Express 2015 and whole C# stuff (I come from the JAVA world).
I want to see some test string output (like checking variable values etc.) I am sending with Debug.WriteLine() during Debug mode run (F5), but the output window disappears immediately (is replaced by split dual windows). Yet when I close the running app, output window shows up back again WITH MY TEST STRING OUTPUT from Debug.WriteLine(); there - how come?
This is what I call "output window" (sorry, don't know how to call it when it has written Output on it, really...)
This is what I see when I test/run (F5) my app ("output" window is gone):
And this is what I see when I stop/close my app - "output" window is back again also with my test string I sent with Debug.WriteLine():
How can I run my app in Debug mode and also make that output window still visible during the run/test, so I could see my string output in realtime?
I need to see some test values I am sending to the output, or is there some other way how to do this in C#/Visual Studio Express 2015?
In JAVA I use NetBeans and I use Output window/CMD exactly for this, so I thought this is its equivalent. And as I see the output actually is there, it probably is, right?
Just to clarify even more: I am not creating console app that runs in CMD window, I just need to see that test output somewhere and I thought - being completely new to C# coming from JAVA - that the Output window is the place where I can see it.
Like when you C# guys need to see some test values in realtime during the app run/test, how do you do that - where your output goes? Or are you telling me there is nothing like this in Visual Studio GUI (I don't think so as I see after the app is closed my test value is present in that "output" window - the window is just not there during the app run, so...)?
I have the namespace using System.Diagnostics; in place, yet it still act as described above: in Debug mode the output window disappears, so I don't know what the string output is (have no clue how to make the window being visible still) and only comes back again once the app is closed (then there is my string output presented in the output window), with the Release mode the output window is there but no string output is displayed - it stays completely empty during the app run/test.
You just need to enable it..through the Debug->Windows->Output

VS2019 Test Explorer missclicks due to wrong focus

I am using Visual Studio 2019, and the WinAppDriver to run Unit Tests on a simple WPF Application.
For that i use the Test Explorer integrated in VS.
Problem: When i run my test via Test Explorer it opens my desired window in the background (behind Visual Studio); then it performs the clicks` on the correct locations but the mouse is clicking in my Visual Studio and not on my desired application window because it wasn't brought to the front.
When i start the Test in Debug mode everything works fine. Window opens focused and in front. Clicks hit right buttons etc. So my Code can't be the issue?!
I tried waiting for it to be ready (Clickable) before clicking like that:
private void WaitFindClick(string id, string wpf_type)
{
var wait = new DefaultWait<WindowsDriver<WindowsElement>>(session);
wait.Timeout = TimeSpan.FromSeconds(5);
wait.PollingInterval = TimeSpan.FromMilliseconds(100);
wait.IgnoreExceptionTypes(typeof(InvalidOperationException));
wait.Until(ExpectedConditions.ElementToBeClickable(By.XPath($"//{wpf_type}[#AutomationId=\"{id}\"]")));
session.FindElementByAccessibilityId(id).Click();
}
Summarising, Test Explorer works fine in Debug mode, but not in normal mode it opens the App correctly but doesn't bring it to front, so the Click will hit Visual Studio and not the desired App.
What is going wrong? How to fix Test Explorer to automatically bring the Test App to the front?
I hope i'm right here. This is my first question ever so if i missed sth please tell me.
Have a good day and thanks in advance!
EDIT:
I found a Workaround by setting the Window.Topmost = true; property in my MainWindow()-Constructor but its not really what i am looking for.

Windows 8 metro app works properly on Visual Studio but not on tablet

I am developing a Windows 8 metro app where the main screen just has a button. On clicking the button, the app navigates to another frame where all the work is done (which includes reading from files in local storage).
The app works perfectly when I hit run on local machine from Visual Studio 2013. However, if I try running it from the start menu, the main screen opens, but clicking the start button does not cause the app to navigate to the 2nd frame.
*This app was working fine (even when I ran it from start menu) for the last month. I changed some code (things that happen in the 2nd frame and should not affect main screen) and now I am having this issue.
*I am pretty sure that clicking the 'start' button causes the code on the 2nd frame to run,even though it appears to do nothing. I suspect this because if the file that is to be read in the 2nd frame is not in the directory, the app crashes.
I would greatly appreciate any help. I am pretty new to this and am not even sure how to debug an application that's not being run from an IDE.

Process.Start("explorer.exe"); won't bring back taskbar

As of right now, I am working on a mock up OS via WinForms to use as a prop for movies.
Upon running the application, it kills explorer.exe so that you can't accidentally have the windows task bar show up during a shoot. The issue is, upon closing the mock OS I would like for explorer.exe to be started up again. However, Process.Start("explorer.exe"); brings up an explorer window, and does not re-instate the window taskbar.
I know for a fact, that task manager is more than capable of bringing back the window taskbar via typing "explorer.exe" under a new task, though I've had no luck finding command line arguments to pass to task manager.
Edit:
I'm running under Windows 7. As well, I'm going pretty in depth with this mock OS. I'm taking control of quite a few key presses that Windows uses. For this reason, I kill explorer.exe so that I can use key presses such as "Alt-Tab" and display a mock app switcher, etc. The app already runs in full screen, but it is still possible to have the underlying Windows GUI pop back up. I am essentially replacing explorer.exe with my own mock up explorer. Upon closing my custom explorer, I can't seem to get the regular Windows GUI to come back by launching explorer.exe via Process.Start();.
From here:
Try
Process.Start(Path.Combine(Environment.GetEnvironmentVariable("windir"), "explorer.exe"));
It appears you must specify the full path to explorer to get the taskbar back.
From here:
Explorer must see some fulfilled conditions to launch as shell:
Explorer must not run (which includes Control Panel, for instance)
Explorer must see it is the actual shell - hence you need to replace that value before launching explorer.exe (could change it back a few seconds later)
Sometimes it seems (on newer Windows versions) it depends on the process that launches explorer.exe - if it is "known" to explorer.exe -- I don't have any more details for this part though (and you couldn't change it, unfortunately)

can't launch debug window to check code

I'm new to Visual Studio, I just started using it for my programming class. I downloaded C# 2010 from the website, and every time I try to debug the code the form window doesn't show up as the black box with the output, rather it displays a blank gray box. I have no clue how to check my code, I haven't been able to find anyone else with this problem, someone please help!
As you are assuming a black box - mean you want to start with a Console Application
and your are getting a gray box - mean you had chosen the Windows Form Application.
So What to do you is :
Select a Console Application.
Like File -> New -> Project -> Console Application.
Put breakpoints on your code. and press F5 to run your application in debug mode.
Put a debug point in the code on the left side where you have a empty column.. Then click F5 to run the code with debugging.. It will stop when the break point is hit..
Check this tutorial
Are you sure you have the solution configuration set to Debug ? Or is it Release? Read this for details.

Categories

Resources