|
J4amieC wrote: and go get a job flipping burgerscow patties .
Fixed that for you.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
Rajdeep.NET wrote: its your sole responsibility to help me out
It will be Jamie's responsibility to help you out when you pay him for it.
|
|
|
|
|
Vikram A Punathambekar wrote: Carpe Diem.
When it comes to threads like this I really am thinking more along the lines of Carpe Jugulum
|
|
|
|
|
Rajdeep.NET wrote: then its your sole responsibility to help me out.
What ????? What do you think we are ? Your mother,your parents ? Why is my f**king sole responsibility to answer to your questions ?
Get real asap and decide to start studying more than talking.
|
|
|
|
|
I think, as with many posts on here, that certain phrases get lost in translation.
Obviously the guy is a beginner coder, possibly a beginner in English too
|
|
|
|
|
By the way its quite obvious moron. Read your (???) code
|
|
|
|
|
Clearly, you didn't do a very good job of it. You should have separated the letters with spaces l i k e t h i s to mimic the effect of talking slower.
|
|
|
|
|
You're right. very good point.
|
|
|
|
|
Raj check the answer which is already given....
BTW why did you delete the previous post and re-posted the same content here...????
Have a Happy Coding.....
|
|
|
|
|
Sorry for deleting the previous post,
there was a mistake in it. Instead of writing
Button1_Click, I wrote Button3_Click. It wouldn't have affected the
program too much, but I did so, to make u people understand the code better such that it doesn't affect the main motive of the program.
plz help
|
|
|
|
|
Rajdeep.NET wrote: there was a mistake in it. Instead of writing
Button1_Click, I wrote Button3_Click
That made me really chuckle.
|
|
|
|
|
You seem to read every message except the ones that give you the solution. Did you even try what 8kelvin suggested below?
|
|
|
|
|
In the interest of killing this question I will now provide you with the answer. Ready? Concentrate now...
you have told the computer to show you two message boxes.. look...
MessageBox.Show("Are you sure to exit the application! Selct Ok to Exit now or Cancel to stay in the current form", "Sample App", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation);
if (MessageBox.Show("Are you sure to exit the application! Selct Ok to Exit now or Cancel to stay in the current form", "Sample App", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) == DialogResult.OK)
The first one you show the message box and discard the user's response.
The second one is within an if(..) construct. This does a boolean check on the contents of the (..) and if that returns true then the code directly after fires. Otherwise the code inside the else part executes. You would have learnty this had you have sat in on lecture "programming 101".
Your if(..) checks that the users response is equal to DialogResult.OK (or, more simply the user clicks trhe OK button) and if they do then the app closes. The part in your else is irrelevant.
Good luck with the rest of your career, mine'll be a big mac with fries please.
|
|
|
|
|
EDIT: The post above messed up not showing half the text. I have reposted here without the long code blocks
In the interest of killing this question I will now provide you with the answer. Ready? Concentrate now...
you have told the computer to show you two message boxes.. look...
MessageBox.Show("Are you sure to exit the application!....
if (MessageBox.Show("Are you sure to exit the application! ....
The first one you show the message box and discard the user's response.
The second one is within an if(..) construct. This does a boolean check on the contents of the (..) and if that returns true then the code directly after fires. Otherwise the code inside the else part executes. You would have learnty this had you have sat in on lecture "programming 101".
Your if(..) checks that the users response is equal to DialogResult.OK (or, more simply the user clicks trhe OK button) and if they do then the app closes. The part in your else is irrelevant.
Good luck with the rest of your career, mine'll be a big mac with fries please.
|
|
|
|
|
J4amieC wrote:
Good luck with the rest of your career, mine'll be a big mac with fries please.
I think he might not be able to do this as well... you're probably end up with 2 chicken burger's instead!
|
|
|
|
|
If you want to edit a post that scrolls off the side, you can do it. Click the body of the message and then press tab. The Reply link should get focus - then all you need to do is press tab to cycle between the links. Note that the edit link is the one you'll tab onto immediately after the bookmark link.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
ignore those jokers....
its because you need to put in another MessageBox.Show to handle the cancel button. if you dont then windows will auto create another one to make up for it... try the following...
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("Are you sure to exit the application! Selct Ok to Exit now or Cancel to stay in the current form", "Sample App", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation);
if (MessageBox.Show("Are you sure to exit the application! Selct Ok to Exit now or Cancel to stay in the current form", "Sample App", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) == DialogResult.OK && MessageBox.Show("Are you sure to exit the application! Selct Ok to Exit now or Cancel to stay in the current form", "Sample App", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) == DialogResult.Cancel)
{
Close();
}
else
{
return;
}
}
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
DialogResult messageBoxResult = MessageBox.Show(...);
if(messageBoxResult == DialogResult.Ok)
{
}
else if(messageBoxResult == DialogResult.Cancel)
{
}
You may want to note that MessageBox.Show only gets invoked once. Incidentally, the first exclamation point passed to your method should be a question mark, and "selct" should be "select"
|
|
|
|
|
Hii All
i am working with datagridview in windows application. I hav one problem with datagridview DataPropertyName. I hav given same datatable column name as DataPropertyName to two gridview fields(RealPL and unrealPL)but i want to show ont field as 0(zero)based on some condition.
Example:
for (int n = 0; n <= dtclose.Rows.Count - 1; n++)
{
if (dtclose.Rows[n]["Status"].ToString() == "LIVE")
{
dtgrdv.Rows[n].Cells["RealPL"].Value = "0";
}
else if (dtclose.Rows[n]["Status"].ToString() == "CLOSE")
{
dtgrdv.Rows[n].Cells["UnrealPL"].Value = "0";
}
}
but both the field showing zero or showing same value..what should i do?
where I am doing wrong?..plz help me
Thank You in advance
|
|
|
|
|
Hi,
When i call System.Threading.Thread.Sleep() the application got stuck, even when i click anywhere the display of the application gone blank.
Is there any way to stop this problem. Let it stuck but allow to see the UI and just disble mouse click.
Is there any other way other than Thread.Sleep()
Thankyou,
YPKI
|
|
|
|
|
set Sleep with delay interval like, Thread.Sleep(10), to sleep for 10ms
8.Kelvin()
{
while (!(the machine can program itself))
Wont_stop_coding = true;
}
|
|
|
|
|
If you call Thread.Sleep() without specifying a time as int or TimSpan , the thread will sleep indefinitely, so it will obviously not react to user actions.
|
|
|
|
|
why dont you just set Enabled to false for any controls you dont want the user to interact with. Ideally you shouldnt sleep a UI thread at any point. what exactly are you trying to acheive?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
I have some image files, it should display on a costom control in a specfied time, so after display a image there should be a interval to display next, igave thread.sleep at that time inside the while loop
while (read each line of a .txt where image name and time interval written))
{
char[] delimiterChars = { '.' };
string[] fileNameArray;
fileNameArray = name.Split(delimiterChars);
int sleep = Convert.ToInt32(fileNameArray[1]);
System.Threading.Thread.Sleep(sleep);
//display image here
}
is there any way to watch the image changing without UI stuck. like microsoft movimaker.
|
|
|
|
|