I have a COM shared add-in written in C# that I use in Excel.
One of the thinks that the user can do is to open some winforms.
The problem that I have is that the first time the user opens a winform it
is slow around 7 seconds and after that it takes no time.
Is there a way to speed up the process to show the winform the first time?
Thanks Torben 3 3363
Torben,
Is the showing of the form the first thing that is done when your COM
object is loaded? There are a few things that I can think of that are going
on here. The first is that the showing of the form is the first time your
COM object is referenced, and that causes the CLR to spool up, which is
going to have some overhead.
Also, if showing the form is the first operation that you are doing, is
there any initialization in the form, or in the add-in that could be
accounting for this?
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"Torben Laursen" <To****@newsgro ups.nospamwrote in message
news:OM******** ******@TK2MSFTN GP05.phx.gbl...
>I have a COM shared add-in written in C# that I use in Excel.
One of the thinks that the user can do is to open some winforms.
The problem that I have is that the first time the user opens a winform it
is slow around 7 seconds and after that it takes no time.
Is there a way to speed up the process to show the winform the first time?
Thanks Torben
Nicholas,
The forms are not shown until some time after the COM is loaded.
The COM is loaded and it adds a new menu item to Excel.
The user can then use this menu item to show some forms.
The forms has some code in the constructor but very little, like setting the
active tabpage.
The forms has some components on them mostly tabpages and radiogroups
Torben
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c omwrote in
message news:uH******** ******@TK2MSFTN GP06.phx.gbl...
Torben,
Is the showing of the form the first thing that is done when your COM
object is loaded? There are a few things that I can think of that are
going on here. The first is that the showing of the form is the first
time your COM object is referenced, and that causes the CLR to spool up,
which is going to have some overhead.
Also, if showing the form is the first operation that you are doing, is
there any initialization in the form, or in the add-in that could be
accounting for this?
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"Torben Laursen" <To****@newsgro ups.nospamwrote in message
news:OM******** ******@TK2MSFTN GP05.phx.gbl...
>>I have a COM shared add-in written in C# that I use in Excel. One of the thinks that the user can do is to open some winforms.
The problem that I have is that the first time the user opens a winform it is slow around 7 seconds and after that it takes no time. Is there a way to speed up the process to show the winform the first time?
Thanks Torben This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mark Day |
last post by:
Hi All,
I am using Access 2000 to generate over 40 Excel charts and pivot tables
using early binding to the Excel 9.0 object library. I am finding that if I
show the Excel object while processing the charts, the whole process
completes in around 2 minutes. However if I hide the Excel object the same
process takes around 27 minutes to complete. I have played around with
screen updating and this makes no real difference to the time. Does...
|
by: Mr. Smith |
last post by:
Hello all,
My code can successfully open, write to, format and save several
worksheets in a workbook then save it by a given name, close and quit excel.
My problem is that if I try and do it again, Excel hangs. OR if I open
Excel again (say from a desktop icon) before I close Access, Excel
hangs. (this has happened for both 97 & 2000 for me)
I of course thought that I mustn't be unloading a variable properly.
|
by: Skc |
last post by:
My client's project consists of about 6 files maintenance programs that uses
WinForm and grid for updates with lookup finders for each file. There is
also a User file and security. There are also about 6 fairly standard
reports. This project is supposed to be done in C# Winform with ADO.net and
using MSDE, ActiveReports.Net. I had judged that it would take maybe a
month to do the system. Number of users at 1 time should not exceed 10....
|
by: Hans [DiaGraphIT] |
last post by:
Hi!
I want to export a dataset to an excel file. I found following code on the
net...
( http://www.codeproject.com/csharp/Export.asp )
Excel.ApplicationClass excel = new ApplicationClass();
excel.Application.Workbooks.Add(true);
DataTable table = DATASETNAME.Tables;
|
by: |
last post by:
Hello,
I have a routine in my Windows application that exports the contents of a
datagrid to Excel. It is modeled closely after the HowTo example on MSDN:
http://tinyurl.com/5g2jm.
Depending on the number of rows/columns in the datagrid, it can be extremely
slow (several minutes to populate a 1000x50 spreadsheet). That is
understandable, looking at the number of steps to copy over just one row.
| |
by: ScardyBob |
last post by:
Hello,
I am having trouble importing data from an Excel Worksheet. When I try
to import the data, everything works except certain columns that
contain dates, where it replaces the date with a null in the access
table. To import the data I do the following.
1. Create a table based on the excel spreadsheet setup with the
following query
sSQL = "INSERT INTO " & TblName & " SELECT * " _
|
by: awu |
last post by:
All:
I have a query that has 5 fields and around 15500 records. I need to
save it to a excel file that has two sheets. First sheet saves all the
15500 records. Second sheet saves around 7500 records based on 5th
field contents. So there is comparison in the loop. I am using VBA to
execute this operation. The problem I have is the operation is too
slow. It takes more than 5 minutes.
Any other suggestion to save a query to a excel...
|
by: ssaini |
last post by:
Hi,
I am consuming a java web service in .NET C# smart client, which is based upon Microsoft's SCSF application block.The SCSF is a wrapper over WinForms. When I make a call to any of the Java webservice,for the first time its very slow (takes 600-800ms) but after the first call, if I make any subsequent calls to the same web service then it is preety fast.
The same thing when I did with a Java client, the results are preety good...
|
by: =?Utf-8?B?SmltIE93ZW4=?= |
last post by:
Hi John,
Hopefully this post will find its way back to you - or perhaps be answered
by someone else. As I mentioned in my last post on the earlier portion of
this thread, changing the serialization settings for the build handled the
initial slows we encountered when invoking the web service.
Since that time, we ported the original VB.net code over to C# - this was
done to make it cleaner easier to include the project in the rest of...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |