|
|
Get Path To System Folder: 1. Open Borland C++ Builder. 2. Place a Button on the form. 3. Place a Label on the form. 4. Double click Button1. 5. Type the following red code in the Button1Click function: //This is what the Button1Click function should look like: void __fastcall TForm1::Button1Click(TObject *Sender) { char szPath[256]; SHGetSpecialFolderPath(NULL, szPath, CSIDL_SYSTEM , FALSE); Label1->Caption = szPath; } //--------------------------------------------------------------------------- 6. Run the program, click the button. Label1 will display the path to the Windows System folder. |