Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to change display settings: screen resolution, screen refresh rate
Adding and deleting Scheduled Tasks using NetScheduleJob API functions
Custom GDI+ class
Converting Unicode data from the Clipboard to a character string using a given code page
Enumerating data formats currently available on the clipboard
Capturing keyboard activity of another application with the Raw Input API (VFP9)
Winsock: sending email messages (SMTP, port 25)
Custom FTP Class for Visual FoxPro application
Detecting changes in connections to removable drives (VFP9)
How to download a file from the FTP server using FtpGetFile
Splash Screen for the VFP application
How to activate Windows Calculator
Custom HttpRequest class (WinINet)
Mapping and disconnecting network drives
Enumerating raw input devices attached to the system (keyboard, mouse, human interface device)
Using Font and Text functions
Establishing connection using the SQLDriverConnect
Custom HttpRequest class (WinHTTP)
How to convert a bitmap file to monochrome format (1 bpp)
Displaying bitmap using the AlphaBlend function
Using WM_COPYDATA for interprocess communication (VFP9)
Using EnumPrinters function to enumerate locally installed printers
How to play AVI file on the _screen
Vertical Label control
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: 122  
    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 (107.21.186.38)
    4 sec.Example: 'Hiding mouse cursor'
    7.45 hrs.Function: 'NetUserDel'
    Function group: 'Network Management'
     Example: 'GetFileOwner - Get the owner of an NTFS file'
    10.34 hrs.Example: 'Using GetNearestColor'
     Example: 'The SQLGetProp() creates a bridge between Visual FoxPro and the ODBC API'
    14.17 hrs.Example: 'How to write and read Window Properties for the specified window'
    18.32 hrs.Function: 'CryptGetProvParam'
     Function: 'GetNativeSystemInfo'
    20.4 hrs.Example: 'How to assemble an array of strings and pass it to external function'
    20.76 hrs.Example: 'Simple Window Viewer'
    Google
    Advertise here!