Click here to Skip to main content
15,879,095 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to resize external application's window Pin
PIEBALDconsult17-Dec-09 14:00
mvePIEBALDconsult17-Dec-09 14:00 
AnswerRe: How to resize external application's window [modified] Pin
Luc Pattyn17-Dec-09 14:24
sitebuilderLuc Pattyn17-Dec-09 14:24 
Newsتابع تقویم شمسی و قمری و میلادی برای فارسی زبانان جهان Pin
Mohsen Sabzaliyan17-Dec-09 10:30
Mohsen Sabzaliyan17-Dec-09 10:30 
GeneralRe: تابع تقویم شمسی و قمری و میلادی برای فارسی زبانان جهان Pin
harold aptroot17-Dec-09 10:35
harold aptroot17-Dec-09 10:35 
GeneralRe: تابع تقویم شمسی و قمری و میلادی برای فارسی زبانان جهان Pin
Ravi Bhavnani17-Dec-09 10:50
professionalRavi Bhavnani17-Dec-09 10:50 
GeneralRe: تابع تقویم شمسی و قمری و میلادی برای فارسی زبانان جهان Pin
EliottA17-Dec-09 11:17
EliottA17-Dec-09 11:17 
GeneralRe: تابع تقویم شمسی و قمری و میلادی برای فارسی زبانان جهان Pin
Eddy Vluggen17-Dec-09 11:21
professionalEddy Vluggen17-Dec-09 11:21 
QuestionHelp For "Cross-thread operation not valid: Control '' accessed from a thread other than the thread it was created on." Pin
Mohsen Sabzaliyan17-Dec-09 10:24
Mohsen Sabzaliyan17-Dec-09 10:24 
hi, MyFrinds.
Please Help me!
Read my Source Code :

{
...
System.Threading.Thread lengthyprocessthreadanbar =
new System.Threading.Thread(new
System.Threading.ThreadStart(RunLengthyProcessanbar));
lengthyprocessthreadanbar.IsBackground = true;
lengthyprocessthreadanbar.Start();
_pleasewaitdlg = new Anbar_PleaseWait();
_pleasewaitdlg.ShowDialog();
...
}
void RunLengthyProcessanbar()
{
SetupForm();
_pleasewaitdlg.shouldclosenow = true;
}

private void SetupForm()
{
SqlConnection cnA = new SqlConnection("ConnectionString...");
SqlCommand cmA=new SqlCommand ();
cmA.Connection = cnA;
cmA.CommandText = "Command Text ...";
int RowActive = 0;
if (cnA.State != ConnectionState.Open) cnA.Open();
SqlDataReader readA = cmA.ExecuteReader();

while (readA.Read())
{
dgvAnbar.Rows.Add(1);
dgvAnbar.Rows[RowActive].Cells[0].Value =
readA[0].ToString();
}
cnA.Close();
}

www.ggsoft.ir
mohsen5459@gmail.com

Thanks.

Welcome Mohsen Sabzaliyan

AnswerRe: Help For "Cross-thread operation not valid: Control '' accessed from a thread other than the thread it was created on." Pin
Super Lloyd17-Dec-09 10:49
Super Lloyd17-Dec-09 10:49 
AnswerRe: Help For "Cross-thread operation not valid: Control '' accessed from a thread other than the thread it was created on." Pin
Ravi Bhavnani17-Dec-09 10:52
professionalRavi Bhavnani17-Dec-09 10:52 
AnswerRe: Help For "Cross-thread operation not valid: Control '' accessed from a thread other than the thread it was created on." Pin
Mbah Dhaim17-Dec-09 15:25
Mbah Dhaim17-Dec-09 15:25 
AnswerRe: Help For "Cross-thread operation not valid: Control '' accessed from a thread other than the thread it was created on." Pin
hamed-vojdani18-Dec-09 6:36
hamed-vojdani18-Dec-09 6:36 
GeneralRe: Help For "Cross-thread operation not valid: Control '' accessed from a thread other than the thread it was created on." Pin
DaveyM6918-Dec-09 12:21
professionalDaveyM6918-Dec-09 12:21 
AnswerRe: Help For "Cross-thread operation not valid: Control '' accessed from a thread other than the thread it was created on." Pin
DaveyM6918-Dec-09 12:22
professionalDaveyM6918-Dec-09 12:22 
AnswerRe: Help For "Cross-thread operation not valid: Control '' accessed from a thread other than the thread it was created on." Pin
Derek R. White13-Mar-10 15:31
Derek R. White13-Mar-10 15:31 
QuestionC# Excel: Creating a named range? Pin
Goalie3517-Dec-09 10:03
Goalie3517-Dec-09 10:03 
AnswerRe: C# Excel: Creating a named range? Pin
hamed-vojdani18-Dec-09 7:07
hamed-vojdani18-Dec-09 7:07 
Questionc# serial port Pin
aniarun17-Dec-09 9:11
aniarun17-Dec-09 9:11 
AnswerRe: c# serial port Pin
Garth J Lancaster17-Dec-09 10:03
professionalGarth J Lancaster17-Dec-09 10:03 
GeneralRe: c# serial port Pin
aniarun17-Dec-09 11:21
aniarun17-Dec-09 11:21 
GeneralRe: c# serial port Pin
Garth J Lancaster17-Dec-09 11:36
professionalGarth J Lancaster17-Dec-09 11:36 
GeneralRe: c# serial port Pin
aniarun17-Dec-09 12:10
aniarun17-Dec-09 12:10 
GeneralRe: c# serial port Pin
Roger Wright17-Dec-09 18:57
professionalRoger Wright17-Dec-09 18:57 
GeneralRe: c# serial port Pin
aniarun20-Dec-09 12:28
aniarun20-Dec-09 12:28 
GeneralRe: c# serial port Pin
Roger Wright20-Dec-09 13:46
professionalRoger Wright20-Dec-09 13:46 

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.