| || |
Click on Farpoint ActiveX Spreadsheet Cell
I want to be able to click on a particular cell within the control. I can get at all of the ActiveX information. I can get the coordinates of the cell I want by searching through cell by cell and getting the text. Once I get to that cell I can get the coordinates using the GetCellPos method. This returns coordinates in twips. Here is the problem, how do I convert twips to WinRunner coordinates, or simply get coordinates WinRunner will understand. VB has a function to convert twips to screen coordinates and I thought to use that, create a .DLL or something, but is there something simpler?
Re: Click on Farpoint ActiveX Spreadsheet Cell
I have noticed that the VB Twips conversion to pixels always seems to be 15. I have changed screen resolution, but it stayed 15. Maybe it depends on the monitor size? Not sure, but anyway for now I have hard coded the value of 15 and came up with this code:
rc = ActiveX_activate_method("FPtable","ShowCell",retva l,Col,Row,Position);
rc = ActiveX_activate_method("FPtable","GetCellPos",ret val,Col,Row,x,y,width,height);
x=int(x/X_TWIP_CONVERSION); # divide by 15