Sign in to follow this  
Followers 0
ptrex

Excel Grid does not resize as it should the 1st time.

26 posts in this topic

When we use the Excel COM object in a GUI, everything is displayed correctly.

But the when you maximize the windows and click in the Excel object it jumps to its original (minimized) size.

When you minimize the windows again and maximize afterwards. Click in the object again. It will work as it should.

Can anyone explain this behaviour why the first time it jumps and afterwards it's OK ?

See here for the code.

http://www.autoitscript.com/forum/index.ph...t=0#entry122949

Thanks

Share this post


Link to post
Share on other sites



When we use the Excel COM object in a GUI, everything is displayed correctly.

But the when you maximize the windows and click in the Excel object it jumps to its original (minimized) size.

When you minimize the windows again and maximize afterwards. Click in the object again. It will work as it should.

Can anyone explain this behaviour why the first time it jumps and afterwards it's OK ?

See here for the code.

http://www.autoitscript.com/forum/index.ph...t=0#entry122949

Thanks

I work on it B)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I'm working with the Office components right now ( office 2000 ) and my spreadsheed object PROGID is called OWC.spreadsheet.9 and not OWC00.spreadsheet as in your example but it do have the maxi / mini behave bug as a lot of other com componens do - I work with the Forms componens almost just the same, MSWebDvd almost the same, I think that it's something with component fokus to do as if you see your example script the com object do not has focus or an active tag but if you see MSSpreadsheet from the office packet it has an tag that has the focus - a quick walk around could be to let autoit3 do a mouseclick to activate the focus tag...

PROGID: OWC.spreadsheet.9 CLSID: {0002E510-0000-0000-C000-000000000046} file version 9.0.0.3821 from library MSOWC.DLL ( office 2000 )...

kjactive B)

Edited by kjactive

Share this post


Link to post
Share on other sites

I'm working with the Office components right now ( office 2000 ) and my spreadsheed object PROGID is called OWC.spreadsheet.9 and not OWC00.spreadsheet as in your example but it do have the maxi / mini behave bug as a lot of other com componens do - I work with the Forms componens almost just the same, MSWebDvd almost the same, I think that it's something with component fokus to do as if you see your example script the com object do not has focus or an active tag but if you see MSSpreadsheet from the office packet it has an tag that has the focus - a quick walk around could be to let autoit3 do a mouseclick to activate the focus tag...

PROGID: OWC.spreadsheet.9 CLSID: {0002E510-0000-0000-C000-000000000046} file version 9.0.0.3821 from library MSOWC.DLL ( office 2000 )...

kjactive B)

Thanks kjactive for helping me.

The tests I did indicates that the control resize itself on the click without AutoIt being notified.

So I cannot do anythink in the AutoIt GUI code :o:graduated::)

Share this post


Link to post
Share on other sites

Hey guys,

Thanks for the support.

But how do you explain than that the problem we have is only the 1st time that the resize problem orrurs.

The next times I don' t have the problem anymore, it work fine.

This means that there must be some kind of initialization problem the first time that the windows is maximized.

The next times there no problems.

There is still an other problem, with the refreshing of the screen. But that something else. Let's look at 1 problem at the time.

Share this post


Link to post
Share on other sites

Hey guys,

Thanks for the support.

But how do you explain than that the problem we have is only the 1st time that the resize problem orrurs.

The next times I don' t have the problem anymore, it work fine.

This means that there must be some kind of initialization problem the first time that the windows is maximized.

The next times there no problems.

There is still an other problem, with the refreshing of the screen. But that something else. Let's look at 1 problem at the time.

as say kjactive those embedded control behave sometime strangely !!! B)

Share this post


Link to post
Share on other sites

Well it's the behave of some objects that they needs focus but there is nearly always a walk around...

$tmp = WinGetPos($MainWin)
    MouseClick("left", $tmp[0] + 80, $tmp[1] + 80,1,1)
GuiSetState()

Non seen action but works alright on most of these nonfocused objects, be aware that these objects are target different area and not all to be embedded into elsewhere than HTML as I beleave is the target of the OWL com objects...

