OI32 Issues (OpenInsight 32-bit Specific)
At 07 JAN 2003 08:59:47PM Barry Stevens wrote:
1)How stop 2 oi sessions?
How can I stop OI32 being opened twice on a PC.
Causes problems - when 2nd session closes it stops OIPI32 and therefore caused reports not to run in first session.
2)How stop OIPI minimise
Each time OI is started and a OIPI32 report is run, the printer/preview window is minimised to a button on the "start" bar.
Subsequent print sessions are OK - in full screen.
This confuses the uses and appears to them as a "system hang".
Has anyone else experienced this.
How can I fix this: I was thinking that in the init phase of OI startup I could dummy OIPI print preview and cancel the window by some api call BUT How do I do this - I need full sample code - getwindow handle etec etc
Barry
At 07 JAN 2003 10:39PM Donald Bakke wrote:
Barry,
This is not a solution, but I don't think your OIPI sessions are starting out "minimized". Rather, I think the OIPI is "behind" your other windows. This is easy enough to confirm AND this is a problem others have experienced as well. No definitive answer for this problem has come forward.
By the way, what version of Windows are we talking about. I have seen this mostly with Win98SE but very rarely on NT/2000/XP machines.
At 07 JAN 2003 11:59PM Barry Stevens wrote:
Yes, you are right, It is behind.
AND I have a solution that appears to work on my stand alone. I will test it soon on Client's.
Don - some notes to you in prog
I also got the multi OI stop working by counting "Arev" classes and terminating if ] 2. Code was hacked from variuos example from here.
I can post it if anyone wants it.
OIPIWindowClass=ThunderRT6FormDC"OIPIWindowName=Print Preview"hWnd=0hWnd=FindWindow(OIPIWindowClass:\00\, 0)
Dont STARTOI32 if already runningif hWnd elsecall set_printer("START32")endstat=Set_Printer("INIT", "", "", "", 0, 2)stat=Set_Printer("TERM") ;* End printingif Stat ) say it is a class name or nullhWnd=FindWindow(OIPIWindowClass:\00\, 0)
DON B - I assume this works because it must get the newest one
createdif hWnd thenequ WM_CLOSE$ to 16 /* \0010\ */CALL SendMessage( hWnd, WM_CLOSE$, 1, 0 )endBarry </QUOTE> —- === At 08 JAN 2003 03:31AM Barry Stevens wrote: === <QUOTE>Revised code…Best I could do with no api knowledge. BTW this is in the create event of my startup window (MainMenu) OIPIWindowClass=ThunderRT6FormDC" OIPIWindowName=Print Preview" hWnd=0 hWnd=FindWindow(OIPIWindowClass:\00\, 0) equ WM_CLOSE$ to 16 equ WM_DESTROY$ to 0x0002 if hWnd then Mess=" Mess:=|Due to the last OpenInsight not shutting down properly," Mess:=||a windows error message re Illegal Instruction will display|after you click OK on this message." Mess:=||The error message will be ok to ignore by clicking CLOSE" msg(@Window,Mess:@fm:@fm:@fm:"I") end call set_printer("START32") stat=Set_Printer("INIT", "", "", "", 0, 2) stat=Set_Printer("TERM") ;* End printing if not(Stat < 0) then hWnd=0 *hWnd=FindWindow(OIPIWindowClass:\00\, OIPIWindowName:\00\) hWnd=FindWindow(OIPIWindowClass:\00\, 0) if hWnd then CALL SendMessage( hWnd, WM_CLOSE$, 1, 0 ) end end