Set Window Size according to system Resolustion - oracle

I am designing an application using Oracle FORM Builder 6i.
How can I change the window size that open automatically according to the monitor of various sizes?
Please help

Locate window name in Object navigator; by default, it is (probably) "WINDOW1".
If PRE-FORM trigger doesn't exist, create it and put such a line into it:
set_window_property('WINDOW1', window_state, maximize);
-------
this is the window name
An alternative approach would be to use
set_window_property(forms_mdi_window, window_state, maximize);

Related

Is it possible to manually refresh the contents of a .per file?

I have custom .per files used to provide the user a way to interact with an application from Lauterbach. However, once in a while the values of some variables do not update and the only way to get it back to regular functioning is to close the per file and re-open it.
Is there a command that can be called to "self-refresh" the .per file?
Unless you have limited the updating of windows showing memory (e.g. with command MAP.UpdateOnce) all values should be updated periodically (according to SETUP.UpdateRATE).
So I think, there should be no need for a refresh command. Maybe you should contact Lauterbach support and they can help you to find the source, why some values are not updated..
Anyway, the command to force an update of all windows showing memory is Data.UPDATE
If Data.UPDATE is not doing the trick, you could also add a button to your PER window, which allows you to easily re-open the window. To do that, use the following PRACTICE script (cmm-script):
MENU.ReProgram
(
ADD
BUTTONS "per.-W"
(
MENUITEM "[:refresh]refresh"
(
PRIVATE &cmd &left &up
&cmd=WINdow.COMMAND(WinTOP)
&left=WINdow.POSition(WinTOP,LEFT)
&up=WINdow.POSition(WinTOP,UP)
WinCLEAR WinTOP
WinPOS &left &up
&cmd
)
)
)
You need to execute this code before opening the PER window. (I suggest to add this code to the file C:\t32\system-settings.cmm to get it executed on every start of PowerView.)
When opening a new PER window after executing the script, your PER window will have this button:
When clicking the button it will re-open your PER window.
You can add a button for Data.UPDATE to your PER windows in the same way.

Retrieve clicked widget name in Tcl\Tk

I have a very big Tcl/Tk application with a lot of widget. In order to allow easy access to modify widgets configurations without having to type it in the console per widget/configuration parameter I want to build a dialog for that.
To do so I need an option to easily select the widget to be configured.
I thought to write a function which lets the user to click any widget in the application (any dialog) and retrieves the widget path.
Any ides?
You can convert a global-coordinate (e.g., from a <Button-1> binding's %X and %Y) to a widget name using winfo containing:
bind . <Button-1> {
set w [winfo containing %X %Y]
puts "You clicked on $w"
}
Be aware that this can interact quite significantly with other bindings! You may need to investigate using a grab (carefully; global grabs can cause trouble!) and configuring the -cursor in order to tell users what is going on. It's quite do-able, but some thought may be necessary to make it work the way you want.
(Did you know that winfo containing is a scripted interface to the functionality at the core of most drag-and-drop handling? It uses exactly the system for mapping positions to windows…)

How does GetLastActivePopup work?

I'm trying to apply the techniques of GetLastActivePopup.
I was wondering how does GetLastAcitvePopup work? Is there like a window property or something it checks?
Does anyone know where I can find the SourceCode of this function? THat would help me a lot.
Thanks
Each window in the system has an internal, non-public, non-documented, data structure and one of the fields in that data structure is used to keep track of its last active popup's HWND.
Seeing the source code of the GetLastActivePopup function would not be very enlightening since all it would do is return the value of that data field.
Whenever a new window is activated, Windows looks to see if it has an owner (and if that owner has an owner, and so on). If so it then records the newly activated window as that owner's last active popup.

How to change the size of the components list in Nsis?

I have developed an installer with Nsis with a components page in which the user can select the components to install. I would like to change the size of the component list window and make it greater in order to make visible the entire text of each component without scroll bars.
Does anybody know how I can do it? I'm using simple MUI.nsh, not MUI2.nsh.
Any help will be pleasant. Thanks in advance.
Define MUI_COMPONENTSPAGE_SMALLDESC or MUI_COMPONENTSPAGE_NODESC, if that is not enough you will need to use a custom dialog (ChangeUI)

Locate windows according to system screen size in win32 programming

I have creating one window using CreateWindow. But is there any api which can give system screen height and width of the system. So that it will very helpful to locate windows according to the system screen.
The GetDesktopWindow() function will give you a handle to the desktop window.
You can then query this for it's size using GetWindowRect()
Edit: Note that this will give you the size of the primary display. To handle multiple monitors you will need to use GetMonitorInfo()
To get the size of the workarea on the primary monitor, the call to make is SystemParametersInfo with SPI_GETWORKAREA.
Alternativly you can pass CW_USEDEFAULT (-1) as the x-co-ordinate and windows will pick a position for the window for you.

Resources