|
Thanks friends for your valuable replies. The main problem is solved of launching the slideshow of .ppt files.. with the help of this code
<br />
Microsoft.Office.Interop.PowerPoint.Application ppApp = new Microsoft.Office.Interop.PowerPoint.Application();<br />
ppApp.Visible = MsoTriState.msoTrue;<br />
Presentations ppPresens = ppApp.Presentations;<br />
Presentation objPres = ppPresens.Open(e.FullPath, MsoTriState.msoFalse, MsoTriState.msoTrue, MsoTriState.msoTrue);<br />
Slides objSlides = objPres.Slides;<br />
Microsoft.Office.Interop.PowerPoint.SlideShowWindows objSSWs;<br />
Microsoft.Office.Interop.PowerPoint.SlideShowSettings objSSS;<br />
<br />
objSSS = objPres.SlideShowSettings;<br />
<br />
objSSS.Run();<br />
objSSWs = ppApp.SlideShowWindows;<br />
while (objSSWs.Count >= 1) System.Threading.Thread.Sleep(100);<br />
<br />
objPres.Close();<br />
ppApp.Quit();<br />
Now I want to close all the running powerpoint files and only want to run the current one only...
Does any body have any idea?
|
|
|
|
|
First off having urgent in your subject line is really irritating and almost made me not answer however...
Why not close or kill off powerpoint and then restart it when you detect the file using filewatcher. That way you will only have your powerpoint open and it will display.
|
|
|
|
|
Thanks for ur compliment...
Actually I had implemented the things that u have suggested now...
but my requirement is a bit different.
I want to close the powerpoint presentations in the specifiec folder only and not all the powerpoint presentations.....
That's the reason i need some technical help for acheivning this...
Thanks,
|
|
|
|
|
Like I told you before, it's probably not possible.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I have some Doc files that I need to read content of each of them and write them into a for example textBox or richTextBox.
How can I do it ?
Thanks in advace
Hello Friends
|
|
|
|
|
Google broken where you live ? You need Word installed and you need to control Word through C#, there's a Microsoft Office Toolkot or something for doing that.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
salam
i think u have to use a openfiledialog, select the file and do like this
myrichtextbox.Loadfile(myopenfiledialog.selectedfile,RichTextBoxStreamType.RichText)
i think this ll solve ur problem
|
|
|
|
|
This is totally, utterly incorrect. An rtf and a doc are two different things.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
It didn`t solve my problem
RTF and DOC are tow different type
Hello Friends
|
|
|
|
|
Hi,
Could anyone help me to get the best of C# opensource SMTP form below list.
1. C# Email Server (CSES)
2. DotNetOpenMail
3. NMail
Thanks in Advance
modified on Thursday, December 11, 2008 2:07 AM
|
|
|
|
|
I'm trying to create a website with youtube APIs using C# 2008 (.NET), Being a beginner and getting my feet wet with this, I wonder if anyone can give me some tips n tricks, or possibly an example code/ step by step instructions on doing this.
I've read the 'Developers Guide: .NET' on the code.google.com site and it's like trying to learn french through the internet if you know what I mean. I have made sites before but exclusively with html and css.
Main Questions:
1.What exactly do I write the C# language in? (Im using C# 2008 however how exactly do I put this on my webpage???)
2.I would loove to see a FULL snippet(s) on an actual page with youtube APIs (or any APIs for that matter, since I have not found anything with FULL code start to finish) that I can copy and paste into whatever it is I put the C# language in and try to view it on my webpage and modify it from there.
3. The Developers guide gives this:
The following code retrieves a YouTubeEntry corresponding to a video on YouTube
String videoEntryUrl = "http://gdata.youtube.com/feeds/api/videos/ADos_xW4_J0";
YouTubeEntry videoEntry = (YouTubeEntry) service.Get(videoEntryUrl);
Console.WriteLine("Title: " + videoEntry.Title.Text);
Console.WriteLine(videoEntry.Media.Description.Value);
I would like to know WHERE DO I PUT THIS CODE??
I am a person that learns very well visually, so pictures/code snippets/ illustrations are better than words, unless they're instructions of course. I guess you can understand the urgency of knowing this for me, thanks alot for all help
I'm sure one developer can help another developer
Thanks
-Alex-
|
|
|
|
|
bmx4637 wrote: .What exactly do I write the C# language in?
You should download the Web Developer Express Edition, it helps you create ASP.NET sites.
bmx4637 wrote: I would loove to see a FULL snippet(s) on an actual page with youtube APIs (or any APIs for that matter, since I have not found anything with FULL code start to finish) that I can copy and paste into whatever it is I put the C# language in and try to view it on my webpage and modify it from there.
bmx4637 wrote: I would loove to see a FULL snippet(s) on an actual page with youtube APIs
A youtube video is just going to be embedded HTML, they would just have a control you use, I assume.
bmx4637 wrote: I would like to know WHERE DO I PUT THIS CODE??
Well, I am not sure you know anything about ASP.NET at this point. Console.WriteLine won't help you, unless this program just emits HTML that you then embed in your aspx of your page.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
If you would like to learn asp.net and c#, then I would advice this book:
Beginning ASP.NET 3.5 in C# 2008: From Novice to Professional
Welcome to the world of C#
Prateek
|
|
|
|
|
thanks
|
|
|
|
|
For future,
please do not repost your question.
Prateek
|
|
|
|
|
I want to read/parse the tablular data from a pdf documents. I have found some third party softwares which can covert the entire pdf to text preserving the layout(display). But none of the tools provide pre-defined seperators/delimiters between the text of each cell.
I has also investigated for some tools which can covert this pdf to html which can then be parsed. But even in the html files the entire table is represented by absolute positioned divs. It would've been easy to parse tables from HTML.
Is there any way I can read the tables from pdf document in some object(which can be easily represented in terms of rows and columns)? Or is there any third party developer library using which I can easily read the cells of a table in pdf?
Please let me know even if there is some third party software to convert the pdf containg to html document representing tabular data in html tables
Thanks in anticipation.
|
|
|
|
|
I'm trying to call a function in a third party dll. the SDK defines the function like this:
long GetConnectStatus (
VARIANT * varState,
VARIANT * varError,
VARIANT * varBytesIn,
VARIANT * varBytesOut,
VARIANT * varDuration
)
and further clarifies the first 4 arguments as Variant long (VT_I4) and the last as Variant string (VT_BSTR)
C# wants:
int iPhoenix.GetConnectionStatus(ref object varState, ref object varError, ref object varBytesIn, ref object varBytesOut, ref object varDuration)
i have this:
Int32 cs = 0;
Object objConState = (object)cs;
Int32 se = 0;
Object objServerError = (object)se;
Int32 bi = 0;
Object objBytesIn = (object)bi;
Int32 bo = 0;
Object objBytesOut = (object)bo;
string du = "";
Object objDuration = (object)du;
phx.GetConnectStatus(ref objConState, ref objServerError, ref objBytesIn, ref objBytesOut, ref objDuration);
It doesn't work!?
|
|
|
|
|
Hi all, I need some help on this item that I've been working on all day. I'm trying to extract text from a word document and save the data to an Oracle database while retaining the text formatting (Bold, underlines ect). The text is within word tables in the document so I'm accessing the text by interating through the table cells and getting the text as follows; oWordTable.Range.Cells[iRowIndex].Range.Text.ToString(). This works to get the text but I lose the text formatting. I've converted the doc to rtf and have the same results.
Is there a way to extract rtf from a specific Table Cell?
Thanks in advance, any advise is much appreciated.
blochri
|
|
|
|
|
blochri wrote: oWordTable.Range.Cells[iRowIndex].Range.Text.ToString().
This really irks me. The Text property is already a String, so calling ToString on a String is pretty pointless.
Your getting the Text of the document using the Text property. You don't automatically get RTF coded text when you use the Text property. Even if it was an RTF document, you have to get the RichText, not the Text.
Also, RTF does not support all the formatting capability of Word. If, in Word, you save the document as an RTF document and lose the formatting, chances are really good that RTF doesn't support what you're trying to get.
|
|
|
|
|
Thanks Dave, Yes, I need to get the Rich Text from a cell in a word table, but I can't figure out how to get the Rich Text, do you know how to do this?
|
|
|
|
|
OKm unless I'm missing something in the description of this document, there is no rich text to get from it. Internally, in Word, there is no rich text representation of a document. The only time Word works with rich text is when you save a document and the save filter builds the rich text file.
|
|
|
|
|
OK, thanks again Dave for your thoughts on this issue. I'm trying another approach or selecting and saving the rich text via the clipboard and a Rich TExt Box, we'll see how that goes.
Thanks again
Bill
|
|
|
|
|
Hi Everyone
I'm new to ASP.NET and am having trouble with my project. I am building it using Visual Web Developer 2008 Express. Language C#.
I have a gridview linked to a LinqDataSource. I want to add a search facility to the gridview as the database that is linked to it contains a lot of entries.
I downloaded the code from your site for the control to do this and altered everything to meet my specifications. Everything seems to work except that the gridview still remains the same with the original entries showing instead of showing the filtered entries.
The gridview shows four columns from the database table.
Hope someone out there can she some light on this as I'm pulling my hair out.
Thanx in anticipation
Andy
My code behind code is this:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
public partial class Controls_PinsSearch : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void lbtnBasicSearch_Click(object sender, EventArgs e)
{
string sSearchText = GetBasicSearchString();
OnSearch(sSearchText);
lbtnCancelBasicSearch.Visible = true;
}
protected string GetBasicSearchString()
{
StringBuilder sb = new StringBuilder(string.Empty);
string sBasicSearchText = txtBasicSearch.Text.Trim();
if (sBasicSearchText == string.Empty)
return string.Empty;
string sFirstName = GetSearchFormattedFieldString("FirstName", sBasicSearchText, string.Empty, true);
sb.Append(sFirstName);
sb.Append(" OR ");
string sLastName = GetSearchFormattedFieldString("LastName", sBasicSearchText, string.Empty, true);
sb.Append(sLastName);
sb.Append(" OR ");
string sPinCode = GetSearchFormattedFieldString("PinCode", sBasicSearchText, string.Empty, true);
sb.Append(sPinCode);
sb.Append(" OR ");
string sFilter = GetSearchFormattedFieldString("Filter", sBasicSearchText, string.Empty, true);
sb.Append(sFilter);
sb.Append(" OR ");
string sSearch = sb.ToString();
return sSearch;
}
protected string GetSearchFormattedFieldString(string sfield, string value, string soperator, bool bForceStringType)
{
if (value.Trim() == string.Empty)
return string.Empty;
string _newValue = value.Trim();
string _operator = "=";
if (soperator != string.Empty)
_operator = soperator;
if (bForceStringType == false)
{
}
return _newValue;
}
public delegate void SearchEventHandler(string _SearchText);
public event SearchEventHandler Search;
protected virtual void OnSearch(string _SearchText)
{
if (Search != null)
{
Search(_SearchText);
}
}
protected void lbtnCancelBasicSearch_Click(object sender, EventArgs e)
{
txtBasicSearch.Text = string.Empty;
OnSearch(string.Empty);
lbtnCancelBasicSearch.Visible = false;
}
}
The markup code for the control is:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="PinsSearch.ascx.cs" Inherits="Controls_PinsSearch" %>
<asp:Panel ID="pnlBasicSearch" runat="server" Width="100%">
<table>
<tr>
<td>
<asp:Label ID="lblBasicSearch" runat="server" Text="Search for:" ></asp:Label>
</td>
<td>
<asp:TextBox ID="txtBasicSearch" runat="server" Text="" MaxLength="50" Width="255px" />
</td>
<td>
<asp:LinkButton runat="server" ID="lbtnBasicSearch" CausesValidation="False" Text="Search" OnClick="lbtnBasicSearch_Click" />
</td>
<td>
<asp:LinkButton runat="server" ID="lbtnCancelBasicSearch" CausesValidation="False" Visible="false" Text="Cancel" OnClick="lbtnCancelBasicSearch_Click" />
</td>
</tr>
<tr>
<td colspan="2" align="right">
</td>
<td colspan="2"></td>
</tr>
</table>
</asp:Panel>
|
|
|
|
|
Don't crosspost.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|