Using Win32 functions in Visual FoxPro Image Gallery
Window
..msdn
CloseWindow
CreateWindow
CreateWindowEx
DestroyWindow
EndTask
FindWindow
FindWindowEx
GetAncestor
GetClientRect
GetDesktopWindow
GetForegroundWindow
GetGUIThreadInfo
GetParent
GetShellWindow
GetWindow
GetWindowInfo
GetWindowPlacement
GetWindowRect
GetWindowText
GetWindowTextLength
GetWindowThreadProcessId
InternalGetWindowText
IsChild
IsIconic
IsWindow
IsWindowVisible
IsZoomed
MoveWindow
RealGetWindowClass
SetForegroundWindow
SetLayeredWindowAttributes
SetParent
SetWindowPos
SetWindowText
ShowWindow
SwitchToThisWindow
Code examples:
Creating a console window for Visual FoxPro application
Creating a window using CreateWindowEx function
How to block the ALT+TAB shortcut (WinXP)
Placing On-screen Alert on top of all windows
Saying "Hello World!" with VFP and WinAPI
Splash Screen for the VFP application
Creating a console window for Visual FoxPro application

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
Before you begin:
The following code explains how to create and use console (DOS-like) window with Visual FoxPro application.



See also:
  • Running MSDOS Shell as a child process with redirected input and output (smarter RUN command)
  • Running external applications from VFP using WinExec
  • Using ShellExecute for performing operations on files
  • Running external applications from VFP using CreateProcess
  • Running an external program from FoxPro and waiting for its termination
  •  
      Members area. Log in to view this example.
     
      User name:
      Password:
     
     
      Forgot your password?
     
      Sign up for
    the Membership
     
     


    User rating: 0/10 (0 votes)
    Rate this code sample:
    • ~
    4578 bytes  
    Created: 2004-11-09 21:04:19  
    Modified: 2011-12-10 09:20:22  
    Visits in 7 days: 207  
    Listed functions:
    AllocConsole
    CloseHandle
    FillConsoleOutputAttribute
    FillConsoleOutputCharacter
    FreeConsole
    GetConsoleScreenBufferInfo
    GetConsoleWindow
    GetLastError
    GetStdHandle
    ReadConsole
    SetConsoleCursorPosition
    SetConsoleTextAttribute
    SetConsoleTitle
    SetForegroundWindow
    ShowWindow
    WriteConsole
    Printer friendly API declarations
    My comment:
    Unsolved issues:

  • the closing of opened console window automatically closes the whole FoxPro session; the SetWindowLong can not change attributes for the console window (error=5, access denied);

  • main FoxPro window stops redrawing itself after a console window is created.

    And of course, the main unsolved issue is finding a practicality in console windows.

    * * *
    I noticed that in VFP6 the code works a bit different -- methods ClearScreen and SetCursorPos. You may try to declare and call SetConsoleCursorPosition with just two parameters -- INTEGER and @STRING -- instead of INTEGER, SHORT, SHORT.
  • 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 (54.226.5.29)
    13.6 min.Example: 'How to block the PrintScreen key'
    13.65 min.Function: 'GetIconInfo'
    13.7 min.Function: 'WinHttpReadData'
    1.38 hrs.Function: 'WTSEnumerateSessions'
    Function group: 'Terminal Services'
     Example: 'Obtaining I/O counts for the current process'
    4.54 hrs.Function: 'NetUnjoinDomain'
    Function group: 'Windows Networking'
     Example: 'How to create non-blocking Winsock server'
    4.65 hrs.Function: 'StrToInt'
    Function group: 'String'
    8.91 hrs.Examples
    Page 9
    8.92 hrs.Example: 'List of ODBC drivers installed (read from the [ODBC Drivers] section)'
    Google
    Advertise here!