|
when the user try to close the form by clicking the close button of the title bar.how can show a dialog box to verify the form closing ?
|
|
|
|
|
you will get form closing event @ that time
My small attempt...
|
|
|
|
|
in witch event ? the closed or closing event ?
|
|
|
|
|
Its on your form closing event, you need to add code to cancel/continue..I presume
something like the following.
private void FormClosing(object sender, CancelEventArgs e)<br />
{<br />
<br />
if <br />
(MessageBox.Show("Are you sure you want to exit?", "Confirm exit", <br />
MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)<br />
{<br />
e.Cancel = true;<br />
}<br />
<br />
}
A craft is an enemy if not well learned.
|
|
|
|
|
|
Why don't you try it yourself? Or have a look at documentation? There is no chance of canceling the process if one of the events has already been fired. (Guess which one it is)
|
|
|
|
|
I want to design a Urdu interface for our local costumer. How I could do so?
If some one has helping material please send me at samibaba.khan@gmail.com. I'll be grateful to him.
|
|
|
|
|
How can i use timer that it's interval less than 100ms to call function ?
I want to use it to send some bit to parallel port to control of speed but the speed of motor not faster than 1 round in 20 second
Tanks
|
|
|
|
|
|
Hi, you may be interestd in my timers article then.
|
|
|
|
|
Hi all,
I am developing a windows service using C#.
following is my code start method of windows service.
Httpwebrequest owebreq=(HttpwebRequest) webrequest.Create(URL);
owebreq.Method="GET";
owebreq.headers.add("Narendra","Mohan");
HttpwebResponse owebresp=(HttpWebResponse)owebreq.GetResponse();
With this code i am getting the Response of particular URL;
But i am unable to get Custom header in response.
How to get custom header in the response stream?
Please help me .
Thanks and Regards
Narendra
|
|
|
|
|
Hi,
i have a question and can't find answers. I have to make a software which must display informations about computers (received date, installed date, repaired date, ...). I have a list of these computers and i have to select one or 5 or 10 items of this list and print a report about it.
BUT, the report was made under the software Business Object Crystal Report 10. So how can i display computers that i selected in the list of my application in the report crystal i made under Crystal Report?
i'm sure it's possible but how?
Thanks a lot.
Alex
|
|
|
|
|
explaination about why i made my report under Crystal Report Software:
this year my clients ask me to modify these reports at least 20 times. Reports changed frequently because the laws oblige these industries to display some informations on their reports. That's why we work on Crystal Report and i would like to connect my C# application and these reports.
I hope i'm clear.
|
|
|
|
|
Hi, I'm writing a Media Player. In Fullscreen mode, as you know, the Mouse is hidden and becomes visible whenever you move it a little and hides after sometime. Now I understand that I need to use multithreading to set up a timeout to hide the mouse. My Question is which event should I handle for mouse movements. Should it be MouseMove, MouseHover or any other method? Please advice
Here is how I think I will do it
if the mouse moves then
Show the mouse
Start a Timeout
When the Timeout expires, Hide the mouse
and do the above whenever the mouse moves
Thanks...
modified on Wednesday, January 09, 2008 5:07:28 AM
|
|
|
|
|
Yeah, that sounds right.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Do I need to use MouseMove or MouseHover or both?
|
|
|
|
|
use MouseMove event for this and run a counter in mousemove event when the counter confirms your condition show the cursor.
int move = 0;
private void Form1_MouseMove(object sender, MouseEventArgs e)
{
if (move++ >= 20)
{
this.Cursor = new Cursor(System.Windows.Forms.Cursors.Arrow.CopyHandle());
this.label1.Cursor = this.Cursor;
move = 0;
}
}
Hope it helps.
modified on Wednesday, January 09, 2008 6:45:53 AM
|
|
|
|
|
Hi All
I Want to create a new Control It's Inheretes from DataGridView,and Developing it By Adding Footer.
Who I Can add to it
Thanks for any body hellp me
Thaer
|
|
|
|
|
Hello,
I need something like a BeforePropertyChange in Propertygrid. Does anyone know how to realize this.
Thank you
martin
|
|
|
|
|
|
How to bind datagridview values to the XML nodes in order to create an XML .
Rani
|
|
|
|
|
you can read the values by row and try to push that to a xml
My small attempt...
|
|
|
|
|
I would like to know can we access MSMQ Outgoing queues programmatically?
If yes then how ? and if not then how much information we can get from outgoing queues. I have been searching (googling) this from yesterday and did'nt find anything.
Actally Im writing an application in which in have to show the number of messages undeliverd, the message itself, a button to clear (purge) the message or messages etc.
Looking for ur answers
Regards
|
|
|
|
|
|
hi
all
i have a form with First,Next,Prev,Buttons.
i had populated a datatable with datas .Now i need to navigate through the records , can any body help me how to achieve this.
conn = new SqlConnection(connstr);<br />
conn.Open();<br />
SqlCommand cmd = new SqlCommand(sqlAllCustomers, conn);<br />
SqlDataAdapter adpt = new SqlDataAdapter(cmd);<br />
DataTable dtCust1 = new DataTable("CustomerDatTab");<br />
adpt.Fill(dtCust1);
thanks
senthil
|
|
|
|