Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Excel does not redraw iteself

Hi,

I'm developing a class which opens the MS Excel
and extend the context menu with a new item. When the item is clicked all it
does is to popup a message box.
While the message box is displayed, it seems that Excel is locked up and not
redrawing its surface until message box control returns to it, that is,
until the message box is acknowledged.

I mention that my class is not a macro. It just accesses the Excel from
within an .NET Windows Application.

Any idea why MS Excel framwork does not get repaint while the message box is
shown?

Thanks,
Mircea


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 339
Default Excel does not redraw iteself


"Mircea Pleteriu" wrote in message
...
Hi,

I'm developing a class which opens the MS Excel
and extend the context menu with a new item. When the item is clicked all

it
does is to popup a message box.
While the message box is displayed, it seems that Excel is locked up and

not
redrawing its surface until message box control returns to it, that is,
until the message box is acknowledged.

I mention that my class is not a macro. It just accesses the Excel from
within an .NET Windows Application.

Any idea why MS Excel framwork does not get repaint while the message box

is
shown?

Thanks,
Mircea



What happens if you drag the messagebox around? Will it be all white?

/Fredrik


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Excel does not redraw iteself

Not at all. The Excel does not repaint and an image with the message box at
the previous position remains on the screen.

"Fredrik Wahlgren" wrote in message
...

"Mircea Pleteriu" wrote in message
...
Hi,

I'm developing a class which opens the MS Excel
and extend the context menu with a new item. When the item is clicked

all
it
does is to popup a message box.
While the message box is displayed, it seems that Excel is locked up and

not
redrawing its surface until message box control returns to it, that is,
until the message box is acknowledged.

I mention that my class is not a macro. It just accesses the Excel from
within an .NET Windows Application.

Any idea why MS Excel framwork does not get repaint while the message

box
is
shown?

Thanks,
Mircea



What happens if you drag the messagebox around? Will it be all white?

/Fredrik




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 339
Default Excel does not redraw iteself


"Mircea Pleteriu" wrote in message
...
Not at all. The Excel does not repaint and an image with the message box

at
the previous position remains on the screen.


So you end up with 2 or more messageboxes? Can you attach a screen copy. I
know I had a problem like this a long time ago, I hope I can remeber the
solution.

/Fredrik


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default Excel does not redraw iteself

Hi Mircea,

Try setting the ScreenUpdating property of the Excel Application object to
True before displaying any forms or messageboxes. I'm not sure why it would
be False, as it defaults to True. But explicitly setting it to True should
fix what you're seeing.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Mircea Pleteriu wrote:
Hi,

I'm developing a class which opens the MS Excel
and extend the context menu with a new item. When the item is clicked
all it does is to popup a message box.
While the message box is displayed, it seems that Excel is locked up
and not redrawing its surface until message box control returns to
it, that is, until the message box is acknowledged.

I mention that my class is not a macro. It just accesses the Excel
from within an .NET Windows Application.

Any idea why MS Excel framwork does not get repaint while the message
box is shown?

Thanks,
Mircea




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 339
Default Excel does not redraw iteself


"Jake Marx" wrote in message
...
Hi Mircea,

Try setting the ScreenUpdating property of the Excel Application object to
True before displaying any forms or messageboxes. I'm not sure why it

would
be False, as it defaults to True. But explicitly setting it to True

should
fix what you're seeing.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com


I.m not sure it will help but it's worth trying. I did a test where I set
this property to false. I then dragged other windows over Excel, both from
Excel and from other programs. Excel redraw as it should. I don't think this
command prevents Excel's main window from being redrawn although it prevents
updated values in cells to appear.

/Fredrik


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Excel does not redraw iteself

Still not working. I coded in C#. Could it be a problem?

"Fredrik Wahlgren" wrote in message
...

"Jake Marx" wrote in message
...
Hi Mircea,

Try setting the ScreenUpdating property of the Excel Application object

to
True before displaying any forms or messageboxes. I'm not sure why it

would
be False, as it defaults to True. But explicitly setting it to True

should
fix what you're seeing.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com


I.m not sure it will help but it's worth trying. I did a test where I set
this property to false. I then dragged other windows over Excel, both from
Excel and from other programs. Excel redraw as it should. I don't think

this
command prevents Excel's main window from being redrawn although it

prevents
updated values in cells to appear.

/Fredrik




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Excel does not redraw iteself

Do I have to set the parent of the message box to point to the Excel's main
window?

"Fredrik Wahlgren" wrote in message
...

"Jake Marx" wrote in message
...
Hi Mircea,

Try setting the ScreenUpdating property of the Excel Application object

to
True before displaying any forms or messageboxes. I'm not sure why it

would
be False, as it defaults to True. But explicitly setting it to True

should
fix what you're seeing.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com


I.m not sure it will help but it's worth trying. I did a test where I set
this property to false. I then dragged other windows over Excel, both from
Excel and from other programs. Excel redraw as it should. I don't think

this
command prevents Excel's main window from being redrawn although it

prevents
updated values in cells to appear.

/Fredrik




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pls confirm 2007 chart redraw is up to 10 times slower than 2003 larry godfrey Charts and Charting in Excel 27 September 6th 08 10:15 PM
Bug Report - chart redraw disintegrates - regression analysis outp Andyroo Charts and Charting in Excel 5 April 18th 08 12:56 AM
Redraw Application Window Kevin Excel Programming 2 September 27th 04 02:40 PM
How can you turn off screen Redraw Tom Ogilvy Excel Programming 0 June 3rd 04 09:05 PM
How can you turn off screen Redraw Masked Coder Excel Programming 0 June 3rd 04 08:53 PM


All times are GMT +1. The time now is 02:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"