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

Hi

I think in this scenario, we would better write a COM Addin to set the
click call back function. Because when we automation Excel to tell the
Excel to add a context menu item, while setting the call back function in
the Winform's member function. Since Excel will try to call the event
handler, while the event handler function is in another process.
So I think you may try to write a COM Addin so that the event handler in
the C# Com-Addin will be in the same process of Excel(The Addin assembly
will be loaded into Excel process)
Here is a sample add-in code for your reference.
How To Build an Office COM Add-in by Using Visual C# .NET
http://support.microsoft.com/?id=302901

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Excel's main windows does not redraw

Hi Peter,

Does it work with MS Office 2002? The article points out that it works with
Office XP/2003.
My customer uses MS Office 2002. Initially I intended to build an MS Office
System-Excel Workbook project supported by Office 2003 but unfortunately
it's not supported by Office 2002.

""Peter Huang" [MSFT]" wrote in message
...
Hi

I think in this scenario, we would better write a COM Addin to set the
click call back function. Because when we automation Excel to tell the
Excel to add a context menu item, while setting the call back function in
the Winform's member function. Since Excel will try to call the event
handler, while the event handler function is in another process.
So I think you may try to write a COM Addin so that the event handler in
the C# Com-Addin will be in the same process of Excel(The Addin assembly
will be loaded into Excel process)
Here is a sample add-in code for your reference.
How To Build an Office COM Add-in by Using Visual C# .NET
http://support.microsoft.com/?id=302901

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no

rights.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Excel's main windows does not redraw

Hi,

One more mention. It's a must that this feature to be available only when
the Excel gets opened by the Windows application (clicking the button on the
only one form) and not more.

""Peter Huang" [MSFT]" wrote in message
...
Hi

I think in this scenario, we would better write a COM Addin to set the
click call back function. Because when we automation Excel to tell the
Excel to add a context menu item, while setting the call back function in
the Winform's member function. Since Excel will try to call the event
handler, while the event handler function is in another process.
So I think you may try to write a COM Addin so that the event handler in
the C# Com-Addin will be in the same process of Excel(The Addin assembly
will be loaded into Excel process)
Here is a sample add-in code for your reference.
How To Build an Office COM Add-in by Using Visual C# .NET
http://support.microsoft.com/?id=302901

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no

rights.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 225
Default Excel's main windows does not redraw

Hi Mircea,

The COM Add-ins is available for office 2000,office XP(2002), office 2003.
The office xp is the office 2002.

There is a few difference between managed com add-in develop.
Office 2000 use the IDE generated Interop assembly.
Office XP use the Office XP PIA
http://www.microsoft.com/downloads/d...61e-3060-4f71-
a6b4-01feba508e52&displaylang=en
Offic 2003's PIA is installed with office 2003 installation program.

We need to build for every version indepently.

Also the Office load the com addins depent on the registry key, we can
change it before we start the Excel to control if we need the Excel to load
the com addins now.
e.g. we can set the loadbehavior key to 0, so that the com addin will not
be loaded.
Add-In Registration
http://msdn.microsoft.com/library/de...us/vsintro7/ht
ml/vxconadd-inregistration.asp

Also for simplification, why not print the error in certain excel cell to
notify the enduser?
Can you describe the scenario more detailed so that we may try to see if
there is other approach?

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Excel's main windows does not redraw

Hi Peter,

I have implemented an Office COM Add-in.
Now the message box is displayed and Excel's main window repaints when the
message box is moved.

The last point to fix is that the new menu item has to be visible only if
the Excel is opened from within the Windows app
by pressing the button on the form.

I think that it will work if the Windows app will set the loadbehavior key
to 0 within the registry.

One more question: I want to extend the windows form with a textbox control.
The text entered by user must be displayed by the Add-in's message box. How
could I send the text to the add-in? I'd like to avoid using the registry.

Thank you for your helpful support,
Mircea

""Peter Huang" [MSFT]" wrote in message
...
Hi Mircea,

The COM Add-ins is available for office 2000,office XP(2002), office 2003.
The office xp is the office 2002.

There is a few difference between managed com add-in develop.
Office 2000 use the IDE generated Interop assembly.
Office XP use the Office XP PIA

http://www.microsoft.com/downloads/d...61e-3060-4f71-
a6b4-01feba508e52&displaylang=en
Offic 2003's PIA is installed with office 2003 installation program.

We need to build for every version indepently.

Also the Office load the com addins depent on the registry key, we can
change it before we start the Excel to control if we need the Excel to

load
the com addins now.
e.g. we can set the loadbehavior key to 0, so that the com addin will not
be loaded.
Add-In Registration

http://msdn.microsoft.com/library/de...us/vsintro7/ht
ml/vxconadd-inregistration.asp

Also for simplification, why not print the error in certain excel cell to
notify the enduser?
Can you describe the scenario more detailed so that we may try to see if
there is other approach?

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no

rights.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 225
Default Excel's main windows does not redraw

Hi

This is related with InterProcess Communication(IPC).
Although there are many IPC methods including the Remoting in .NET.
But I think the easiest way is to store the value in certain excel
cell(invisible), and the addin will read the cell's value to display.

If you still have any concern, please feel free to post here.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Excel's main windows does not redraw

Hi Peter,

P've put the string to registry key then the add-in reads the value from
registry when it gets loaded.
I observed a strange behavior.

If the registry key's value is written (by hand) before running the addin's
setup the add-in is able to read the value and display the message box.
If the value is written to registry (by hand) after installing the add-in
but before opening Excel then opening Excel does not even load the add-in.

""Peter Huang" [MSFT]" wrote in message
...
Hi

This is related with InterProcess Communication(IPC).
Although there are many IPC methods including the Remoting in .NET.
But I think the easiest way is to store the value in certain excel
cell(invisible), and the addin will read the cell's value to display.

If you still have any concern, please feel free to post here.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no

rights.



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Excel's main windows does not redraw

Please ignore the message before. It was a fault of me. Actually I thinks
it's a fault of the IDE.

""Peter Huang" [MSFT]" wrote in message
...
Hi

This is related with InterProcess Communication(IPC).
Although there are many IPC methods including the Remoting in .NET.
But I think the easiest way is to store the value in certain excel
cell(invisible), and the addin will read the cell's value to display.

If you still have any concern, please feel free to post here.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no

rights.



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
Excel does not redraw iteself Mircea Pleteriu Excel Programming 13 March 14th 05 04:10 PM
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 11:30 PM.

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

About Us

"It's about Microsoft Excel"