|
The OP has really cheered up my day. Finally post that literally doesn't have a question, or even an attempt at one. Not even an "itz urgentz plz help" plea. Almost zen-like in depth-through-simplicity.
|
|
|
|
|
|
Seriously, click edit and add a question, we can't help if we don't know what the problem is.
|
|
|
|
|
|
|
Take a look at the AForge.Net framework, it has a component for this kind of algorithms:
AForge.NET Framework
This is the namespace you might be interested in:
•AForge.Genetic - evolution programming library;
|
|
|
|
|
I'm trying to open openoffice/Libreoffice impress(simpress.exe) in my C# windows form.
But it opens in its own window and there is no data on form.
I want to integrate it in my form.
This is my code:
ProcessStartInfo proc = new ProcessStartInfo();
proc.FileName = @"C:\Program Files\LibreOffice 4.0\program\simpress.exe";
proc.UseShellExecute = true;
var process = Process.Start(proc);
Thread.Sleep(2000);
SetParent(process.MainWindowHandle, this.Handle);
It open Libreoffice impress but not in my form.
How can I integrate it with my form?
Thanks!
|
|
|
|
|
toms from newdelhi wrote: It open Libreoffice impress but not in my form. That is what the Process.Start method is designed for. I do not know if it is possible to open this within your form. You need to study the openoffice SDK to see what features it supports.
Use the best guess
|
|
|
|
|
toms from newdelhi wrote: It open Libreoffice impress but not in my form.
How can I integrate it with my form?
Because LibreOffice is still loading and building it's form when you call SetParent . Try to WaitForInputIdle[^] before changing the parent.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I used it but its not working.
I used process.WaitForInputIdle() but getting the same result.
Thanks!
|
|
|
|
|
I have no idea how you can integrate it with your forms. You cannot use Process.Start to integrate any form with you custom form. Try to find any Library control like OCX control so that they can be integrated with your forms. But try this one [^]. I hope this will help you.
First and the Foremost: FIGHT TO WIN
|
|
|
|
|
Actually, you can. It takes a fair bit of interop work, but it is possible. Basically, you reparent the application into yours.
|
|
|
|
|
I thought that COM automation is used for these jobs. OpenOffice would/should have registered a COM automation object for external applications to call the automation server (dll).
www.oooforum.org/forum/viewtopic.phtml?t=9815
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
|
|
|
|
|
You could do it this way, but you can also reparent other application windows.
|
|
|
|
|
OK, this is new to me.
I'll go and take a look.
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
|
|
|
|
|
Actually I'm trying to integrate OpenOffice/LibreOffice in my C# windows form program.
But I'm getting bootstrap error.
So I thought to do it in this way.
Is it not possible to integrate it in C# program.
Do anyone having any idea of doing it?
Please suggest.
|
|
|
|
|
This seems to fit your problem even though it's MSOffice in the examples.
officeautomationcsharp.php
& this fits in too.
Hosting-EXE-Applications-in-a-WinForm
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
modified 18-Mar-13 11:14am.
|
|
|
|
|
Check out referring Embedded Open Office assembly.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
hi can you help me about my problem regarding this C# program. I try to update but this error always show. what is the meaning of Syntax error in UPDATE statement: ? thank you so much. your reply will highly appreciated.
|
|
|
|
|
Sounds like a database question, not a C# question.
What error?
|
|
|
|
|
It means that your UPDATE statement is not correct in some way, but unless you show us the actual details we cannot guess what the problem may be.
Use the best guess
|
|
|
|
|
As Richard says, without your actual code and the UPDATE command istelf, we can't tell you exactly what the problem is.
An SQL update statement is similar to this:
UPDATE <table_name> SET <field>=<new value>,<field... WHERE <field>=<value> So an example would be:
UPDATE myTable SET UserName='kruczynski123' WHERE UserID=9738136 So, check you have each section of it, or very similar, and check you have quotes where you need them. If you are using C# (and I assume you are) then try using Parametrized queries - they may help you (and you should use them anyway to prevent an SQL Injection attack accidentally of deliberately destroying your database). This may help:
using (SqlConnection con = new SqlConnection(strConnect))
{
con.Open();
using (SqlCommand com = new SqlCommand("UPDATE myTable SET myColumn1=@C1, myColumn2=@C2 WHERE Id=@ID", con))
{
com.Parameters.AddWithValue("@ID", id);
com.Parameters.AddWithValue("@C1", myValueForColumn1);
com.Parameters.AddWithValue("@C2", myValueForColumn2);
com.ExecuteNonQuery();
}
}
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
Or it could be
UPDATE <table_name> SET <field>=<new value>,<field... FROM ...
|
|
|
|
|
Error in update query? Check if the parameters you are passing into the query are all correct and in the right format.
|
|
|
|
|
How to connect two forms in a C# project in a way that in a button click event to the other form from form1, the form1 must be closed the moment the form2 is diaplayed on the screen
|
|
|
|