Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Two forms side by side
Message
 
 
To
19/09/2005 16:53:31
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01050647
Message ID:
01051105
Views:
10
Randy,

Assuming you want to initiate this tiling process from one of the two apps.

to size and position the current app on the left:
with _vfp
   .Top = 0
   .Left = 0
   .Width = sysmetric( 1 ) / 2
   .Height = sysmetric( 2 )
endwith
to size and position the other app on the right:
local lnHwnd

#define SWP_SHOWWINDOW      0x0040

declare integer FindWindow in win32api ;
  string lpClassName, ; && pointer to class name
  string lpWindowName   && pointer to window name

declare integer SetWindowPos IN win32api ;
  integer hWnd,            ; && handle to window
  integer hWndInsertAfter, ; && placement-order handle
  integer X,               ; && horizontal position
  integer Y,               ; && vertical position
  integer cx,              ; && width
  integer cy,              ; && height
  integer uFlags             && window-positioning flags

lnHwnd = FindWindow( .null., "Untitled - Notepad" ) && the other window title is the second app

if ( lnHwnd > 0 )
   SetWindowPos( lnHwnd, 0, sysmetric(1) / 2, 0, sysmetric(1) / 2, sysmetric(2), SWP_SHOWWINDOW )
endif
>David, hi. I am trying to place 2 fvp7 apps on a page without one closing the other.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform