Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to change display settings: screen resolution, screen refresh rate
Enumerating data formats currently available on the clipboard
Custom GDI+ class
Mapping and disconnecting network drives
Winsock: retrieving directory listing from an FTP server using passive data connection (FTP, port 21)
Capturing keyboard activity of another application with the Raw Input API (VFP9)
Winsock: sending email messages (SMTP, port 25)
How to display the Properties dialog box for a file (ShellExecuteEx)
Disk in drive A:
Using Font and Text functions
Detecting changes in connections to removable drives (VFP9)
How to download a file from the FTP server using FtpGetFile
Enumerating raw input devices attached to the system (keyboard, mouse, human interface device)
How to play AVI file on the _screen
Using Video Capture: displaying on FoxPro form frames and previewing video obtained from a digital camera
Using EnumPrinters function to enumerate locally installed printers
Splash Screen for the VFP application
Running MSDOS Shell as a child process with redirected input and output (smarter RUN command)
Subclassing CommandButton control to create BackColor property
Creating irregularly shaped FoxPro form using transparency color key
Vertical Label control
Converting Unicode data from the Clipboard to a character string using a given code page
Creating a console window for Visual FoxPro application
Enumerating network resources
Creating a folder

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
Versions:
click to open
 
using System;
using System.IO;
using System.Security;
using System.Windows.Forms;
 
namespace ConsoleApplication1
{
    partial class Program
    {
        static bool CreateFolder(string strPath)
        {
            try
            {
                DirectoryInfo di =
                    new DirectoryInfo(strPath);
 
                if (!di.Exists)
                {
                    di.Create();
                }
 
                return (di.Exists);
 
            }
            catch (SecurityException ex)
            {
                MessageBox.Show(ex.Message,
                    ex.GetType().ToString());
                return false;
            }
            catch (ArgumentException ex)
            {
                MessageBox.Show(ex.Message,
                    ex.GetType().ToString());
                return false;
            }
            catch (IOException ex)
            {
                MessageBox.Show(ex.Message,
                    ex.GetType().ToString());
                return false;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message,
                    ex.GetType().ToString());
                return false;
            }
 
        }
    }
}
 

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
1284 bytes  
Created: 2001-07-12 12:00:00  
Modified: 2006-05-31 11:38:52  
Visits in 7 days: 41  
Listed functions:
CreateDirectory
GetFileSecurity
GetLastError
LocalAlloc
LocalFree
SHCreateDirectory
Printer friendly API declarations
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
User Contributed Notes:
There are no notes on this subject.


Copyright © 2001-2013 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.55-log), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (50.19.155.235)
3 sec.Function: 'FillMemory'
Function group: 'Memory Management'
56.2 min.Function: 'InitiateSystemShutdown'
56.25 min.Example: 'How to block the ALT+TAB shortcut (WinXP)'
2.09 hrs.Example: 'Memory usage info for current VFP session (WinNT only)'
2.1 hrs.Function: 'FillMemory'
2.8 hrs.Function: 'DragQueryFile'
Function group: 'Shell Functions'
 Example: 'Starting external program from VFP and waiting for its termination'
3.37 hrs.Example: 'Extensible Storage Engine class library'
4.29 hrs.Example: 'Winsock: changing the byte ordering'
 Example: 'Reading entries from Event logs'
Google
Advertise here!