Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to read email messages using Simple MAPI
How to release and renew a lease on an IP address previously obtained through Dynamic Host Configuration Protocol (DHCP)
How to view icons stored in executable files (Icon Viewer) - II
How to view system icons for the classes installed on the local machine
Playing WAV sounds simultaneously
Reading metrics for the currently selected font
Retrieving graphic capabilities of your display
URL: converting unsafe characters and spaces into escape sequences
Using the IsWindowEnabled function
FindText -- the hopeless and useless Common Dialog
How to find which fonts Windows uses for drawing captions, menus and message boxes
How to perform Base64 encoding/decoding using Cryptography API Functions
Obtaining a handle to the desktop associated with the calling thread
Creating a directory on the FTP
Customizing the frame of top-level form: removing the standard frame (VFP9, Vista)
Enumerating print processors and supporting data types installed on the specified server
Enumerating the subkeys for a given registry key
How to build UDP responder
Printing text on the main VFP window
Removing FTP directory
Retrieving the command line for the VFP session
StrDup returns a pointer to the duplicate of a source VFP string
Using the CopyFile
Using the Semaphore object to allow only one instance of VFP application running
Starting a dialog box for connecting to network resources (mapping network drive)

User rating: 6/10 (1 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
Before you begin:


See also:
  • Starting a dialog box for connecting to network resources and passing input parameters
  • Connecting a local device to a network resource
  • Mapping and disconnecting network drives in FoxPro application
  •  
    #DEFINE RESOURCETYPE_DISK   1
    DO declare
     
    LOCAL hWindow
    hWindow = GetActiveWindow()
     
    * Map Network Drive dialog box
    = WNetConnectionDialog(hWindow, RESOURCETYPE_DISK)
     
    * Disconnect Network Drives dialog box
    * only RESOURCETYPE_DISK flag is allowed
    = WNetDisconnectDialog(hWindow, RESOURCETYPE_DISK)
     
    PROCEDURE declare
        DECLARE INTEGER GetActiveWindow IN user32
     
        DECLARE INTEGER WNetConnectionDialog IN mpr;
            INTEGER hwnd, INTEGER dwType
     
        DECLARE INTEGER WNetDisconnectDialog IN mpr;
            INTEGER hwnd, INTEGER dwType
     
     
     

    User rating: 6/10 (1 votes)
    Rate this code sample:
    • ~
    540 bytes  
    Created: 2002-06-06 08:01:07  
    Modified: 2012-09-26 09:57:12  
    Visits in 7 days: 138  
    Listed functions:
    GetActiveWindow
    WNetConnectionDialog
    WNetDisconnectDialog
    Printer friendly API declarations
    My comment:
    Not much of options exists for this function: one can not specify a disk letter and network path through the input parameters.

    The NET USE command connects a computer to, or disconnects a computer from a shared resource; or displays information about computer connections. The command also controls persistent net connections.

    Syntax:

    net use [devicename | *] [\\computername\sharename[\volume]] [password | *]
    [/user:[domainname\]username] [[/delete] | [/persistent:{yes | no}]]

    net use devicename [/home [password | *]] [/delete: {yes | no}]

    net use [/persistent: {yes | no}]

    Word Index links for this example:
    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 (23.22.252.150)
    2.94 hrs.Example: 'URL: splitting into its component parts'
    4.82 hrs.Function: 'GdipGetDpiX'
    Function group: 'GDI+ Graphics'
    5.62 hrs.Function: 'GetCursorPos'
    Function group: 'Cursor'
    7.12 hrs.Example: 'Shortcut Menu Class'
     Example: 'Class for sound recording'
     Example: 'How to retrieve list of system DSNs (Data Source Name) with parameters'
    9.85 hrs.Function: 'NetGroupEnum'
    Function group: 'Network Management'
     Example: 'Displaying dimmed window behind VFP top-level form'
    14.84 hrs.Function: 'CeRapiInit'
     Example: 'Terminating all running applications from a VFP program'
    Google
    Advertise here!