Click here to Skip to main content
15,891,409 members
Home / Discussions / C#
   

C#

 
QuestionRichtextbox gets cleared [modified] Pin
Dominic Victor19-Feb-07 21:40
Dominic Victor19-Feb-07 21:40 
Questioncustom control Pin
md_refay19-Feb-07 21:01
md_refay19-Feb-07 21:01 
AnswerRe: custom control Pin
Martin#19-Feb-07 21:45
Martin#19-Feb-07 21:45 
AnswerRe: custom control Pin
Stefan Troschuetz19-Feb-07 22:12
Stefan Troschuetz19-Feb-07 22:12 
Questionfrm.Close() issue Pin
ArchaBhandare19-Feb-07 20:55
ArchaBhandare19-Feb-07 20:55 
AnswerRe: frm.Close() issue Pin
Martin#19-Feb-07 21:12
Martin#19-Feb-07 21:12 
GeneralRe: frm.Close() issue Pin
ArchaBhandare19-Feb-07 21:21
ArchaBhandare19-Feb-07 21:21 
Questiona query [modified] Pin
Nekshan19-Feb-07 20:40
Nekshan19-Feb-07 20:40 
In form1,i defined it like :
namespace WindowsApplication1
{
public partial class form1 : Form
{
public DateTime n;
SqlConnection conn = new SqlConnection("Data Source=PROGRAMER;Initial Catalog=....");
.....
}

In form2,i made object of form1:
System.Windows.Forms.Form form1_ = new form1();
string d = form1_.n;

-- BUT it is giving error on 'n' here, 'n' doesnot come on click of'.' after form1_

I hav used it like this in form1:
private void button1_Click(object sender, EventArgs e)
{
conn.Open();

string strQury = "";
strQury = "insert into dashboarddealerlogin (logoutdatetime) values '(" + DateTime.Now + ")'";
SqlCommand cm = new SqlCommand(strQury, conn);
n = Convert.ToDateTime(cm.ExecuteScalar());
}
Is my global declaration of 'n' still not proper?
Thank You.
Nekshan.
-- modified at 2:48 Tuesday 20th February, 2007
AnswerRe: a query Pin
virendra patel19-Feb-07 21:00
virendra patel19-Feb-07 21:00 
GeneralRe: a query Pin
Nekshan19-Feb-07 21:55
Nekshan19-Feb-07 21:55 
AnswerRe: a query Pin
Guffa19-Feb-07 21:24
Guffa19-Feb-07 21:24 
AnswerRe: a query Pin
Sandeep Akhare19-Feb-07 21:37
Sandeep Akhare19-Feb-07 21:37 
GeneralRe: a query Pin
Nekshan19-Feb-07 22:01
Nekshan19-Feb-07 22:01 
GeneralRe: a query Pin
Sandeep Akhare19-Feb-07 22:20
Sandeep Akhare19-Feb-07 22:20 
QuestionStopping a Thread Pin
nasambur19-Feb-07 20:22
nasambur19-Feb-07 20:22 
QuestionHow to send back value to the Main WinForm? [modified] Pin
Khoramdin19-Feb-07 20:07
Khoramdin19-Feb-07 20:07 
AnswerRe: How to send back value to the Main WinForm? Pin
Martin#19-Feb-07 20:49
Martin#19-Feb-07 20:49 
GeneralRe: How to send back value to the Main WinForm? Pin
Khoramdin20-Feb-07 9:42
Khoramdin20-Feb-07 9:42 
GeneralRe: How to send back value to the Main WinForm? Pin
Martin#20-Feb-07 20:37
Martin#20-Feb-07 20:37 
AnswerRe: How to send back value to the Main WinForm? Pin
Rhys Gravell19-Feb-07 20:53
professionalRhys Gravell19-Feb-07 20:53 
Questiona query [modified] Pin
Nekshan19-Feb-07 19:51
Nekshan19-Feb-07 19:51 
AnswerRe: a query Pin
virendra patel19-Feb-07 20:05
virendra patel19-Feb-07 20:05 
GeneralRe: a query [modified] Pin
Nekshan19-Feb-07 20:39
Nekshan19-Feb-07 20:39 
AnswerRe: a query Pin
Sandeep Akhare19-Feb-07 20:08
Sandeep Akhare19-Feb-07 20:08 
GeneralRe: a query Pin
Nekshan19-Feb-07 20:16
Nekshan19-Feb-07 20:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.