forms_mdi_window problem [message #421383] |
Tue, 08 September 2009 01:28 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
nasir_mughal
Messages: 122 Registered: April 2007 Location: Karachi
|
Senior Member |
|
|
Hi
I want to position all my forms in the center of forms_mdi_window.
For this i am using this code to get height and width of forms_mdi_window, but when i run form it returns (0,0) as height and width
WHEN-NEW-FORM-INSTANCE
SET_WINDOW_PROPERTY(FORMS_MDI_WINDOW,TITLE,'Gemini Softs');
DECLARE
wmdi_height NUMBER;
wmdi_width NUMBER;
BEGIN
wmdi_height:=GET_WINDOW_PROPERTY(FORMS_MDI_WINDOW,WIDTH);
wmdi_width:=GET_WINDOW_PROPERTY(FORMS_MDI_WINDOW,HEIGHT);
message(wmdi_width||' '||wmdi_height);
message(wmdi_width||' '||wmdi_height);
END;
![f:\form.bmp](f:\form.bmp)
what could be the reason, kindly help me.
[Updated on: Tue, 08 September 2009 03:52] Report message to a moderator
|
|
|
|
Re: forms_mdi_window problem [message #422081 is a reply to message #421972] |
Mon, 14 September 2009 04:24 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
nasir_mughal
Messages: 122 Registered: April 2007 Location: Karachi
|
Senior Member |
|
|
When i tried to use a window name which does't exist in forms.The following error displayed.
Quote:
FRM-41052: Cannot find Window: invalid ID.
DECLARE
wmdi_height NUMBER;
wmdi_width NUMBER;
BEGIN
wmdi_height:=GET_WINDOW_PROPERTY('WINDOW3',WIDTH);
wmdi_width:=GET_WINDOW_PROPERTY('WINDOW3',HEIGHT);
message(wmdi_width||' '||wmdi_height);
message(wmdi_width||' '||wmdi_height);
END;
Kindly help me.
Thanks.
[Updated on: Mon, 14 September 2009 04:38] Report message to a moderator
|
|
|
|
Re: forms_mdi_window problem [message #422204 is a reply to message #422113] |
Tue, 15 September 2009 01:50 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
kamran.it
Messages: 265 Registered: September 2005 Location: Karachi
|
Senior Member |
|
|
Nasir
this will help you
Declare
MDI_Win_Width Number;
MDI_Win_Height Number;
Canvas_width Number;
Canvas_Height Number;
Begin
/* This module is to maximize window1 and displays the data canvas in the *\
\* center of MDI window. */
Set_Window_Property(Forms_MDI_Window,Window_State,Maximize);
Set_Window_Property(Forms_MDI_window,Title,'Crescent Greenwood Ltd.');
MDI_Win_width := Get_Window_Property(Forms_MDI_Window,Width);
MDI_Win_Height := Get_Window_Property(Forms_MDI_Window,Height);
Canvas_Width := Get_Canvas_Property('CANVAS2',Width);
Canvas_Height := Get_Canvas_Property('CANVAS2',Height);
Set_Window_Property('Window1',Width,Canvas_Width);
Set_Window_Property('Window1',Height,Canvas_Height);
-- Set_Window_Property(FORMS_MDI_WINDOW, WINDOW_STATE, MINIMIZE);
Move_Window('Window1',(MDI_Win_width-Canvas_width)/2,
(MDI_Win_Height-Canvas_Height)/2);
:System.Message_Level := '25';
End;
|
|
|
Re: forms_mdi_window problem [message #422231 is a reply to message #422204] |
Tue, 15 September 2009 03:32 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
nasir_mughal
Messages: 122 Registered: April 2007 Location: Karachi
|
Senior Member |
|
|
1) First i tried to use FORMS_MDI_WINDOW as hard coded name instead of variable. like this
DECLARE
wmdi_height NUMBER;
wmdi_width NUMBER;
BEGIN
wmdi_height:=GET_WINDOW_PROPERTY('FORMS_MDI_WINDOW',WIDTH);
wmdi_width:=GET_WINDOW_PROPERTY('FORMS_MDI_WINDOW',HEIGHT);
message(wmdi_width||' '||wmdi_height);
message(wmdi_width||' '||wmdi_height);
END;
the same error displayed
Quote:
FRM-41052: Cannot find Window: invalid ID.
2) Then i used valid window name 'WINDOW1' which exist in forms.
a valid width and height (324,540) returned in the message, there was no problem.
DECLARE
w1_height NUMBER;
w1_width NUMBER;
BEGIN
w1_height:=GET_WINDOW_PROPERTY('WINDOW1',WIDTH);
w1_width:=GET_WINDOW_PROPERTY('WINDOW1',HEIGHT);
message(w1_width||' '||w1_height);
message(w1_width||' '||w1_height);
END;
It seems that forms recognizes FORMS_MDI_WINDOW but there is some configuration problem or windows setting needs to be changed.
I also searched online help. Following text has been taken from Forms online help.
Quote:
You can set the system of window management to SDI by specifying the USESDI command line option. When SDI is enabled, calls to the FORMS_MDI_WINDOW constant returns NULL for the MDI window handle. There is no multiple interface root window, MDI toolbars exist in parent windows, and MDI menus are attached to each window.
Kindly help me.
Thanks
|
|
|
|
|
|
Re: forms_mdi_window problem [message #422417 is a reply to message #422411] |
Wed, 16 September 2009 04:45 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
nasir_mughal
Messages: 122 Registered: April 2007 Location: Karachi
|
Senior Member |
|
|
above thread tells
Quote:
Maybe you have SDI window management. When SDI is enabled, calls to the FORMS_MDI_WINDOW constant returns NULL for the MDI window handle.
I don't know if i am using SDI or MDI window management.If SDI then do you have any idea how convert it into MDI.
|
|
|
|
|
|