Int Note: Kin Lib uses child forms Applications that have a main window which contain one or more child windows are called Multiple Document Interface (MDI) For the parent form (for instance the form created when creating a new project) set the IsMdiContainer property to true. Add a menu strip to the form and create […]
All posts by
Start a new process in another thread
Good Resources http://www.csharp-examples.net/create-asynchronous-method/ New process must be in a separate class using namespace System::Threading; (you can just create a new named class before the class you are currently in when working in a form etc) public ref class InstallerUpdaterClass { public: static void UpdaterStartSilent(void) { try { //Pause before starting Thread::Sleep(10000); //mS String ^UpdaterFilename; UpdaterFilename […]
Sleep
using namespace System::Threading; Pause This allows you to literally pause execution where you are in the current function – it just pauses this thread Thread::Sleep(1000); //mS System::Threading::Thread::Sleep(1000); //mS Threading.Thread.Sleep(New TimeSpan(0, 1, 0))
Cursor General
Not tried yet , but came accross: Application::UseWaitCursor = true; //Wait cursor to be used for all open forms of the application. Application::UseWaitCursor = false; //Set cursor back to normal Changing forms cursor frmEditUsers::Cursor = System::Windows::Forms::Cursors::WaitCursor; //Set cursor back to waiting frmEditUsers::Cursor = System::Windows::Forms::Cursors::Default; //Set cursor back to normal
Creating Data Grid From Arrays
Good resources: http://www.devx.com/dotnet/Article/33748 First Create A Class To Be Able To Add Data Create a class which has a variable for each column the datagrid will have – the class will be created for each data grid row. You can implement how these properties get set however you want, but a good way is to […]
Dialog Boxes General
See ‘Forms’ for details of creating forms to be bespoke dialog boxes Select A Folder Dialog Box FolderBrowserDialog ^SelectFolderDialog = gcnew FolderBrowserDialog(); //Setup dialog box SelectFolderDialog->Description = “Select the central network directory where files are stored”; SelectFolderDialog->ShowNewFolderButton = true; SelectFolderDialog->RootFolder = System::Environment::SpecialFolder::Desktop; try { SelectFolderDialog->SelectedPath = txtGeneralFileStoreDirectory->Text; } catch (Exception ^e) { SelectFolderDialog->SelectedPath = “C:\\”; […]
Encrypting Literal Strings In Your Application
Resources http://www.codeproject.com/KB/string/cxr.aspx?fid=4517&df=90&mpp=25&noise=3&sort=Position&view=Quick&select=2142177
Running As A Windows Service
Running an ap as a Windows service causes it to run in the SYSTEM account.
Timers General
The normal timers (system::timers::timer) are not accurate on fast timings. The thread sleep instruction timer also is often not. A minimum resolution may be 15mS or it may 55mS. Also it seems that if you specify a time of say 10mS, this will get rounded up to match the nearest time resolution – basically crap! […]
Using The Spy++ Tool
Use this tool to determine the name of the Window Class of an application How To Use Open the other application, then open Spy++ in VS (Menu > Tools > Spy++) Under the Search menu, click “Find Window”. Click and Drag the Finder Tool, the little crosshair inside the miniature window, onto the other application, […]
