Set Parent window using User32 at lv7.1

Hello all,
I am using User32.dll to make a parent-child relationship between two VIs. I use SetParent function, and pass the handle of parent VI and child VI to this function. Now, after this relationship has been established, the child window postion is not fixed when refresh, attachment is my source code , Can anyone help me on this?
Thanks in advance!
Attachments:
Sample.zip ‏47 KB

I think there are actually several not necessarily related issues here. First of all when I tested this program in LabVIEW 8.6 (not having had an older version handy at that moment) the first thing I noticed, was that the VI never got parented at all. The reason was simply the data type mismatch in the handle between what Get Window Handle returns and what Add Child uses. Once I fixed that it worked like a charm with no jumping whatsoever.
So I did a test in LabVIEW 7.1 just now and indeed it does jump there. But, I wouldn't exclude that LabVIEW 7 migh have done it correctly for the OS (W2K) that was current at that time it came out. But there are really at least two solutions: Upgrade to a newer LabVIEW version, at least 8.6 works fine (8.2.1 didn't I just checked) or don't call the VI continously but let it run as an independant "process" and pass data by other means than through the connector pane (personally I would point out that globals are a bad way for this )
And by the way, almost all Windows handles are actually pointer sized entities so if you happen to use such window managment VIs in LabVIEw 8.6 or higher it is advisable to not configure them as U32 but as pointer sized (unsigned) integer instead
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • Is it possible to refresh parent window using only JSP??

    If I open a up a new browser window using target="_blank" in the link. Is it possible for me to refresh the parent window using only JSP?
    I know it's possible using Javascript ( window.opener.location.reload(true) ), but my customer don't allow me to use Javascript.

    There is no problem Timo. I'm actually glad that you responded. You're a person that works with ADF for a long time so you know what can be or not easily done, so many thanks.
    I'm going to ask you another question so i don't have to open a new topic and cause a little spam on the forum.
    Is there any way to have more than 2 attributegroups working in my treemap, or in another words, more than 2 ifs in my treemap to color the elements by more than 2 colors or patterns?
    I have this:
    <dvt:treemapNode value="#{row.Store}" label="Store: #{row.Store},  amount: #{row.Amount}" id="tn2" drilling="replace">
         <dvt:attributeGroups value="#{row.Amount lt 10000000}" type="color" id="ag5" label="#{row.Amount lt 10000000 ? 'Abaixo dos 10.000.000' : 'Abaixo dos 20.000.000'}"/>
         <dvt:attributeGroups value="#{row.Amount lt 20000000}" type="color" id="ag7" label="Amount less than 20.000.000"/>
    </dvt:treemapNode>
    If i try to put another attributeGroups, it will not work, for example, for the tests, i've try to add a attributeGroup for an especific amount and all my elements got colored.
    Don't know if it is important but i have a hierarchy in my treemap.
    Any ideias Timo?
    Regards and many thanks.

  • How to pass value to pop up window using javascript function?

    I am not sure how to do this, I want to open new window from existing form,This is Mod/PLsql for consists some javascript functions also. When I am clicking on new window in form then new form should open with results of value entered,but new window form is opening with main page :( , not able to get text box value from parent form. How to call textbox input value in popup window from parent window using javascript?
    currently I'm using following code:
    HTP.p('<script type="text/javascript">
    function pop_up5()
    var l_url=window.opener.document.getElementById("p_single_store_pc").value;
    window.open(l_url, '''', ''fullscreen=no, scrollbars=1'');
    </script>' );
    Edited by: user11970612 on Jun 14, 2012 5:02 AM

    this is probably due to the Javascript code and not a "real link" to another page... I don't know if the null is due to the Javascript...
    But if you really really want to use javascript instead of a ... you can pass the location of the url with JSP (on your main page) as a parameter to the open window... (...) u can put instead of main.jsp <%= request.getServerName()+request.getRequestURI() %>
    the value <%= ... %> will return something like test.com/html/main.jsp
    Hope this helps.

  • Calling a Function in the Parent Window from the Child Window

    QUESTION: How do I call a function resident in the parent
    window from a child window?
    BACKGROUND
    I have a JavaScript function resident in the parent window
    that reformats information obtained from the Date object and writes
    the result to the parent window using the document.write( ) method.
    I would like to call this function from the child window and have
    it write to the child window instead. Is this possible? If not,
    must I rewrite the entire function and nest it in the below code?
    If so, what is the proper form of nesting?
    CODE: The code that creates and fills the child window is
    provided below. The highlighted area indicates where I would like
    to enter the information from the function resident in the parent
    window. I have tried every imaginable permutation of code that I
    can imagine and nearly destroyed my parent document in the process.
    I am very happy that I had a back-up copy!
    function openCitationWindow() {
    ciDow = window.open("", "", "width=450, height=175, top=300,
    left=300");
    ciDow.document.write("A proper way to cite a passage of text
    on this page:<br /><br />Stegemann, R. A. 2000.
    <cite>Imagine: Bridging a Historical Gap</cite>. " +
    document.title + ". [<a href='" + location.href + "'
    target='_blank'>online book</a>] &lt;" + location.href
    + "&gt; (");
    MISSING CODE;
    ciDow.document.write(").<br /><br /><input
    type='button' value='Close Window' onclick='window.close()'>");
    ciDow.focus();

    Never mind - I was doing something very stupid and wasn't
    calling the function as a method of a movie clip. I was simply
    calling checkTarget(event) rather than
    event.currentTarget.checkTarget(event); which seems to work.

  • Unable to open windows using boot camp.  Get message "The bless tool was unable to set the current boot disk."  Any thoughts, Thank you.

    Unable to open windows using boot camp.  Get message "The bless tool was unable to set the current boot disk."   I am using an Imac , Lion operating system, and Windows 7.  It worked a few days ago.  Any thoughts, Thank you.

    Note that nowhere in the Boot Camp instructions does it tell you to use Disk Utility to format the Windows partition. The Boot Camp Assistant program creates the partition & sets the +partition scheme info+ of the disk as appropriate for the Windows installer but the Windows installer itself is responsible for formatting the new partition with the appropriate +file system scheme+ (NTFS for Windows 7).
    If you follow the instructions in the Boot Camp Installation & Setup Guide to the letter you should have no problems installing Windows.

  • How to set focus in the parent window after a JOptionPane pop up ?

    I am not able to set the focus back to a JTextField in the parent window after poping up a JOptionpane.showMessageDialog(). I tried requestfocus(),requestFocusInWindow etc......but not working. The code is given below.
    if ((encryptor.encrypt(password)).equals(configuredPasswd)) {
                        validPassword = true;
                   } else {
                        JOptionPane.showMessageDialog(saveUI,"The password entered is not correct.");
                        saveUI.getPasswdField().setText("");
    saveUI.getPasswdField().requestFocus();
    Sometimes the focus is coming to the JTextField.Sometimes it appears for a moment and then dissappears.Please give a solution

    see if this makes a difference
    if((encryptor.encrypt(password)).equals(configuredPasswd))
      validPassword = true;
    else
      JOptionPane.showMessageDialog(saveUI,"The password entered is not correct.");
      ActionListener al = new ActionListener(){
        public void actionPerformed(ActionEvent ae){
          saveUI.getPasswdField().setText("");
          saveUI.getPasswdField().requestFocusInWindow();}};
      javax.swing.Timer timer = new javax.swing.Timer(100,al);
      timer.setRepeats(false);
      timer.start();
    }

  • Evertime i open a secondary window in an application it opens on my laptop and I working on the application on my thunderbolt. what setting do i use to open the secondary window on the thunderbolt?

    evertime i open a secondary window in an application it opens on my laptop and I working on the application on my thunderbolt. what setting do i use to open the secondary window on the thunderbolt?

    ''Problem:'' For whatever reason, NoScript is stopping Runescape Community Toolbar from working properly which freezes your first Firefox window.
    ''Fix:'' Uninstall the toolbar. Disable NoScript. Install the toolbar. Add your RS account to it and make sure it works, then Enable NoScript again.
    EDIT: Posted a fix earlier that was wrong. Corrected to the right one, sorry ^_^ Answer was on Runescape Forums.

  • I just set an administrators name (my full name) and password for parental controls (using the one I always use) and now after restarting and trying to make changes to aprental controls it does not recognize my password

    I just set an administrators name (my full name) and password for parental controls (using the one I always use) and now after restarting and trying to make changes to aprental controls it does not recognize my password

    Hello, do you have another admin account to log into for a test?

  • Using Qt in a AEGP plugin. QWidget can't get after effects as parent window

    Hey guys,
         I'm trying to use the qt framework to create a user interface for my AEGP plugin. And I'm running into some problems.
         First, I tried to pass the main HWND into a QWidget, but the QWidget can't seem to recognize it as a parent window. My code looks like this,
    A_Err err = A_Err_NONE;
    AEGP_SuiteHandler suites(basicSuiteP);
    HWND handle;
    ERR(suites.UtilitySuite5()->AEGP_GetMainHWND(&handle));
    qt tt(handle);
    tt.show();
    qt is a child class inherit from QDialog with a custom constructor
    qt::qt(HWND hWand) :QDialog()
      create((WId)hWand);
      setModal(true);
    The qt window did show up, but it can't block user's interaction with after effects' main window. When a QDialog pops up, it will block user's interaction with its parent window until it's closed. But it doesn't seem to work with after effects.
    And, I'm wondering, is it possible to add a QWidget to after effects' native panel? For now, my qt window is floating as a separate window. can I  just add my qt widgets into a after effects panel so it can dock into after effects' main window?

    FCP doesn't work with H.264 files. It might bring it in, or it might not. It might seem like it's working, but then sync drifts. It might look like it's fine, but when you export different sections jump to other clips. It's unpredictable. 
    FCP 7 and H.264 do not mix.
    If you are exporting files out of AE on a PC, then look at exporting them as DNxHD...the Avid codec. or Cineform. Then the FCP user will need to install the Avid codec or Cineform in order to see the file, but then they should convert it again to ProRes 422...as working with non-FCP codecs in FCP can be problematic.  I recommend those formats over the others, like ANIMATION or UNCOMPRESSED...because of the file size issues. 
    If you are using AE on a Mac, the same computer as FCP...then export as ProRes right away. Done and done.

  • How to close parent window when we use call method l_window_manager- create

    hi...
    how to close parent window when we use call method l_window_manager->create_external_window
    thank you.

    hi
    good
    go through this link,hope this ll help you to solve your problem
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/63a47dd9-0b01-0010-3d8e-de27242bf011
    thanks
    mrutyun^

  • How to re-show a dialog with the parent window

    I am writing an Menu drivern application:
    -- A JCMDIPane is put in the JFrame.
    -- Multiple JCMDIFrames are added to the JCMDIPane via menu selecting events
    -- Each JCMDIFrame (call it parent) may pop up a Dialog window (child) (Thes dialogs are modal)
    Here is my problem:
    When you switch away from this Java application to other applications (reading mauls, editing word documents, surfing web), of course, the Java program is hiding behind these applications and only left a Icon on your taskbar. The problem is that when switch back from other application to this Java program, However, it only shows the parent window (the JCMDIFrame ) and the child (the dialog) is behind. You have to using Alt_Tab to get the focus on the child and show it.
    My question is:
    Is there any way can we show the Dialog window is on the parent window (as it originally shown)?
    I have tried to overwriting the paint method of JCMDIFrame :
    public void paint(Graphics g)
    super.paint(g);
    if(child != null && child.isShowing())
    child.setVisible(true);
    This works on other applications but not on the Internet Explore (It always show the dialog).
    Anybody can give me a clue?
    Thanks!

    When you pop up a dialog, if you use the constructor:
    Dialog(Frame owner, boolean modal);
    and pass it an instance of the parent frame (and set "modal" to "true"), then it is my understanding that it should always appear in front of the parent - are you sure this is what you are doing?
    Double check by doing myDialog.getOwner() and make sure it's not null.

  • How do I populate a popup window with data from the parent window

    I am brand new to JSF so please help me. I have a JSF page where users enter some search criteria and it displays the results in a matrix table. I need to have a PRINT button or link on this page that pops up a new window that displays the same data but in a printer-friendly format.
    The parent page is already created and works fine. Now, what is the best way to populate the same data in the popup? The data is stored in a hashmap and retrived by a managed bean with session scope. Below is the XHTML code for displaying the table in the parent page.
    <tbody>
                             <c:forEach items="#{inventoryManagedBean.inventoryColors}" var="row">
                                  <tr id="matrixColor">
                                       <c:forEach items="#{inventoryManagedBean.sizeList}" var="column" varStatus="cellStatus">
                                            <c:if test="#{cellStatus.index == 0}">
                                                 <th width="70px"><h:graphicImage value="../graphics/styles/#{row.color}.jpg"
                                                      alt="#{row.color}" width="70" height="40"></h:graphicImage></th>
                                                 <th width="100px"><h:outputText value="#{row.colorDescription}" />
                                                 <h:outputText value="#{row.color}" /></th>
                                            </c:if>
                                            <td width="70px"><c:if
                                                 test="#{inventoryManagedBean.inventoryMap[row.color][column.size] != null}">
                                                 <c:if test="#{inventoryManagedBean.inventoryMap[row.color][column.size].label != '-1'}">
                                                      <span class="matrixText"><h:outputText
                                                           value="#{inventoryManagedBean.inventoryMap[row.color][column.size].label}"
                                                           title="#{inventoryManagedBean.inventoryMap[row.color][column.size].title}" /> </span>
                                                      <t:htmlTag value="br" rendered="#{userManageBean.user.loggedIn}" />
                                                      <a4j:region renderRegionOnly="false">
                                                           <h:inputText
                                                                value="#{inventoryManagedBean.inventoryMap[row.color][column.size].quantityOrdered}"
                                                                rendered="#{userManageBean.user.loggedIn}" maxlength="6" size="6">
                                                           </h:inputText>
                                                      </a4j:region>
                                                 </c:if>
                                                 <h:outputText value="Call"
                                                      rendered="#{inventoryManagedBean.inventoryMap[row.color][column.size].label == '-1'}" />
                                            </c:if> <h:outputText value="N/A"
                                                 rendered="#{inventoryManagedBean.inventoryMap[row.color][column.size] == null}" /></td>
                                       </c:forEach>
                                  </tr>
                             </c:forEach>

    call javascript window.open("pagename"); & add some printer button there,
    and put rendered attribute to button & in backing bean generate boolean getter setter for variable use same variable in jsp printer button in rendered attribute, in bean constructor pass some parameter throuh jsp page,
    if parameter is match then it rendered attribute to true for button else not,
    it means that in parent window you can not see printer button, but in same window in popup you will see printer button,
    good luck
    <h:commandButton rendered="#{bean.renderedButton}"/>
    bean
    private boolean renderedButton= false;(generate getter setter)
    also pass parameter from UI to bean constructor

  • Can I set parental control on firefox for a specific user only?

    I'm using windows 7 and firefox 18.0.2. On my PC I have my Admin account and my kids account. Now as they're coming to an age they're needing Internet access for projects and so on, I wonder if I can set parental control on firefox (by add-on?) as I have on windows, so that whenthey log on their account, firefox will only allow access to what I have allowed. That is, limit internet usage ONLY on their account, while I'll still be able to use firefox unrestrictedly. I don't want to have them use another browser that I' m not as familiar with just so I can set parental control on everything on that browser. Any ideas?

    If you mean you want to block certain sites by some parental control software, you can try a web filter to block sites by URL or keywords.
    https://support.mozilla.org/zh-CN/questions/938721?esab=a&s=&r=1&as=s
    * <sub>'''edit'''</sub> or link [/questions/938721] <sub> this type of link should match viewers locale -J99</sub><br /> <sub>used ''<nowiki>[/questions/938721]</nowiki>'' , omit ''/zh-CN'' </sub>

  • Sending TABLE data in child window to parent window

    My question is as follows:
    I have a JSP with a parent window, which opens a pop-up window.
    In the pop-window there is a <TABLE> tag defined with a number
    of <TD> definitions referencing columns of data from a database table.
    There is also a 'select' button next to each row displayed.
    On pressing the 'select' button I want the data to go back to the fields
    in the parent window.
    I am successfully displaying the data in the pop-up window
    I have used the DOM model in the past and for other elements within this JSP - i.e. drop down lists, sending data back to the parent window works fine, but I'm not sure of the syntax for referencing the TABLE items within the DOM model to send back to the parent window.
    Any help on this would be very much appreciated.
    Many Thanks
    Chris

    Well I've looked and I can't find anything wrong with it, but then I wrote it. I've included it as follows:
    <%@page contentType="text/html"%>
    <html>
    <head>
    <SCRIPT language=JavaScript>
    function send_back(eventHandle)
    if (opener == null) {
    alert("\n Calling Window is no longer present. Will now close this window\n");
    window.close();
    else
    if (eventHandle == "returnRow") {
    <%-- Significant code below with the first statement referencing--%>
    form name and item name and its value --%>
    opener.document.produceTrans.studentID.value =
    document.personLOV.personID.value;
    <%-- statement below works so no that variable is correct-value --%>
    <%-- part is wrong --%>
    <%-- opener.document.produceTrans.studentID.value = "290000"; --%>
    </SCRIPT>
    <title>Person List
    </title>
    </head>
    <%-- If the focus switches to the calling window this called window is closed
    <BODY onBlur="window.close()"> --%>
    <BODY>
    <jsp:useBean id="personV" scope= "request" class="mypackage.PersonBean"/>
    <jsp:setProperty name="personV" property="personName" />
    <%-- Significant code below 1 with form name = personLOV --%>
    <form name=personLOV METHOD="POST" action="transcript-control-servlet?Action=personList">
    <TABLE >
    <tr>
    <td><input type='text' size=32 name="personName"> </td>
    <td>
    <input type="submit" name=personSearch value="Find Person">
    </td>
    </tr>
    </TABLE>
    <br>
    <div style="width:480px; height:170px; overflow: auto;">
    <TABLE border="1" cellspacing="1">
    <tr>
    <%
    Vector personVector = new Vector();
    try {
    personVector = (Vector)request.getAttribute("listPerson");
    for (Enumeration e = personVector.elements();
    e.hasMoreElements();) {
    personV = (mypackage.PersonBean)e.nextElement();
    //Significant code below 2 with persID setup
    String persID = personV.getPersonID();
    %>
    <tr>
    <%-- Significant code below 3 with hidden field set to persID --%>
    <%-- and name=personID --%>
    <td><input type="hidden" name=personID value='<%=persID%>'></td>
    </tr>
    <tr>
    <td><input type="button" name=SelectPerson value="Select"
    onClick=send_back("returnRow")> </td>
    <td><%= personV.getPersonID() %></td>
    <td><%= personV.getPersonLastName() %></td>
    <td><%= personV.getPersonFirstName() %></td>
    <td><%= personV.getPersonBirthDate() %></td>
    </tr>
    <% } }
    catch (NullPointerException ce) {
    System.out.println("No records in list ");
    %>
    It is very straightforward and I believe I am referencing the correct form name/item name in the correct manner.
    If I'm not then please tell me why not and how to fix it.
    Thanks
    Chris

  • Communicating from child window to parent window

    I'm been trying to communicate a child page with a parent page using window.opener, but I can't make it work. This is an example of what I've been working on (from child to parent). Any idea?
    <$-HTML>
    <$-HEAD>
    <$-TITLE>
    Ventana hija
    <$-/TITLE>
    <$-SCRIPT Language="javascript">
    function cerrar() {
         alert(window.opener.document.url())
         window.opener.frmPadre.field1.Value = document.frmHijo.field1.value;
         window.opener.frmPadre.field2.Value = document.frmHijo.field2.value;
         window.opener.frmPadre.field3.Value = document.frmHijo.field3.value;
         document.frmHijo.valor.value = document.frmHijo.field1.value;
         window.opener.frmPadre.btnSubmit.focus();
    <$-/script>
    <$-/HEAD>
    <$-BODY>
    <$-form name = frmHijo>
    <$-input type = text name = field1><$-br>
    <$-input type = text name = field2><$-br>
    <$-input type = text name = field3>
    <$-input type = button name = btnSubmit Value = "DEVOLVER" onClick = cerrar()>
    <$-/form>
    <$-/BODY><$-/HTML>
    The parent window hast a form name frmPadre with those 3 fields.

    Javascript is not java, but here are a couple of tips for debugging:
    You can use the browser address bar to alert stuff
    ie : put this into the address bar of your browser and see what happens: javascript:alert("Hello world")
    I would recommend you progress like this - slowly building up the link until you find where you go wrong.
    In this case, I think you missed out a "document"
    javascript:alert(window.opener)
    javascript:alert(window.opener.frmPadre)
    javascript:alert(window.opener.document.frmPadre)
    javascript:alert(window.opener.frmPadre.field1)
    Also just as a tip, cross browser scripting is a lot easier to maintain if you limit your self to calling FUNCTIONS in other windows.
    ie rather than setting the values in the other windows textfields, call a function (with parameters) which does it.
    eg in this case it might be:
    window.opener.setPadreFields(document.frmHijo.field1.value, document.frmHijo.field2.value, document.frmHijo.field3.value)
    The function would take the parameters and put them in the appropriate place on the form.
    Doing it this way decouples the pages a little - you only interact with the other page via the function (single point of entry) and if you modify the page in the future (eg change the name of a field) it is much easier to find everywhere you need to do this.
    Hope this helps,
    evnafets

Maybe you are looking for

  • Creative Mediasource Pla

    When I click on the icon I get an error message that says <B> Creative MediaSource Player has encountered a problem and needs to close. </B> I deleted files and folders under "C:\Documents and Settings\YourName\Application Data\Creative\ Mediasource

  • DVD cleaning

    I've burned about 50 dvd's on this machine and now I'm seeing distortions where the pixels seem to deteriorate at certain spots. Does the unit need cleaning? How do I do that?

  • MB1B, Mvt Type 351 not posting to "stock in transit"

    Hello Experts, I have created the STO. Now I am executing MB1B with mvt type 351. When I open the material document created, I look at the financial documents, the stock value has been relieved from the supplying plant and posted to the receiving pla

  • How to globally set K100% to overprint?

    I have some InDesign (CS2 & CS3) files which consist of text setup as K100% and various tint values such as K70%, K50, K30%, etc. Some of the text are placed on top of color panels. I would like to perform a global change of K100% to overprint wherea

  • Reader X will not open any PDF

    I am running Windows XP SP3 and have just insta lled Reader 10.1.0 and it will not open any PDF's created in earlier versions, and just gives me a Microsoft error messag e any help would be appreciated.  have tried repairin gg and uninstalling and re