|
Do you know how to use Interfaces which are predefined in c#.
Actually i have a problem in using the interface called"
Microsoft.Office.Interop.Word.TableOfContents
Can u know how to do same.?
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
It's not good to hijack another user's question. Please don't.
Also, you've got a thread going about this below. Use that thread.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Which edition of Visual Studio .NET 2005 are you using? The Class Diagram doesn't exist in the Express Edition. It's only available in the Standard, Professional, and Team System Editions.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hello Dere,
I m Facing a problem in making automatic indexing to my word document generated through c# code.
What i know abt this is, their is an interface name TableOfContents thrpough which we can add Table of content and using its Mark entry method we can solve the problem.
But real this is that i can able to use this interface,
Can anyone plz help me in this.
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
Please find solution on google.Do not put any problem or error on any forum.
|
|
|
|
|
The Word.Document class has an Indexes collection associated with it. You just need to add your interface there.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
well thanks for ur kind reply, but again there a question of how to use this Indexes interface in our c# code.
I m trying it from last 5 hrs but able to crack the same.
Can u plz help me in getting the code.
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
hi
how to add a bitmap in the sourcegrid control?
HOW to insert bitmap in the sourcegrid control?
Thanks,
Rock
|
|
|
|
|
What is the sourcegrid control?
|
|
|
|
|
What's wrong with this sample code? Why there are two same pages when I add only one?
There is variable c to check raising event multiple times.
<br />
namespace WindowsApplication1<br />
{<br />
public class Form1 : Form<br />
{<br />
private TabControl tabControl1 = new TabControl();<br />
private int c = 0;<br />
<br />
public Form1()<br />
{<br />
tabControl1.Location = new System.Drawing.Point(10, 10);<br />
tabControl1.Size = new System.Drawing.Size(180, 180);<br />
tabControl1.HandleCreated += new EventHandler(tabControl1_HandleCreated);<br />
<br />
this.ClientSize = new System.Drawing.Size(200, 200);<br />
this.Controls.Add(tabControl1);<br />
}<br />
<br />
void tabControl1_HandleCreated(object sender, EventArgs e)<br />
{<br />
tabControl1.TabPages.Add((++c).ToString());<br />
}<br />
}<br />
}<br />
|
|
|
|
|
Hello,
cha061 wrote: tabControl1.TabPages.Add((++c).ToString());
Whats this?
It's not even compiling (At least not in .Net 1.1).
All the best,
Martin
|
|
|
|
|
hello,
try this: tabControl1.TabPages.Add(((int)++c).ToString());
|
|
|
|
|
Hello my friend!
Ok just looked in the dokumentationj and found out that in .Net framework >1.1 a string as parameter is possible.
Looking for a solution!
All the best,
Martin
|
|
|
|
|
Hello,
It's really confusing.
Just made a test application and found out that it's only the fact if you Adding the TabPage in the HandleCreated Event.
But the TabCount property of TabControl is only 1.
Is there a reason why you have to use this event?
All the best,
Martin
|
|
|
|
|
I need to add items (it's not only TabControl problem, e.g. ComboBox have same behaviour) when control's handel is created and I didn't find other event to achieve this
|
|
|
|
|
Hello,
I just tested something really dirty. (So if you are not over 18 please close this thread )
If you start a Forms.Timer at the HandleCreated, and add the tabpage in the tick event, it works!
All the best,
Martin
|
|
|
|
|
That's solution that I'm now using but it's "disgusting"
|
|
|
|
|
Yep!
But it's a solution and allways better then a redesign of your project just to avoid this workaround.
And who knows, maybe on a sunny day, you wake up and a newsletter on CP tells you that there is a solution for this bug released by MS.
But that's only the way I would think of it!
All the best,
Martin
|
|
|
|
|
This actually seems to be a bug in the tab control. The handle is only created once, but there seems to be an issue with adding a tab page here where it appears that 2 tab pages are being created (in reality they aren't - only one is created). Check the tabControl1.TabPages.Count property to see how many there really are.
The solution is that you should add the first tab page outside of the event.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O`Hanlon wrote: This actually seems to be a bug in the tab control.
Unfortunately, that problem is not only with TabControl (e.g. ComboBox has same behaviour - when adding items to Items collection).
It's Control class problem?
Where's the right place to add "items"?
-- modified at 8:25 Monday 16th April, 2007
|
|
|
|
|
I suppose I should have said that it was anything that derived from the Control class.
The right place to add items is outside this event. For instance, if you have InitializeComponent, you could create it immediately after the call to InitializeComponent(). If you are using the VS designer, it will create the page inside InitializeComponent.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thanks for reply.
But I would like to know what's the reason of this problem. Why I can't add items in HandleCreated event? What's wrong?
I need to add items after control's handel is created so what is the other way?
|
|
|
|
|
You'd really have to ask MS why you can't do this. It's either a bug or by-design feature.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
And what does it mean "ask MS"? MSDN forum? I tried it there, but with no result...
Thanks
|
|
|
|
|
Ask MS means ask Microsoft employees. I can't read their minds, so I don't know why they have it adding 2 entries instead of 1. I don't work for MS, and I don't have access to their source.
Deja View - the feeling that you've seen this post before.
|
|
|
|