Here is an example function to get the full html output code of an URL provided to the function into a string.<br /> You can get the data by using a string variable which gets the output: string variable = gethtmlcontent("https://thisisapage"); &...
You can add this function to display colored text in a richtextbox! [Just Append With that Function] private void AddTextToRTB(RichTextBox rtb, string txt, Color col)<br /> {<br /> &...
Here is an example to allow software to run only once on a machine.<br /> If the user tries to start the application again, there will ne a notification box and the program will exit. [file] program.cs in visual studio using System;<br /> using System.Threading;<br /> using System.Windows.Forms; namespace myapplicationnamespace<...
Here the code to get the current Directory! string path = Directory.GetCurrentDirectory(); <br /> See more detailed Info here:<br /> https://docs.microsoft.com/de-de/dotnet/api/system.io.directory.getcurrentdirectory?view=netcore-3.1 ...
Here an example to load an custom application xml config file. // Load Configuration<br /> CurrentConfPath = "C:\\PATH\\TO\\EXE.CONFIG";<br /> ExeConfigurationFileMap configMap = new ExeConfigurationFileMap();<br /> configMap.ExeConfigFilename = CurrentConfPath;<br /> Configuration config = ConfigurationMan...
If SSL Connections fail with Security Protocol Error, this code in Main Function could do the trick! ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls<br /> &a...