|
Hello,
I am new to .Net and wanted to know if dot Net has a somethig similar to or API for creating and managing Compound documents. Actually i want to port an application that makes extensive use of Compound Files to .Net. So is there any equivalent of Compound Files in .Net ???
Omar Alvi
|
|
|
|
|
As in compound documents that implement COM interfaces? No. You have to declare the necessary COM interfaces with the proper GUIDs (using the GuidAttribute ) and declare them as IUnknown , IDispatch , or dual interfaces using the InterfaceTypeAttribute . Make sure the methods and properties are in the same VTBL order for IUnknown and dual interfaces, and that you use the DispIdAttribute to declare the proper DISPID for IDispatch and dual interfaces.
A couple are already defined in System.Runtime.InteropServices , such as UCOMIPersistFile , but other interfaces like IPersistStream are not.
If you mean "compound documents" are self-serializing documents, then you can use runtime serialization. See Serializing Objects[^] in the .NET Framework SDK for more information and examples. These types of files are not like COM compound documents, however.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi,
I would like to have dynamic help feature in my application as we can see in .net framework.
I would appreciate any links & help.
Ravindra
|
|
|
|
|
You should start by reading the documentation for the help classes provided in the .NET BCL (base class library):For information on how to create HTML Help files (CHMs), I recommend you do a search on "HTML Help" using google or something. There's a lot of information about HTML Help on the web.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi,
Thanks for your reply. I have an application which has framework as we can see in .net framework,if u r aware of it.We have dynamic help feature in .net ie.,This window provides links to topics that are specific to the current area you are using or task you are trying to complete within the IDE.
I have images as controls in my application I would like to have the same hynamic help feature in my application.
|
|
|
|
|
I'm sorry, but I'm really having problems trying to understand what you're asking.
If you are writing code for use in VS.NET and want to display dynamic help like VS.NET currently does, I suggest you download and read the Visual Studio .NET Help Integration Kit (VSHIK)[^].
If you want to have functionality like dynamic help in your application, you should read the link I posted before about HTML Help. With that and many sources available throughout the web, you should be able to develop something. The classes I mentioned will be of very little help, though. You'll need to host the WebBrowser control (and there's many articles about how to do that on this site, but the easiest way is to customize your toolbox in VS.NET, click on the COM tab, and select the Microsoft Web Browser from the list). You could simply pass it URLs like mk:@MSITStore:C:\Program Files\My Company\My Application\Help.chm::/index.htm (as an example), since Internet Explorer (rather, the URL moniker) recognizes the mk: protocol. How you associate UI elements and what not with URLs is up to you, but reading ablyt HTML Help will help you understand how to do this the "right way", which is when you use the information already in the CHM to associate elements with help topics.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Thanks for your valuable information Mr. Heath.
I have developed a help application using htmlworkshop tool & using helpprovider as an interface I have integrated this into my application.
Using help class I developed one more form,dynamic form, where we can provide interface to the help application using help navigator & some of the methods in it.
But now to make it dynamic ie, when the focus is on some particular control,the information regarding that particular control need to be displayed in the dynamic help form.Ie, information need to be changed dynamically in the form depending on the focus of the control.
The info. in dynamic form should have link & through link we should be able to get the details regarding it through help application.
What is the best way to do it.
Waiting for your reply,
Ravindra
|
|
|
|
|
One way would be to store the context in the Tag property (like the help topic filename or some key) and hook-up the GotFocus event of each Control you want dynamic help displayed for to the same event handler. In that event handler, cast the first parameter (typically called sender , but the param name doesn't matter) to a Control , then use it's Tag property to display the help file you want.
There's many other ways, but this way would probably be easiest.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I want to display text in a certain font, but I don't know how..
how can I do it?
and another thing - if I want to include a font that isn't on the user's machine, how is it done?
thanks
|
|
|
|
|
If you type "Font" into your Managed DirectX 9.0 help (which you should've installed), you'll have all the information you should need if you read the rest of the documentation. Alternatively, pick up a book on Managed DirectX 9.0 like Managed DirectX 9 Kick Start: Graphics and Game Programming[^].
This allows you to use the System.Drawing.Font class provided in the .NET BCL. You can keep a collection of private fonts (those not installed on a system) by distributing the fonts with your application (or embed them as manifest resources and extract them before proceeding) and use the PrivateFontCollection class to add them to the font collection (along with installed fonts, which is encapsulated in the InstalledFontCollection ).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Recently i come accross forums, or websites, claiming people are losing there job related to C# experiences, and saying that C# wont exist for much longer? one post is located at http://www.mail-archive.com/c_sharp@p2p.wrox.com/msg02322.html[^]
I HOPE this is CERTINALY NOT TRUE, i just started learning C#, and i obsolutely LOVE its language, its much better than C++, and more reliable
|
|
|
|
|
C# is at the core of Microsoft's .NET strategy. I don't see it failing.
What you are reading is a Sun zealots FUD. Just look at his sig.
Michael
CP Blog [^]
|
|
|
|
|
Michael is right. Just some Sun zealot trying to spread FEAR (False Evidence Appearing Real)
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
The Second EuroCPian Event will be in Brussels on the 4th of September
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
|
|
|
|
|
Gary Busey! Do you know the FRIENDS one? I loved that show...
/\ |_ E X E GG
|
|
|
|
|
What are you talking about?
Who is "Gary Busey"?
The FRIENDS one what?
I'm so confused...
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
The Second EuroCPian Event will be in Brussels on the 4th of September
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
|
|
|
|
|
Hi everyone,
I was wondering if it is possible to disable addition of new rows when using the DataGrid control? The only possible way I found is to set the AllowNew property of the DataView to false, but this only works when the DataGrid is data bound to this instance of DataView.
My problem is that I'm using the same instance of DataGrid with several table styles to edit several tables of a DataSet, and the user is allowed to navigate among them using the relations of this DataSet. But this way, I'm unable to achieve this.
I have tried setting the DefaultView.AllowNew=false for the table that shouldn't allow new rows, but the DataGrid will probably use another instance of the DataView, so this doesn't work.
I guess that the only solution would be to use the Navigate event of the DataView and get the instance of the DataView that DataGrid is using, but I just don't know if this is the way, and how to get that damn DataView instance.
Thanks for any clues in advance!
Rado
Radoslav Bielik
http://www.neomyz.com/poll [^] - Get your own web poll
|
|
|
|
|
I have it! I've been trying to make it work since Friday, and finally found what I've been doing wrong. This code in the Navigate event handler will do the trick:
private void dataGridModules_Navigate(object sender, System.Windows.Forms.NavigateEventArgs ne)
{
if(this.dataGridModules.DataMember.IndexOf("name-of-the-table")!=-1)
{
CurrencyManager cm=(CurrencyManager)
this.dataGridModules.BindingContext
[this.dataGridModules.DataSource,
this.dataGridModules.DataMember];
((DataView)cm.List).AllowNew=false;
}
}
My problem was that I was using only the name of the table for the BindingContext indexer, when I replaced it with this.dataGridModules.DataMember it started to work .
Rado
Radoslav Bielik
http://www.neomyz.com/poll [^] - Get your own web poll
|
|
|
|
|
Hy everyone!
I know I already posted a lot of questions. I hope I did not anoy anyone of you, but I am very new to C#, trying to get along with my C/C++ knowledge, but C# is different in some ways. I also do have the MSDN to look up some things, but I don't know why, because if I do not know for sure what to look for (a class e.g.) then I feel lost in there .....
On the otherhand I should have finished a special task (a programm) at the end of August ....
Well but back to my question:
I do want to assign a field of an array of strings to a TextBox (the TextBox is called lTextBox in there and the field I want to assign is called ltemparray[1]).
The relevant code looks like this.
......
// definition
TextBox lTextBox = sender_txtNameKeyDragDrop as TextBox;
....
// part of the ContextMenu definition
menuItem1.Index=0;
menuItem1.Text=ltemparray[1].ToString();
menuItem1.Click += new System.EventHandler(this.menuItem1_Click);
.....
// display contextmenu for the TextBox
ctNameKeyMenu.Show(lTextBox, lTextBox.PointToClient(Cursor.Position));
.....
private void menuItem1_Click(object sender_menuItem1Click, System.EventArgs e_menuI1C)
{
// assign data to TextBox in here
}
But the problem is: how do I get the TextBox. Well I do think I have to adress it via the parent, but I am not quit sure.
So if anyone of you could tell me what the lines of code to assign the string in the arrayelemnt to the TextBox (in the Click event) has to look like, it would help me a lot.
And besides I guess I would learn a lot!
Thanks!
Stephan.
|
|
|
|
|
Hy everyone!
I just did it!
But well, it's not perfect because at the moment I do use a global variable.
If someone of you knew a better solution please let me know.
My solution:
TextBox gsenderdst;<br />
......<br />
<br />
TextBox lTextBox = sender_txtNameKeyDragDrop as TextBox;<br />
....<br />
gsenderdst=lTextBox;<br />
menuItem1.Index=0;<br />
menuItem1.Text=ltemparray[1].ToString();<br />
menuItem1.Click += new System.EventHandler(this.menuItem1_Click);<br />
.....<br />
ctNameKeyMenu.Show(lTextBox, lTextBox.PointToClient(Cursor.Position));<br />
<br />
.....<br />
<br />
private void menuItem1_Click(object sender_menuItem1Click, System.EventArgs e_menuI1C)<br />
{<br />
MenuItem lsender=sender_menuItemClick as MenuItem;<br />
gsenderdst.Text=lsender.Text;<br />
}
Well as I said before I used a global variable and to me it doesn't look nice this way, but well, it works and that's what counts.
So if anyone of you knows a better solution (e.g. without the global) then please let me know!
Stephan.
|
|
|
|
|
Hello,
I am jayasree. I am working on speech processing device interface. I have a doubt in that. As i couldn't find relevant topic to post in in that, i have chosen this.
Presently I am taking data from waveIn device and looping it back to the waveOut device in the sound card. Now I am working on mixer interface. My doubt is is it possible to use LINE pin of the sound card. means is it possible to use as another destination when i am using both waveIn and waveOut devices. Or i have to bypass and use the same one.
As presently I am working on this, I need info about this very urgently.
jaya
|
|
|
|
|
Hi Gurus!
I writting some kind of Web Application and here I got a few WebForms and I need to exchange some variables between these pages. Usually when on page1 user pick up some value in Grid I wrote following code
Response.Redirect("../page1.aspx?MyVar="+textBox1.Text);
actually I just making a page redirect on itself and then in page class I defined private static string MyVar=""; and OnLoad I wrote
if(!this.IsPostBack)
{
if(Request["MyVar"]!="")
{
MyVar = Request["MyVar"];
DoSomeWork(MyVar);
}
}
So i want ot ask you is this optimal solution to store page variables? I mean maybe exists some better solution then redirect page on itself? Maybe I should use ViewState to store page variables or somth.?
xedom developers team
|
|
|
|
|
|
I would like to set up the formatting for hex to display as:
FF EE FF FD (instead of FFEEFFFD)
Also for Binary with digits in group of 8's
(i.e. 11111111 11101110 11111111 11111101)
these are to be displayed in editboxes.
Any Suggestion?
|
|
|
|
|
If I use inpout32.dll to access parallel port port on WinXP,
How can I use it in my source code?
Thanx
ahmedadel
|
|
|
|
|
hi guys,
i am new to C# programming. i want a small help. i have two tables in my sql database. suppose emp and salary.
In emp i have id,name and designation
In salary i have id and salary.
then coming to the problem i want to put up a form with 4 test boxes for id,name,designation and salary and databind.
Databinding works fine if it has only one table.(Simple Databinding)
But when i try to update both tables it gives error that id cannot take null value.
That is i want the id to be updated in both tables from a single textbox value.
Is it possible. How to go for that. This may seem simple to many. But i am new to all this, Help me.
Thanks in advance for ur help
hap
|
|
|
|