Is there a command/hotkey to switch subpanes of a vertically split editor window in Visual Studio 2017? - visual-studio-2017

Having split an editor window horizontally, I want to be able to switch back and forth between the 2 subpanes without using hotkeys. I haven't found which (if any) command would do this. If there is, I'll just use the predefined hotkey (if there is one).
I gather that VSCode already has predfined keys to switch between the subpanes of a window after splitting it, but can't find an equivalent in VS2017.

The answer is the command Windows.NextSplitPane; by default this is globally assigned as F6.

Related

Is there a way to switch tabs with CTRL+[NUMBER] instead of CTRL+TAB?

I am using Visual Studio Community 2017 and am frequently switching between several class files. The way I am having to do this is by pressing Ctrl+Tab (or Ctrl+Shift+Tab) repeatedly until I reach the desired tab.
It would be more convenient if there was a way to switch between tabs by pressing Ctrl+(tab's index) similar to how browser tabs are navigated. e.g. pressing Ctrl+1 opens the first/leftmost tab on your browser, Ctrl+2 opens the second one, etc.
Looking in Tools > Options > Environment > Keyboard, there are commands that use View.NavigateBackward and View.NavigateForward (The Ctrl+Tab and Ctrl+Shift+Tab functionality) that can be re-mapped - however nothing for the functionality I described above.
There are threads solving this issue for Visual Studio Code, however (and I'm really surprised/must be really dumb that) there are no threads that I could find for just Visual Studio.
Threads for Visual Studio Code:
Is there a quick change tabs function in Visual Studio Code?
https://github.com/Microsoft/vscode/issues/24753
You can switch to a specific tab with a keyboard shortcut with my Tabs Studio extension:
And you can additionally enable the Show tab numbers option to simplify usage of NavigateToTabXX commands:
So... After doing a more sensible search on StackOverflow instead of Google, I've found this thread;
https://stackoverflow.com/search?q=CTRL+Number+Visual+Studio
Which suggested to download a Visual Studio tool called "Hot Tabs". I have done so and it's working well for my purposes at the moment.
Hot Tabs

How do I turn on Dev C++ IDE linting for C?

I want the squiggly lines under my codes in Dev C++, is that feature available in Dev C++?
Dev-C++ capabilities are minimal and very limited. It does not have real-time syntax check but you can do it manually using ctrl+F9 shortcut or Execute->Syntax Check Current File.
By default it will change the error line background to color Maroon but you can change that with : Tools->Editor Options...->Colors->Error lines(top left scroll area) Then change the back/forecolors listed bellow it.
You also can change the Syntax Check shortcut to something more convenient, go to Tools->Configure Shortcuts... Find MainMenu > Execute > Syntax Check Current File then click on it and enter your desired keyword.

Visual Studio's bug: editor tabs (code tabs) appear->hide->appear forever => non-responsive

I love to open many tabs (10-30) of .cpp and .h, so the tab are overflowed to the right, i.e. Visual Studio can't show named of all opened tabs at the same time. (which is ok)
When I pin a new tab or change Visual Studio resolution (resize its window), Visual Studio will try to determine which one should be shown and which one should not (that is what I think).
In rare cases (1%), Visual Studio fail to do so. After I pin a new code tab (e.g. .cpp), it loops forever. For example, in the image, it is possible that the last of the four tabs will appear -> hide -> appear -> ... so on (forever).
Visual Studio would try to update other GUI to match the appearance/disappearance of the tab (e.g. width of console pane ?).
Within about 1-3 seconds, if I don't resize the window, Visual Studio will become unresponsive.
I will have to terminate it, lose some of my work.
It is like a mini-game.
I am sure that is a bug of Visual Studio. Have anyone faced it?
(Please comment if you faced the same problem!)
I don't think it is related to plugin "Visual Assist" or "Resharper".
I always set my monitor to low-resolution (1280 x 720), but I don't think it is a problem.
Question: How to solve this swappy bug, or at least avoid/alleviate it?

How to lock Windows 7 into a single program with C++?

I have been working on an app in Visual Studio 2015 (C++). It's a kiosk app for my school's tech support. Basically, it's a support site that will run in a kiosk. I need to figure out how to lock windows so it only runs that program. It would also be helpful to run the program in fullscreen mode. Keep in mind that all of the kiosks run Windows 7.
Set registry key
HKCU SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Shell="c:\path\to\whatever.exe"
Disallow task manager via security of taskmgr.exe (add a deny read + deny execute to the binary)
Set autologn:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
DefaultUserName = whatever
DefaultPassword = whatever
Have a boot disk handy. The only way to reverse this is to boot the boot disk and undo one of the steps after mounting the appropriate hive.
you can create your program with main window in full screen mode and popup:
hWnd = CreateWindowEx(WS_EX_CLIENTEDGE|WS_EX_APPWINDOW|WS_EX_TOPMOST,
lpClsName,
"MDI Project under Visual C++ WINAPI",
WS_BORDER|WS_POPUP,
...);// add the remaining parameters
and find taskmgr.exe and hide it and start menu button and hide them also:
hTaskBar = ::FindWindow ("Shell_TrayWnd", "");
hStart = ::FindWindowEx(GetDesktopWindow(), NULL, "Button", "Start");
ShowWindow(hTaskBar, SW_HIDE);
ShowWindow(hStart, SW_HIDE);
so your program looks like easycafe or handycafe
I actually switched from C++ to C#, so I'm gonna explain my answer with C#.
I used a keyboard hook library to capture keyboard input and block all non-letter/number input so alt-f4, alt-tab etc. would not work. I then determined a closing sequence of characters using another keyboard hook (LWin+C+Home+F12+PrtSc).
As for Ctrl-Alt-Del, that cannot be disabled (as far as I know) because it is a system function, so I just left that as it is.
I also got the bounds of the screen and set the size of the window to the maximum screen size at application launch, as well as whenever the app is resized or moved. This essentially makes it so the app covers the task bar, and the bar with the close and minimize buttons is also covered, but if someone found a way to move it it would immediately go back to it's full size.
I also set up autologin as was detailed in a previous answer, but I just didn't do it through code.

How do I make console application run after clicking "ok" from mfc dialog box in visual studio 2010?

In my visual studio 2010 project, I included two solutions. I have an mfc application, which is a dialog box, and another visual c++ application that just prints out text. What I want to happen is for the dialog box to pop up, then the user will input x values, y values, etc, and once the user clicks okay the second application will do calculations on these variables and then give an output. I have the two projects made already, but I'm having trouble combining them. The first thing to pop up when the combined project runs is simply a dialog box, and once the user clicks ok, something that looks like this: http://i.imgur.com/pziViRp.png?1 should appear. Any help would be appreciated - sorry if my explanation was unclear.
Your picture is a console app. So you want to make sure your second app is created as a console app and accepts its inputs in the argc, argv command line.
The first app would call CreateProcess to start the second app, passing its path and its command line.