|
Code:
this.axFraCtrlShowPPT.Open("e:\\1.ppt",true,"PowerPoint.Show",null,null);
this.axFraCtrlShowPPT.PPTPlay();
I want to open a ppt in the axFrameControl,and play the ppt after opening it,but it encoutered an error when it was playing ppt.
Can you give me the correct answer?
modified 23-Jan-13 4:06am.
|
|
|
|
|
If you would bother to use Google for 30 seconds you could have found this:
The DSOFramer control is for demo purpose, we did not provide support for it.
NOTE: This sample is provided "AS IS" with no warranty or support from Microsoft. It is a demonstration, provided for informational purposes only, and has not been rigorously tested with all environments and ActiveX document servers. It is up to you to make it "production ready" if you use it in any development solution.
Visual C++ ActiveX Control for hosting Office documents in Visual Basic or HTML
http:
If you still have any concern, please feel free to post here.
|
|
|
|
|
Hi All, I've seen the reading of text from and writing of text to a file using C# StreamReader and StreamWriter. Also the file created is of type text. I was wondering if I can create various file types like CSS, HTML, JavaScript, etc simply by giving each file name an appropriate extension it requires. I don't have visual studio on hand so I can not test my idea. Thank you in advance for your reply.
modified 22-Jan-13 23:54pm.
|
|
|
|
|
|
You can create almost any type of file using StreamReader and StreamWriter .
|
|
|
|
|
Giving the file a valid extension will create that file. But the real question would be contents of the file. If you put valid html in a .html file than it is all fine but the moment you go ahead and start creating .exe files you will have to think how valid it is since you can not put a valid binary data in it.
So the answer to your question is yes but be careful about the file type you create.
Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore, Dream. Discover.
|
|
|
|
|
You can use a StreamWriter to create any type of file - you are not limited to text:
using (StreamWriter writer = new StreamWriter(@"D:\Temp\MyFile.html"))
{
writer.Write(textToAdd);
} Will work fine, and will create a file with the HTML extension. However, that doesn't mean that the file will be readable by a web browser if you double click it - it depends on the content. Similarly, if you use a file name with a .DLL extension, it will be created, but it won;t work if you try to add it as a reference unless you write suitable content into it, or .AVI but it won't show a movie.
The extension just controls which application(s) will try to open the file - the content must also be correct and applicable to the application. You can open a .DLL file in VLC Media player provided the content is a video file and not an executable program!
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.
|
|
|
|
|
In a C# 2010 desktop application, I need to add an audit table to an application that would be similar to the 'main' table. Basically whenever anyting is changed in the 'main' table I need to show the corresponding change in the 'audit' table. The 'audit' table will be a mirror copy of the 'main' table. The only difference is one table is called 'main' table and the other table is called the 'audit' table.
**Note these table reside in a sql server 2008 r2 database.
Would you setup a trigger? If so, can you show me the sql you would use?
Would you write C#.net 2010 code? If so, can you show me the code that would solve my problem?
|
|
|
|
|
This is not an audit strategy if your audit table is identical to your main table what use is that for audit purposes! It may be a bckup but it is not and audit table
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
A better solution might be to have versioning of rows in the main table (and no "audit" table).
|
|
|
|
|
You mentioned the following;
"A better solution might be to have versioning of rows in the main table (and no "audit" table)".
I do not know what you mean by this statement. Can you explain to me what you me and/or show me some code so I can understand what you mean?
|
|
|
|
|
Let's say you have a table containing customer orders. An order has an ID, a status, and a number of other things including creation date and user. As the order is processed, the status will change and you want to be able to report each status change.
Rather than having one row and overwriting the previous values, you can create a new row with the new values.
RowID,PreviousID,NextID,OrderID,CreateDate,CreateUser,Status,...
1,null,2,12345,2013-01-02,Alice,New,...
2,1,3,12345,2013-01-04,Bob,Filled,...
3,2,4,12345,2013-01-06,Carol,Shipped,...
4,3,null,12345,2013-01-10,Ted,Received,...
In this way you can easily see the details of an order's life all in one table. When a new state is created, the only change you make to the previous state is to set the NextID field. And the current record is the one with NextID==null.
|
|
|
|
|
Welcome. I am writing a program to count, which is connected to the database. I added a TabControl control where I want to put different tables in MySQL. I'm trying to drag the tables on the form. However, generating a first BindingNavigator. Even if you copy and set another table in the properties, the latter copied navigator does not work ... Can it do it somehow set to BindingNavigator work for each table?
|
|
|
|
|
Please, please get a book on c# programming, work through the examples and get at least a basic understanding of what you are doing. It sounds like you have just downloaded VS and started fiddling around based on an example or 2 you found on the interweb.
Do some study, get at least a basic grounding in what you are trying to do and start again!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
nice answer... this is program for count. And count will be tommorow so i don't have a lot of time for searching in books because i,m asking here
|
|
|
|
|
I have the following problem.
If I run an exe file clicking on it it works, while if i call it using
ProcessStartInfo start= new ProcessStartInfo();
start.FileName= "myfile.exe";
Process p = new Process();
p.StartInfo = start;
p.Start();
p.WaitForExit();
it returns the following error:
IErrorInfo.GetDescription failed with E_FAIL(0x80004005)
The exe file runs a query on an excel file
Have you got an idea?
|
|
|
|
|
Probably a dumb question, but is the path correct? In other words, is what you have at start.FileName correct? Can the file be found? If not, is the exe actually loading but is, itself, unable to find its target?
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
yes the path is correct...I add some details:
Basically from assembly main.exe I call myquery.exe.
It returns the error:
IErrorInfo.GetDescription failed with E_FAIL(0x80004005)during myquery.exe execution (myquery.exe starts, so the path is ok, but after some line of code, it stops during a LINQ query on en excel file).
The strange thing is that if I run myquery.exe directly, everything work fine (the query is ok)
Is it possible something linked to db connection, called not directly??
|
|
|
|
|
Sounds like you need to add some error handling and logging to the exe.
|
|
|
|
|
How are you accessing Excel? I use OleDb to access Excel.
|
|
|
|
|
Sounds like a problem in myfile.exe
|
|
|
|
|
You should give the full path of the exe file.
|
|
|
|
|
yes the path is correct...I add some details:
Basically from assembly main.exe I call myquery.exe.
It returns the error:
IErrorInfo.GetDescription failed with E_FAIL(0x80004005)during myquery.exe execution (myquery.exe starts, so the path is ok, but after some line of code, it stops during a LINQ query on en excel file).
The strange thing is that if I run myquery.exe directly, everything work fine (the query is ok)
Is it possible something linked to db connection, called not directly??
|
|
|
|
|
have you tried to debug your application? since you said the error is while executing LINQ query on a excel file. was the file is located in the right folder the application is referring? can you log the full exception stack so that we may able to find the reason for the error.
Jibesh V P
|
|
|
|
|
you get the point.. the file is in the myquery.exe base directory.
From my main project main.exe is possible to include a path for searcing the excel file?
Basically in myquery.exe I'm opening the file using no path reference. But I can't change myquery.exe
I should include the path (in relative reference) in main.exe. I tried in Proprierties-ReferencePath but here is not possible tu include relative path (I'm not able)
My be in pre event command line?
|
|
|
|