|
What exactly are you trying to code ??
Alex Korchemniy
|
|
|
|
|
Dear Alex.
I am writing a c# program.
I need to have file editor like MS word integreted with my software.
I need Editor Like RichText Editor But With MS Word capability.
Can I use MS Word API For this Perposes.
tanks.
rashidi.
|
|
|
|
|
Its possible to use the webbrowser control as an OLE container and then host Word inside of that but I recommend against it.
There are commercial components available that are fairly powerful. Some components even mimic VS.net IDE for example Syncfusion edit component. Search around on google.
Alex Korchemniy
|
|
|
|
|
I everybody !
I have a little application to manage cutomers, it works under windows. I use the .Net SDK 1.1, and Sharp Develop. My Database is in a Linux server and it is PostgreSQL 8.0. I connect to that database trough the PgSqlClient .dll (http://pgsqlclient.sourceforge.net/).
Mi big problem is that I have a field Birth Date in mi Customers table, it is Date type, and stores the birth date of each customer. When I made an sql query to the database, it sends the following exception:
"Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks. Parameter name: ticks"
I don't know if it is because of the PgSqlClient or becasue of DataSet.
But this only happens when in my table I have a record with BirthDate lower than year 2000, I mean 1999 or before, if my record has a year such like 2000 or above, it doesn't raise exception.
My query is something like:
StringQuery = "SELECT CustNumber, BirthDate, PIN, Name FROM Customers ORDER BY CustNumber";
and when I don't select the field BirthDate, it works perfect.
I have been searching in many forums about "ticks", but no solution yet. If someone could help, thanks a lot.
By now, thanks a lot for your attention, I hope you have a great day.
Note: Sorry for the little bad english :P
|
|
|
|
|
I am debugging a large C# program in VS 2003. When an unhandled exception occurs I receive the usual message box, but then when I dismiss the message box the debugger ALWAYS leaves me at the code
static void Main() <br />
{<br />
Application.Run(new MainForm());<br />
}
I am used to it leaving me at the line in the program where the exception occurred. Did I accidently change a debugger setting or something? I really would like it to leave me at the line where the error occurred.
Thanks!
Mark
|
|
|
|
|
No, this is usually what the debugger will do if an exception occurred in non-user code (for example, in unmanaged code). Look at the stack trace in Visual Studio, the last call you'll see is most likely a call into native code.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Conversation With a Muslim
Judah Himango
|
|
|
|
|
Sometimes a referenced component also have Applicatoin method eg.: Inetrop.Word
Try this:
<br />
<br />
static void Main()<br />
{<br />
System.Windows.Forms.Application.Run(new MainForm());<br />
}<br />
<br />
|
|
|
|
|
Hello
I run request (with my .NET C# application):
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);<br />
request.UserAgent = "Mozilla/4.0";<br />
...<br />
WebResponse response = request.GetResponse();
then I read the response
Stream ReceiveStream = response.GetResponseStream();<br />
...<br />
String ResponseHTML = sr.ReadToEnd();
I get a page with message 'Please activate scripting'
But when I request this page with IE - I get right (wanted) page. If I disable the property 'Run script' in browser and then request the page I receive the page 'Please activate scripting'.
How to cheat the server to get wanted page with my application?
Thanks
|
|
|
|
|
For executing cmd commands I'm using:
System.Diagnostics.Process.Start("cmd", "/c net stop messenger");
1. How to hide the popping up window from the cmd shell?
2. How to get the stream if the command executed successfully?
OpaKnack
|
|
|
|
|
To launch a process without a window:
System.Diagnostics.ProcessStartInfo info = new ProcessStartInfo("cmd", "/c net stop messenger");
info.CreateNoWindow = true;
Process process = new Process();
process.StartInfo = info;
process.Start();
To get the output stream, use process.StandardOutput, which returns a StreamReader.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Conversation With a Muslim
Judah Himango
|
|
|
|
|
Thank you very much, that will help me a lot!
The windows does still appear!
And how to get that stream?
this doesn't work:
System.Diagnostics.ProcessStartInfo info = new ProcessStartInfo("CMD.exe", "/C net stop messenger");
info.CreateNoWindow = true;
Process process = new Process();
process.StartInfo = info;
process.Start();
StreamReader s = process.StandardOutput;
MessageBox.Show(s.ReadToEnd());
|
|
|
|
|
System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo("cmd.exe", @"/c dir D:\");
info.UseShellExecute = false;
info.CreateNoWindow = true;
info.RedirectStandardOutput = true;
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo = info;
proc.Start();
StreamReader reader = proc.StandardOutput;
proc.WaitForExit();
Console.WriteLine(reader.ReadToEnd());
This works fine for me
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I know this sounds like very simple but ... I am new to .net adn i don't know how to do that.
I have a solution which includes 4 projects which was shared by other solutions (projects) too ... now I want to checkout thoes project rename i mean change namespace as current souutionname.projectname ...
any idea how do i do that .. should i just chekout .. rename as the namespace i want and then inculding in the current solution ..??
Any advice ..please
Thanks,
Ambar
|
|
|
|
|
If you want to change it only for the current sol. ,so copy these projects to another directory that is not shared by others and rename it throught this directory.
|
|
|
|
|
I know this sounds like very simple but ... I am new to .net adn i don't know how to do that.
I have a solution which includes 4 projects which was shared by other solutions (projects) too ... now I want to checkout thoes project rename i mean change namespace as current souutionname.projectname ...
any idea how do i do that .. should i just chekout .. rename as the namespace i want and then inculding in the current solution ..??
Any advice ..please
Thanks,
Ambar
|
|
|
|
|
To get to objects in other namespaces, make sure those objects/classes are in the same project as the one you're building, or if they're in a different project, add a reference to the project you want to access. Then it's just a matter of MyNamespace.SomeObject
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Conversation With a Muslim
Judah Himango
|
|
|
|
|
how can I assign the enter key on the keyboard to activate a dialog box message.Would it be assign in a resource file or???
After all, Today is the Tomorrow you worried about Yesterday
|
|
|
|
|
For a Windows Forms app, in your form class, override ProcessCmdKey and watch for a key press. When pressed, create a new Form and call ShowDialog() on it.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Conversation With a Muslim
Judah Himango
|
|
|
|
|
It is not a windows form app
I have this app (Game) I want to be able to design a caht dialog box that act as a CHAT during the game betwwen two PCs. I want it to be invoked by pressing ENTER on the keyboar the I write some chat stuff the I press ENTER agin to send the message to other PC
Ps. Your site is an intersting one
Good luck
After all, Today is the Tomorrow you worried about Yesterday
|
|
|
|
|
Try a keyboar hooker, as I remeber in CP you can find minimum 2 in C# .
|
|
|
|
|
As the other poster said, look into Windows hooks, there's an article here[^] with an example. Using hooks, you can listen for all keyboard activity on the system.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Conversation With a Muslim
Judah Himango
|
|
|
|
|
how can i remove flicker from my program .. i am trying to make a simple game of tettris (don't know how to spell it correctly). i have to move a shape from top to bottom so my control is doing this for me .. logic i m using is simple ( i think it is) i m using paint function of my control just to fill a perticular block whose value is 1 and and empty whose value is 0 so i need to call paint function after every some time. but Invalidate function is creating flicker. is there any other way i can use or i i can paint some shapes constantly without using paint function ?? i have tried to use some other my own written function but they are not working until i call 'em from paint function of my control what should i do..
|
|
|
|
|
|
Search Codeproject or the web for System.Windows.Forms.ControlStyles.DoubleBuffer, it will get rid of the 'flashing'/flicker when you draw to a windows form.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Conversation With a Muslim
Judah Himango
|
|
|
|
|
Add these 3 lines to your form constructor
// Enable Double Buffering to remove flicker
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.UserPaint, true);
this.SetStyle(ControlStyles.DoubleBuffer, true);
Hope this helps
Publicjoe
C# Tutorial at http://www.publicjoe.f9.co.uk/csharp/tut.html
C# Ebook at http://www.publicjoe.f9.co.uk/csharp/samples/ebook.html
VB Tutorial at http://www.publicjoe.f9.co.uk/vbnet/vbnet.html
VB Ebook at http://www.publicjoe.f9.co.uk/vbnet/samples/ebook.html
Mirrors at http://dowhileloop.com/publicjoe/ and http://publicjoe.dowhileloop.com
|
|
|
|