Jump to content

MartinMcD

Members
  • Posts

    150
  • Joined

  • Last visited

Posts posted by MartinMcD

  1. Hello there,

    I have a tricky problem I'm hoping somebody might be able to help me with...

    I have a vi which runs as a child window within another vi window which I created using the SetParentWindow() method in user32.dll. This works great. The result is as in the image below where the excel document exists as a child window within Excel:

    post-13935-0-01723300-1318446447.png

    I then use a property node to check the child panel bounds. This works fine normally. However, if I move the parent window (and hence the child window within it) then the child's panel bounds are not updated, which they should as they reflect global screen coordinates. If I move the child window just a smidgen then the child panel bounds are correctly updated to reflect the actual global position of the child.

    (I'm happy the property node doesn't update in my scenario, it's just I need a solution)

    I thought a way round this would be to get the size of the child window by using a windows api call instead. So, I'd like to use the the user32 GetWindowRect() method. However, I am not sure how to set up the main part of the call, namely the RECT structure pointer - I've done basic dll calls before but I've not passed in a pointer and I don't know how to create a structure of the right type. I have the window handle ready to pass in.

    If anybody can help me set this up it would be fantastic. I will keep trying myself and post back if I figure it out as well.

    Below is a screenshot of the setup:

    post-13935-0-29408200-1318446311.png

    Thank you,

    Martin

  2. Hello there,

    I have a large data acquisition application. When I create a voltage input channel to add to a task I use custom scales. Now, this means that the possible Min & Max value (in scaled units) will depend on the custom scale and on the input range of the card. I need to work out what I can set these two values to at runtime.

    I can call the AI.Min property once the task timing has been set up, which is no use as by then I have potentially already generated an error.

    Does any body know if there is a quick way of just checking what the input range of a device/channel is at run time, so I can work out what my scaled unit min & max values need to be?

    Thank you,

    Martin

    post-13935-0-22686900-1317245696_thumb.p

  3. Hi again,

    Thank you for the replies. To make sure I understand I've made another screenshot...I've created a class called Vehicle and a child class called car.

    - The car:addone method just calls the parent method which does a simple increment on a numeric.

    - The value on the probe after the action shows that the behaviour I wasn't expecting - it has two values of Numeric, one for the vehicle and one for the car class. I was expecting it to increment the car class Numeric value not the Vehicle class.

    - Does this mean the way I'm doing the override at the moment (from my first post) is the right way of doing things?

    Thank you,

    Martin

    post-13935-0-13835100-1317122567_thumb.p

  4. Hello everyone,

    I think I have a fundamental misunderstanding of what the Call Parent Method does, specifically in an override method. Please can someone help make it clear to me?

    The first part of the image below shows the contents of my override method when it was created. I thought that this would call the parent's implementation of the method (Close Settings Window) but pass in the override method's class data. However, it doesn't work - it calls the parent method but then seems to use the default parent class data - ie in this case the wrong vi ref.

    The seconds part of the image shows what I have ended up implementing in the override method which works fine - it calls the same function that the parent implementation calls. However, it now means I have to edit every override vi to be like this which is duplicating code and adding the risk of errors etc.

    I'm guessing I'm missing something or misunderstanding the OO process. Any help would be great.

    Thank you,

    Martin

    post-13935-0-39502300-1317109934_thumb.p

  5. Hello there,

    All of a sudden when I open one of my projects it is including a whole list of classes from another project in the dependencies. When I remove the main vi then the dependencies list is cleared and when I use the 'Find Items Incorrectly Claimed by a LIbrary' function it agrees with me that all the included dependencies should not be there.

    Does anybody know why this happens please? I am not deliberatley referencing any of the included files and they never used to be there, and I haven't changed the code.

    Can anyone help please?

    Thanks

    Martin

  6. Hello there,

    Well, this is strange. I have a program that runs fine in dev mode and has always run fine as a built executable as well. Now I'm getting this strange error which I've not seen before. (The location of the error is valid, one of my vis). I don't suppose anyone else has come across it? I'm in LV2011.

    A long shot but it'd be great if anyone can help,

    Thanks,

    Martin

    post-13935-0-78756200-1314804619.png

    I take that back, I can generate the error in dev mode. Should make life easier. I'll post back once I figure out the issue.

  7. From looking around the NI site it seems getting a 64-bit setup would not help as the executable would then only run on 64 machines, plus most of the toolkits I use aren't available either.

    I've looked at packed project libraries but I keep getting stuck with them.

    My app consists of multiple dynamically loaded child windows within a main app window, communicating via queues/notifiers and user events - I'm wondering whether it would make sense to create an exe out of each child and then call that instead of the vi.

    Does anybody have any comments on whether this might be a good/bad idea please? Ahh, I suppose the sticking point would be communicating user events across executables. Hmm...

    Thanks

    Martin

  8. Hi all, thank you for the tips.

    I tried upgrading to LV2011 and I no longer get an executable that won't run (as in my first post) so it looks like that was a bug. However, I do still get a failed build due to the Out of Memory condition. I tried monitoring the number of GDI Objects and also increasing the maximum to 30k in the registry, unfortunately to no avail.

    Thanks

    Martin

    post-13935-0-37344700-1313495035_thumb.p

  9. Hello there,

    I am tearing my hair out with the application builder at the moment.... I am building a large app and I have come across memory errors where the build fails. I realise this can be because of the limitations of a 32-bit OS and contiguous memory space etc. I have enabled the Physical Address Extension option in Windows.

    I now have the annoying situation where my build completes apparently successfully, it takes half an hour or so, bun then when I try and run the exe I get the error message below.

    Has anybody else seen this and does anybody know a solution please, or would moving to a 64 bit OS be the only solution.

    I have read up on the forum about the different options to reduce the exe size and therefore the amount of memory to build it but to be honest none of them seem to be that great.

    post-13935-0-40106400-1312360822_thumb.p

    Thank you,

    Martin

  10. Hello there,

    I'm running LV2010 SP1 and I have a file which seems to have become corrupted - whenever I try and open the file LabVIEW just shuts down with no warning or message, it just disappears.

    My backup/svn file is a couple of days out of date so I was just wondering if there are any known ways of trying to repair a file before I have to start redoing my work.

    Thanks,

    Martin

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.