LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to hide the windows bar in excel forms I opened using CVI (excel2000)

It can be done using SDK functions but I don't know how to transfer CVI excel handle into HWND handle in order to use the SDK functions.
Any suggestions? Appreciate any help!
0 Kudos
Message 1 of 5
(3,437 Views)
GetCVIWindowHandle() should be what you are looking for. 
0 Kudos
Message 2 of 5
(3,422 Views)

Opps, wrong answer above. 

I see your trying to convert the excel activex handle to an hwnd.  I am not sure you would be able to call an SDK function using the hwnd for another application from CVI, but I could be really wrong about that also.  I would have been looking for a property in the excel interface that you could set, or posting a message to the excel application.  For anyone else reading this, is it reasonable to be able to call directly into SDK functions for another executing application using its window handle?

Message Edited by mvr on 06-12-2006 08:12 AM

Message Edited by mvr on 06-12-2006 08:17 AM

0 Kudos
Message 3 of 5
(3,421 Views)

And while this may not be of any help at all, since I am posting somewhat useless or random information today (not a good monday), Luis describes how to get the windows handle and post a message to an application here in the link below.  Of course if there is a quick way to get the hwnd directly from the activex handle as you had asked in your original question,  most or all of this would not be required.

http://forums.ni.com/ni/board/message?board.id=180&message.id=23222&requireLogin=False

0 Kudos
Message 4 of 5
(3,413 Views)
Hello all,
 
mvr brought up some good points & I don't have much else to had, but I do have two comments:
 
1. If you can accomplish what you want to do in excel using a property or method through ActiveX, I would go that route, as it might be easier. You can find a reference for the excel object model here (or elsewhere on MSDN):
 
 
2. The thread mvr mentions contains a discussion of the functions you'll want to use. You may also want to look at this example:
 
 
It grabs the handle of window launched as an executable (instead of ActiveX), but it should be the same basic procedure.
 
Good luck!
Charlie S.

Visit ni.com/gettingstarted for step-by-step help in setting up your system
0 Kudos
Message 5 of 5
(3,387 Views)