Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

powerbuilder display only windows

Posted on 2009-04-15
8
Medium Priority
?
684 Views
Last Modified: 2013-12-26
we have two windows w_test1 and w_test2 (w_test1 is a main and w_test2 is a response window). w_test1 has a push button on (lets call it pb_continue).  both windows have a datawindow inside them (dw_1)

what we want to do is the following
==============================

1) open w_test1 and w_test2 simultanesouly. w_test1 will receive focus while w_test2 will be a display only window. (it will be used as background for w_test1).

2) w_test2 will receive focus when pb_continue button will be pressed.

how can we do it?

we want to avoid using opensheet command.
0
Comment
Question by:basilhs_s
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
8 Comments
 
LVL 14

Expert Comment

by:sandeep_patel
ID: 24148697
any specific reason for w_test2 as response window?

change w_test2 as main and when user clicks on that button write w_test2.bringtotop = TRUE

Regards,
Sandeep
0
 

Author Comment

by:basilhs_s
ID: 24150702
the reason that we prefer to have w_test2 as response is that its main and user clickes by mistake in a area outside it its minimized.
how can we open anyway both windows in the beginning with focus only in w_test1?
0
 
LVL 14

Accepted Solution

by:
sandeep_patel earned 1000 total points
ID: 24151050
1. set windowtype property to main for both w_test1 and w_test2
2. declare instance variable called ib_push for w_test1 and intialize with FALSE
3. write below code in Activate event of w_test2
If Not w_test1.ib_push Then
   w_test1.BringToTop = TRUE
End If
4. write below code in clicked event of button
ib_push = TRUE
w_test2.BringToTop = TRUE
5. write below code to open both window
Open(w_test1)
Open(w_test2)

Now you need to identify  when you want to set ib_push back to FALSE.

Regards,
Sandeep
      
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:basilhs_s
ID: 24152731
thanks sandeep .i will check it tomorrow
0
 
LVL 18

Assisted Solution

by:diasroshan
diasroshan earned 1000 total points
ID: 24178206
Hi,

just a few suggestions,
since u have mentioned,
"user clickes by mistake in a area outside it its minimized"

In the above code if u click anywhere else the 2 windows will look like they have minimized.
In order to avoid this, try adding the below code too,
Where ever it is,
w_test1.BringToTop = TRUE
w_test2.BringToTop = TRUE
 replace the line with,
w_test1.SetPosition(TopMost!)
w_test2.SetPosition(TopMost!)

Also, it is always advised to use the function IsValid whenever referencing another window or object,
Some changes to sandeep's code,
write below code in Activate event of w_test2
If IsValid(w_test1) Then
If Not w_test1.ib_push Then
   //w_test1.BringToTop = TRUE
   w_test1.SetPosition(TopMost!)
End If
End If

write below code in clicked event of button
ib_push = TRUE
If IsValid(w_test2) Then
//w_test2.BringToTop = TRUE
w_test2.SetPosition(TopMost!)
End If

Cheers,
Rosh
0
 

Author Comment

by:basilhs_s
ID: 24178413
thanks rosh. i noticed that the windows were minimized when i clicked outside their area. i ll check want you mentioned tomorrow
0
 

Author Comment

by:basilhs_s
ID: 24192279
solution is working perfectly with one side-effect however. if messages are going to be displayed (thru messagebox statements or thru operating system/sql-server) sometimes they do appear behind w_test2 (at least a part of them) can we do something about it?
0
 

Author Closing Comment

by:basilhs_s
ID: 31570302
thaks both of you
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question