|
Stefan Troschütz wrote: Do you want to show the content in your application (in a text box or similar) or do you want to open the document in some external application?
Hi,
I'd like the doc to open in its native external application if possible - so .txt docs open in notepad etc.
thanks
|
|
|
|
|
Use this method:
System.Diagnostics.Process.Start()
|
|
|
|
|
Ok, then you can simply call the static Process.Start method and pass in the absolute path of the document.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
thats excellent,
cheers guys
mark
|
|
|
|
|
insert into dashboarddealerlogin (logoutdatetime) values (GETDATE())
It is giving error : Cannot insert value null in logoutdatetime.
Anywaz, let it b.
Just c this :
private void logout_Click(object sender, EventArgs e)
{
conn.Open();
string strQury = "";
strQury = "insert into dashboarddealerlogin (logoutdatetime) values '(" + DateTime.Now + ")'";
SqlCommand cm = new SqlCommand(strQury, conn);
int n = Convert.ToInt32(cm.ExecuteScalar());
}
I have written this code in form1.cs n i have to write it here only.
Now i want to use this 'int n' in a function in form2.cs
funEntrylogin(m, i, tb_id.Text, tb_pswd.Text, DateTime.Now,n);
but here it is giving error on 'n'.
how can i do this?
thanx.
nekshan.
|
|
|
|
|
already replyed see belowed
|
|
|
|
|
hi,
i have created a editor using RichTextBox control.
how to create the editor line numbers.
e.g.
1.Abcd
2.abcd
3.efgh
4.ijkl
5.
6.
7.
8.so on....
Thank you
|
|
|
|
|
You need to write your own control to do this, the richeditbox won't do it, and making it do it, will be more hassle than it's worth.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Have you tried searching this site, I believe I have seen many articles regarding custom richtextbox controls.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Hi,
How to get Windows name or Application name from tray "Loaded Programmes"
Thank you
|
|
|
|
|
I don't think there's a way to retrieve only apps running in the system tray. None that I know of. You can retrieve all apps running using System.Diagnostics.Process.GetProcesses()
|
|
|
|
|
Hi guys. I am stuck.
I need to create a form/component that does the following.
* Can render text, in various different ways, such as outlined, drop shadow (basic), centered on the screen etc.
* Can render said text over an image or video file or gradient background.
* Can play this video file, AND LOOP IT, seamlessly.
* Can fade from one video feed to another, including fading the text.
* Can be controlled via a C# windows forms application. - UI will be done in C# - windows forms. Just the text rendering that has me stumped.
I want to develop this part of my application first, but am really at a loss of where to start. Can anyone offer me any tips on a) what library to use and b) so useful links for such an endeavor.
Cheers
Jacob
|
|
|
|
|
If you have the option of using WPF, it sounds like that is what you need.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I would prefer not to delve into WPF, though the thought did cross my mind, simply for ease of use. Perhaps that is my only option...
|
|
|
|
|
Dear kubbeh
hi
can i add SqlServer program and .Networkframework in my setup?
|
|
|
|
|
wrote: kubbeh
Who ?
wrote: can i add SqlServer program and .Networkframework in my setup?
So the one MSI installs them all ? No.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
When i logout, i want that 'logoutdatetime' in database,its format is datetime in database. So i have written query, but it is giving error.
strQury = "insert into dashboarddealerlogin (logoutdatetime) values '" + DateTime.Now + "';
what is wrong?
If u can plz guide.
And..
lasttime nu :
str = str1 + "#" + str2 + "#" + str3 ...barobar implement nai thayu haji,i'll try it 2mrw now.
thanx
nekshan
-- modified at 5:20 Monday 19th February, 2007
|
|
|
|
|
What is the format of the date you wish to store in the database??
Thanking you in Advance
Regards
Pratik Shah
|
|
|
|
|
strQury = "insert into dashboarddealerlogin (logoutdatetime) values '(" + DateTime.Now + ")';"
|
|
|
|
|
Incorrect syntax near : '(" + DateTime.Now + ")'
I m checking it in query analyser.
nekshan.
|
|
|
|
|
insert into dashboarddealerlogin (logoutdatetime) values (GETDATE())
write this in query bilder.
|
|
|
|
|
insert into dashboarddealerlogin (logoutdatetime) values (GETDATE())
It is giving error : Cannot insert value null in logoutdatetime.
Anywaz, let it b.
Just c this :
private void logout_Click(object sender, EventArgs e)
{
conn.Open();
string strQury = "";
strQury = "insert into dashboarddealerlogin (logoutdatetime) values '(" + DateTime.Now + ")'";
SqlCommand cm = new SqlCommand(strQury, conn);
int n = Convert.ToInt32(cm.ExecuteScalar());
}
I have written this code in form1.cs n i have to write it here only.
Now i want to use this 'int n' in a function in form2.cs
funEntrylogin(m, i, tb_id.Text, tb_pswd.Text, DateTime.Now,n);
but here it is giving error on 'n'.
how can i do this?
thanx.
nekshan.
|
|
|
|
|
'private void logout_Click(object sender, EventArgs e)
'{
'conn.Open();
'string strQury = "";
'strQury = "insert into dashboarddealerlogin (logoutdatetime) values '(" + DateTime.Now + ")'";
'SqlCommand cm = new SqlCommand(strQury, conn);
'int n = Convert.ToInt32(cm.ExecuteScalar());
'}
'above query is correct.return value for n is (0 or 1) if n=0 then not row update and n=1 then row updated. error is on something else.
|
|
|
|
|
u test query in sql query bilder but system.datatime.now() is a function of vb.net so its not run in builder but code i sent u is correct '(" + DateTime.Now + ")'
|
|
|
|
|
Nekshan wrote: strQury = "insert into dashboarddealerlogin (logoutdatetime) values '" + DateTime.Now + "';
what is wrong?
You have forgotten the parenthesis around the values, and you have forgotten to convert the DateTime value into a string:
strQury = "insert into dashboarddealerlogin (logoutdatetime) values ('" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');
You should make sure that the date format that you use is understood correctly by the database. I prefer the ISO 8601 date format as it's unambigous.
---
single minded; short sighted; long gone;
|
|
|
|