VishalMistry
24th October 2016, 14:27
Hello Everyone,

When creating user interface objects through 3gl code, I want to know the dimension of parent window like width and height in pixel, so that we can decide the size of it's child accordingly. Please refer below code:

parent.window = create.object( DsCmwindow, 0,
DsNtitle, "Main Window",
DsNprocessgroup, get.pgrp(pid),
DsNminWidth, 700,
DsNmaxWidth, 1000,
DsNminHeight, 500,
DsNmaxHeight, 700)

Here, the maximum width and height is set to 1000 and 700.

Can anybody guide how can we define the maximum size of screen in pixel ? The reason for asking this question is i want to parent.window filling up the entire screen.

Vishal

NPRao
24th October 2016, 19:28
Vishal,

Refer to the thread - Full-screen at session start-up (http://www.baanboard.com/baanboard/showthread.php?t=13000&highlight=get.display.data) for the usage of - get.display.data() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_system_and_user_information_get_display_data)

VishalMistry
25th October 2016, 14:05
Hello NPRao,

Thanks a lot. It is almost complete. The only issue is putting below code still creates small window (as shown in attachment). Actually I want to create a window that fills the entire screen. Below is the code I have written:

di = get.display.width(data)
pwidth = srv.display.height(data)
pheight = srv.display.width(data)
parent.window = create.object( DsCmwindow, 0,
DsNtitle, "Main Window",
DsNprocessgroup, get.pgrp(pid),
DsNresizeable, FALSE,
DsNwidth, pwidth,
DsNheight, pheight)

I checked values stored in pwidth and pheight and it corresponds to maximum width / height of window. I also tried setting some other properties of window like DsNmaxwidth and DsNmaxheigh but still no luck.

Can anybody guide, what could be wrong in the above code ?

Vishal

VishalMistry
25th October 2016, 16:05
I got it. It was a silly mistake !

the line di = get.display.width(data) should be di = get.display.data(data)

Vishal