To Steven -
Try the following:
================ Mapbasic code ======================
include "mapbasic.def"
Declare Function ShowWindow Lib "user32.dll" (ByVal hwnd As integer, ByVal
nCmdShow As integer) As integer
' most of the constants are not used...
define SW_HIDE 0
define SW_MAXIMIZE 3
define SW_MINIMIZE 6
define SW_RESTORE 9
define SW_SHOW 5
define SW_SHOWMAXIMIZED 3
define SW_SHOWMINIMIZED 2
define SW_SHOWMINNOACTIVE 7
define SW_SHOWNA 8
define SW_SHOWNOACTIVATE 4
define SW_SHOWNORMAL 1
declare sub main
sub main
Dim winid,hwnd,retval As integer ' return value
Set CoordSys Layout Units "in"
Layout Position (0, 0) Width .01 Height .01
winid = frontwindow()
' Get the window handle for the layout window
hwnd = windowinfo(winid,WIN_INFO_WND)
' Hide window
retval = ShowWindow (hwnd,SW_HIDE)
Set Window winid Width 5 Height 3
'.
'.
'.
'.Do layout stuff, ex.
Create Frame Into Window winid(1,2) (4, 5) Title "Whatever"
PrintWin Window winid
close window winid
end sub
================ end mapbasic ==============================
The layout window will "blink" and then disappear. I believe that you can't
remove the "blink", but you can minimize the effect by making the initial
window _very_ small, and then hide it. When the window is hidden, you can
redefine the window size.
regards
Bo Thomsen
GeoConsult I/S
-----Oprindelig meddelelse-----
Fra: Steven Heapy [mailto:[EMAIL PROTECTED]]
Sendt: 9. marts 2001 04:01
Til: [EMAIL PROTECTED]
Emne: MI-L mapbasic question
Hi
Ive written a simple mapbasic app and when the user selects print I
would like to create and print a layout in the background without the
user seeing it.
I can create the layout no problems but would prefer it to be hiden not
minimised.
any help would be appreciated
cheers
Steve
_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.
_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.