Modifying Registry values using Visual Basic - vb.net

I want modify settings of my window using VB. For example I want to change the color of File explorer's window title bar, menu bar etc. How to begin with modifying registry using VB and which entries to modify to change the color?

I would recommend saving settings to file, for example app.config is designed for this purpose. If you prefer registry, then take a look into codeproject article Application Settings the .NET way. INI, Registry, or XML

Related

What Windows Forms control would be used to create a dockable window like Visual Studio Solution Explorer?

I want to be able to use things like the Solution Explorer window or the Properties window from Visual Studio in my Windows Forms application. I am not sure what the term for it is so I cannot look it up.
Have you tried using a normal panel? You might want to code all the contents of the solution explorer and the properties panel. The panel can be docked from its properties. Then, for example, if autosize is disabled, you write
If ...... Then
_something_.Autosize = false
End If
But that's a TON of code!
I don't think you can reproduce the solution explorer dynamically nor the properties panel. Besides, do you need to change all properties of an object at once? It looks like you are trying to remake visual basic dynamically. Well, that can't happen. Not with the current versions of vb.net, at least.
You should try involving things with panel that appears on your screen with all the settings in it, but like TGamer, there is a lot of code to do. But start with showing and hiding the panel to start with. Maybe try importing the settings through a VS file stored somewhere in your directory.

Resharper live templates in sql files

I created live template for creation of a stored procedure and I set availability in *.sql files. But when I'm in SQL file I don't have possibility to use live template by typing live template shortcut. I know that I have to change some setting in Visual Studio or in Resharper but I didn't find anything. Do you have any idea about that? I'm using VS 2013 and Resharper 8. Thank you.
Custom live templates should be able to work in .sql files.
You don't mention how you set your live template up, but here is how I acheived this with Visual Studio 2013 and ReSharper 8.2.
The example should allow you to type sf + TAB and get a select * from $TABLE$ template inside of a .sql file.
Go to ReSharper's Template Explorer via RESHARPER -> Templates Explorer...
Make sure you are on the "Live Templates" tab (the 1st one) of the Templates Explorer.
Under "Scopes" on the left side make sure "Global" is selected.
Click the new icon to bring up the template editor.
Add your template shortcut keys sf.
Add your template SELECT * FROM $TABLE$.
On the right side of the template editor window, select the link next to "Availability".
In the "Select Scopes" window that comes up, uncheck "Everywhere" and expand "In files matching".
Use the File mask *.sql
OK out and save your template.
The sf template should now be available in .sql files.
If you've followed these steps and it's still not working, you may have keyboard shortcut conflicts with another plugin. Consider reinstalling or repairing ReSharper or resetting the keyboard shortcuts via the RESHARPER -> Options -> Keybaord & Menus screen.
ReSharper's Live Templates only work in file formats that ReSharper supports, since Live Templates rely on other ReSharper features that need to understand languages, such as auto-formatting, name shortening and auto-imports and availability in scope. Also, Live Templates are inserted by selecting the item from ReSharper's code completion windows - if there's no code completion, there can't be any Live Templates.
Since ReSharper doesn't know about .sql files, you don't get Live Templates.

Default control templates for windows phone 8

I want to make some small modifications to the default control template of some controls in my windows phone 8 app. The problem is that I can't find these default templates. Anyone know where they can be found?
I am looking for something like this, but this is for WPF and not WP8.
Thank you
You can find the file containing all the default control templates here:
C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\Design\System.Windows.xaml
Edit: also, the Windows Store Dev Center has a lot of them listed if you search for "styles and templates"
I'm not aware of such a listing for WP8, however, you can use Blend or Visual Studio to edit a copy of a control's current template by right clicking on the control and then selecting Edit Style, Edit Template or Edit Additional Templates as appropriate. In the submenu, you can select Edit a Copy... which will present a window that allows you to create a copy of the default (or current template/stlye if you have already modified it) and customize it.

Charts and plots in .Net 4 using Windows Form

I am using Windows Form and .Net 4 in Visual Studio 2010. I need to do some cross-plots, and would like to have a few features, as cursor and zoom in and out.
I tried to use ZedGraph, however I was not able to add its controller to the toolbox. I don't know if I have done something wrong or if it is not compatible.
Do you have any suggestions?
Thank you!
First, I'll assume you are using WinForms (as opposed to WPF).
Add references to the ZedGraph DLLs to your project
Right-click references in the solution explorer and select Add Reference
Select the browse tab and locate ZedGraph.dll (also ZedGraph.Web.dll if needed)
Rebuild the project (F6)
In the Toolbox, check that ZedGraphControl has appeared under Components
This control can be added to the design layout of a form.
Alternatively, once you have the reference added, you can add a graph to a form in code with the following:
using ZedGraph;
ZedGraphControl myZedGraphControl = new ZedGraphControl();
// set size, location, etc. properties
form1.Controls.Add(myZedGraphControl);

View Designer Code in Visual Studio 2010

What is a standard way to open the Designer (automatically generated) code for a VB file?
As a workaround, I can get to it by searching the entire solution for some keyword that is usually only found in those files: Global, Partial, etc.
Open the Solution Explorer. Along the toolbar at the top there is a tool Show All Files (it is the 2nd from the left on my version of visual studio). Click on that tool. All of your Form files will now have an arrow beside them. click on that arrow to expand. Look for the code file named FormName.designer.vb. Double-click on it to open.
You have to click the "show all files"-Button. Then you can also see the Designer.vb-files.
Note: For C# and VS 2008, but the same applies to VB in VS 2010.
http://peterkellner.net/2007/12/31/visualstudioshowallfiles/
http://blog.brianhartsock.com/2009/09/14/visual-studio-tip-show-all-file/
Keyboard shortcut for Show All Files
Show All Files is a useful little button in the Visual Studio solution explorer to give us a full view of the directory structure our project files are sitting in. When it is off, we only see the files that are explicitly included in the project, but when it is on, we see everything. This makes it very easy to explicitly opt a file into the project without doing an add -> existing item -> find existing item in directory structure and add to project.
The default when creating a new Visual Basic application in Visual Studio is to not show all files, and unfortunatly there is no setting you can adjust to change that.
Open the code file, and in the top-right corner of the code window is a drop-down containing all methods. Open this and select "InitializeComponent".
A screenshot from a newer version. Visual Studio 2015 and 2017 will look like this.