|
Makes sense now. Very tall order and cannot really be done in a forum post. In short, you'll need code that handles rendering the various formats.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
you can help me by giving a code that handles only PDF format
Hello Friends
|
|
|
|
|
Laji59 wrote: help me by giving a code that handles only PDF format
No. I don't give out code, just suggestions on what to do.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
If you can assume that the Adobe Reader is installed on the target machine, you could use a webbrowser-control to display the pdf, if I'm not mistaken.
Michael.
|
|
|
|
|
It sounds like the OP wants to extract from PDF, and DOC files.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
You can assume that a client machine have installed Acrobat Reader or similar software and use System.Diagnostics.Process.Start(string fileName) method to launch a PDF file.
If you don't want to make such assumptions (and you should not), you can attach to the installator a light-weight PDF viewer like a Foxit Reader[^] (the best PDF viewer I've ever seen). On this[^] page you can also get a Foxit SDK which allows you to render pdfs into bitmaps and then use them in your app. Hope it helps.
Greetings - Gajatko
Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
|
|
|
|
|
Thanks a lot, gajatko
but I want to bring the content of Pdf File or Doc File to my Windows Control Like Textbox or other controls
how can I do it?
thanks away
Hello Friends
|
|
|
|
|
I wrote: On this[^] page you can also get a Foxit SDK which allows you to render pdfs into bitmaps and then use them in your app. Hope it helps.
Bitmaps can be displayed in a Form with PictureBox control
Greetings - Gajatko
Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
|
|
|
|
|
Try search about, using stream reader or writer in using system.data.io, you find will something.
|
|
|
|
|
thanks a lot, nelsonpaixao
that was a very good way for working with text file and reading & writing them
But as I siad I want to bring the content of Pdf file or Doc File to for example richTextFile
I can`t use StreamReader class for working with PDF File & Doc File
who can help me?
Please!!!
In fact I want to open PDF File in my application
Hello Friends
modified on Monday, August 4, 2008 6:06 AM
|
|
|
|
|
Laji59 wrote: I want to open PDF File in my application
You'll need to look at third party controls, perhaps.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
My code :
private void Form1_Load(object sender, EventArgs e)
{
winFormTimerLabel.Text = System.DateTime.Now.ToLongTimeString();
}
This causes the label to display the current time when the form loads. However, the time does not change.
What should I do in order to make the label display the time like a digital clock (with time running)?
|
|
|
|
|
You'll need a thread.
I suggest using a System.Timers.Timer .
|
|
|
|
|
There are digital like text/label controls out there. I suggest you do a basic search on such thing.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi Lim,
If you create a timer that ticks every 1 second, and use the code below in the tick event method:
<br />
winFormTimerLabel.Text = System.DateTime.UtcNow.TimeOfDay.Hours.ToString() + " : " + System.DateTime.UtcNow.TimeOfDay.Minutes.ToString()<br />
+ " : " + System.DateTime.UtcNow.TimeOfDay.Seconds.ToString());<br />
I'd imagine it will do what you want.
Cheers,
|
|
|
|
|
System.DateTime.Now.ToString ( "HH:mm:ss" )
|
|
|
|
|
Show off .
|
|
|
|
|
Ha ha! Ha ha! Mine's smaller! ... Oh, wait...
|
|
|
|
|
Thanks for your efforts guys.
In the end this is what I did.
private Timer Clock = new Timer();//create a timer
void Clock_Tick(object sender, EventArgs e)
{
//refresh the time every 1 second
this.winFormTimerLabel.Text = DateTime.Now.ToLongTimeString();
}
private void Form1_Load(object sender, EventArgs e)
{
Clock.Interval = 1000;//every 1 second do something
//what the program is supposed to do when 1 second elasped
Clock.Tick += new EventHandler(Clock_Tick);
Clock.Start();//starts the timer
}
I finally understood where did I went wrong - I did not put in the interval value and I did not start the timer..... silly me
|
|
|
|
|
|
keep the code above, just add a timer object!!! edit event tick, and interval propriety.
This will trigger your above code all the time!!! The timer will be refreshed.
|
|
|
|
|
Hey
I want to execute a code when the dataset position change ,,
thanks,
jooooo
|
|
|
|
|
Have you ever heard of event handlers? You might want to see if there is one that gets triggered when the dataset position changes.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi, i got a access database which i want to use it for my C# application.
I created a new database connection using the Server Explorer -> Data Connections -> Add Connection, then browse for my database file and test connection. Connection Succeded.
I then right click my project -> Add -> New Item -> Dataset. Then i draw all my tables thru the server explorer into the Dataset.
I have 1 table called Staff. I right click the staffTableAdapter -> Add new Query.
SELECT nric, name, [password], dob, address, tel_mobile, tel_home, catalogueAccess, inventoryAccess, orderAccess, adminAccess, staffAccess FROM staff where nric = ? and password = ?
then I name my method name as "ValidateUser".
problem : inside my LoginForm.cs. For the method
private void btnLogin_Click(object sender, EventArgs e)
{
}
What do i code inside here to call my TableAdaptable method "Validate User"
modified on Saturday, August 2, 2008 1:16 PM
|
|
|
|
|
benjamin yap wrote: What do i code inside here to call my TableAdaptable method "Validate User"
Depends. first, you instantiate an instance of the staffTableAdapter , then pass the appropriate parameters to your method. Hard to tell without seeing everything as a whole.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|