- Change Subdomains Document Root In Apache Server Step 1 - Create Subdomain If you don’t have a subdomain on your apache server, you can follow this tutorial first and then come back. Change Document Root In ‘httpd-vhosts.conf’ change the ‘Document Root’ for the correct subdomain. Mine, after editing, looks like this: <VirtualHost *:80> ServerName cd.sbond.co DocumentRoot "C:\Path\To\Custom\Dir" <Directory /> Options FollowSymLinks AllowOverride All </Directory> </VirtualHost> Step 3 - Allow Access To Dir & Make Alias Go to your ‘httpd.
- How To Show Info On Hover With ToolTip C# Step 1 - Add The Control In the toolbox search for “ToolTip” and plop it onto your form. It isn’t something you put directly on your form, but instead it will just sit at the bottom in a little box. You can click on it and edit it’s properties. Step 2 - Add Info Click on the control you want to display info about, and find “ToolTip on < ToolTip Name >”.
- Rounding The Edges Of Your Form C# Step 1 - The Importing using System.Runtime.InteropServices; using System.Drawing; Put this one inside of your class: [DllImport("Gdi32.dll", EntryPoint = "CreateRoundRectRgn")] private static extern IntPtr CreateRoundRectRgn ( int nLeftRect, // x-coordinate of upper-left corner int nTopRect, // y-coordinate of upper-left corner int nRightRect, // x-coordinate of lower-right corner int nBottomRect, // y-coordinate of lower-right corner int nWidthEllipse, // height of ellipse int nHeightEllipse // width of ellipse ); Step 2 - Rounding I would put this in the initialisation of your form.
- Search a Table in SQL The Code SELECT * FROM info WHERE Name LIKE 'Keyword'; This way, you would get a ‘sort of search’, because you would have to type the name of the item 100% correctly, otherwise no results would show up. I guess this is sort of a ‘strict’ search, if something is slightly wrong, nothing would be returned.
- Making A Draggable, Borderless Form C# Step 1 - Adding Event Go into the events of either the whole form or on a control/panel and add the MouseDown event. Step 2 - Variables & Importing Namespace Import the namespace: using System.Runtime.InteropServices; Define the following: public const int WM_NCLBUTTONDOWN = 0xA1; public const int HT_CAPTION = 0x2; [DllImportAttribute("user32.
- Using Windows Characters on Custom Border C# Step 1- Find Characters Find and open Character Map in windows. In windows 10 you can just search ‘character’ in the start menu and you should find it. Change the font to ‘Marlett’ and you should see all the charcters that are commonly used in applications. From here you can just double click on the characters you want to use and then click the Copy button next to the textbox.
- Populating Combo Boxes in C# Step 1 - Creating It Of course the first step if to Create your combo box and assign it an appropriate Name. Step 2 - Adding Items I put all of the things I wanted into a string array for easy accessibility and readability. My code is set out like this:
- Make a Stopwatch C# Step 1 Import System.Diagnostics: using System.Diagnostics; Step 2 Initialise the timer & start it: Stopwatch timer = new Stopwatch(); timer.Start(); Step 3 Stop the timer: timer.Stop(); Step 4 Display stopwatch results: Console.WriteLine(overallTimer.Elapsed.Seconds.ToString() + "s"); You can use a multiple amount of different timings such as:
- Write to Text File in C# How There are two methods for this. The first method will keep adding on the new data to the bottom of the text file, whilst the second method will overwrite all previous things in the text file whenever new data is written. Method 1 (Don't overwrite Any Data) TextWriter saveData = new StreamWriter(@"C:\Path\To\TextFile.
- How To Solve CSS Not Updating In Your Browser What? If you are having problems getting your browser to update CSS on your web page then this post will definitely help you. There are mainly two different methods I will be showing you. Method 1 - Clearing Cache If you press F12, you now be able to right click on the refresh button and click the last option which is Empty Cache & Hard Reload.