kjactive B)

Share this post


Link to post
Share on other sites

@jpm

Thanks for the feedback.

Does this mean that there are no improvements we can make anymore, at this point ?

Which improvements are thinking about?

The Biggest problem for me is the disparition of SvenP and the lot of code very mysterious to me.

If I can do something from the GUI side I will be please to do it. B)

Share this post


Link to post
Share on other sites

@jpm

I miss SvenP too ?! Where did he go ?

Anyhow we have got a solution for the flickering of the Excel COM object and the rest of the control related problems.

One problem left now is that when loading the data into the Excel COM object it take 100% CPU when there are a lot if records involved.

Is there a way to handle that ? I have tried to put the sleep() command in the routine, but no success. It only take longer to load the data, of course.

The routine starts at about line 610.

I will attach the code here

Database_1.au3

Share this post


Link to post
Share on other sites

@jpm

I miss SvenP too ?! Where did he go ?

Anyhow we have got a solution for the flickering of the Excel COM object and the rest of the control related problems.

One problem left now is that when loading the data into the Excel COM object it take 100% CPU when there are a lot if records involved.

Is there a way to handle that ? I have tried to put the sleep() command in the routine, but no success. It only take longer to load the data, of course.

The routine starts at about line 610.

I will attach the code here

Database_1.au3

I will have a look to 100% but i was afraid running my debugging version to see so much activity on the Com/Obj internals procedure.

I have a question are ou a C++ designer able to understand all SvenP code. I know kjactive cannot. But at a time we need to maintain the SvenP code. I would be better with him but...

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

Hey I made a test on your script and it did looked like, it was your script useing CPU 100% but I don't think that it was the case and I have read about manny peoble got the same trouble with other programs, XP and the "Content Indexing Daemon" - 'cideamon.exe' a service program, a background process that builds a fast search index of the files used on your computer. Chances are you don't need it, and can disable the indexing service - I removed the process and the trouble disapeared...

lookup a goggle search and read about the problem and how to disable if this is the case...

kjactive B)

Edited by kjactive

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

No "Content Indexing Daemon", a background process that builds a fast search index of the files on your computer run by the cideamon.exe program...

I have had the same problems with CIDEAMON.EXE and as someone previously stated, it kicks in when processes are low or dormant (this happens mostly when i am using textpad).

Naturally when the processor goes crazy like this, we shut down any unwanted programs to no avail. i load realplayer as i am working on low cpu usage programs and this does the trick and shuts CIDAEMON up!!! try it

I have sen this offen happen on my XP computers...

To easily shut down cidaemon.exe, wich is part of the microsoft indexing service, go to Start > Run, type and start services.msc, doubble-click on indexing-service in the list, and turn Starttype to off, so it will not start anymore when you start up windows.

try do a goggle search on cideamon.exe and read about this in 100 different languages - many peoble has this trouble with XP but if this is the trouble in your case I don't know - also open the process manager and have a look...

kjactive B)

Edited by kjactive

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

One last question.

I found a work around to prevent the JUMPING if the Excel control when maximizing.

When the first cell is CLICKED of the CONTROL, before maximizing the window, there will be no jumping anymore.

Can anyone tell me how I can make sure the when opening the GUI with the Excel Object the 1st cell is CLICKED.

Thanks a lot.

Share this post


Link to post
Share on other sites

@kjactive

No such process found (checked the taks manager)

Thanks anyway for the input.

@jpm

No need amymore to look at the 100% CPU problem.

Blink314 rewrote the route which solved that problem.

Thanks all for the help.

is the post #156 the working version solving this 100% issue?

Share this post


Link to post
Share on other sites

One last question.

I found a work around to prevent the JUMPING if the Excel control when maximizing.

When the first cell is CLICKED of the CONTROL, before maximizing the window, there will be no jumping anymore.

Can anyone tell me how I can make sure the when opening the GUI with the Excel Object the 1st cell is CLICKED.

Thanks a lot.

never say LAST. B)

Certainly kjactive can help you at least I hope.

for the GUI side you can be notified on $GUI_EVENT_RESIZED and do some action. :o

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0