|
Hello
can someone tell me what is the lifeCycle of downloading a file.
10x regards
dghdfghdfghdfghdgh
|
|
|
|
|
I'm not sure how your question makes any sense. You request a file, it gets copied into memory and then written to your file system.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
Hi all,
hw to set coordinate for the rectangle in richtextbox...?
KAM83_CODEPROJECT
|
|
|
|
|
A little descriptive problem description might help expedite in arriving at the solution or troubleshooting the problem on hand.
kamalesh5743 wrote: KAM83_CODEPROJECT
Seems to be a peculiar and an interesting sig.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
All, I am new to the C# world and I am having some difficulty in finding information on the following.
Is it possible to gain access to a Win32 window handle or CWnd pointer from within a C# application/form. Basically, I would like to use a C# form (or other construct) to simply house an already existing OpenGL window class written in C++. I would like to maintain all functionality already built into the C++ derived, 3D/OpenGL Window object.
Any information and/or direction to other sources would be greatly appreciated
Thanks in advance,
Michael
|
|
|
|
|
The Handle property of a C# window is it's HWND.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
Hi,
I would like to know how to prevent the TextChanged event of a ComboBox from firing. For example I have a ComboBox with 2 values 1 and 2. So I change from 1 to 2 which results in the TextChanged event getting fired but before the TextChanged event completes I want to cancel it based on some condition. I was wondering how can this be done. Also cancelling of the TextChanged event should change the currently selected value in the Combobox to 1 instead of 2 since the TextChanged event did not complete.
I am using .NET 2.0 Windows Forms with C#.
Your help is greatly appreciated.
Thanks.
|
|
|
|
|
In the TextChanged event or the SelectedIndexChanged event write the following code.
check ur condition and if true then
e.handled = true;
this is return that event without further processing.
Hope that works for you,
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
Why you allowing changing text in Combo box ?
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
I have this assignment m_strFileName = OpenFile(); in which there is a try/catch block within the OpenFile method.
private string OpenFile()<br />
{<br />
string strFilename; <br />
<br />
if (intStoreNumber == 201)<br />
{<br />
strFilename = "t1";<br />
}<br />
else if (intStoreNumber == 202)<br />
{<br />
strFilename = "t2";<br />
}<br />
else if (intStoreNumber == 203)<br />
{<br />
strFilename = "T3";<br />
}<br />
else<br />
{<br />
strFilename = intStoreNumber.ToString();<br />
strFilename = strFilename.PadLeft(2,'0');<br />
}<br />
<br />
<br />
strFilename = "afford" + strFilename + ".dat";<br />
try<br />
{<br />
File.Copy("F:\\BORIS\\" + strFilename, Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\" + strFilename,true);<br />
}<br />
catch <br />
{<br />
MessageBox.Show("The file " + strFilename + " can not be found. Please check " + <br />
"that you selected the correct store and that your network connection to" + <br />
" drive F: is not disconnected","File Not Found", MessageBoxButtons.OK,<br />
MessageBoxIcon.Exclamation);<br />
<br />
}<br />
strFilename = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\" + strFilename;<br />
return strFilename;
The question I have is if the program runs into this exception, how do I return it back to waiting on an event versus going through to the next method?
Everything I got from google tells me all about the structure of a try/catch/finally block, but nothing much more on how to exit gracefully without shutting down the program.
Thanx in advance.
Jude
|
|
|
|
|
why would your program shut down?
you have handled the exception and displayed a message box, the user will click the ok button on the message box and the program will continue further.
Can you please elaborate your problem?
what actually do u wanna do?
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
I do not want the program to shut down. The method that is called returns a value that must be used in the next step of the program. But since the exception was thrown, I do not want the program to progress to the next called method. I want it to kill the forward progress and have the app wait for an event.
Thanx for the reply!
Jude
|
|
|
|
|
jsut make the following changes
try
{
File.Copy("F:\\BORIS\\" + strFilename, Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\" + strFilename,true);
strFilename = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\" + strFilename;
}
catch
{
MessageBox.Show("The file " + strFilename + " can not be found. Please check " +
"that you selected the correct store and that your network connection to" +
" drive F: is not disconnected","File Not Found", MessageBoxButtons.OK,
MessageBoxIcon.Exclamation);
strFilename = string.Empty;
}
return strFilename;
and when u call the method OpenFile()
just check if the return string is Empty or not
if it is empty string dont do any thing else process furhter.
Hope that is what you want to do...
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
Thanx for the reply....but how do I stop the execution of the code? It is withing a button's click event.
I would supply the code, but it is on my work desktop and I am at home.
break
would not work because it is not within a loop, etc
Jude
|
|
|
|
|
nevermind...brainfart!
Jude
|
|
|
|
|
what do u mean by stop the execution of the code.
You just have to write the code in the IF block,,, if the string is not empty perform what ever you want else nothing...
e.g.
if(!String.Equals(String.Empty, Openfile())
{
///DO WHAT U WANT DO
}
else
nothing will happen....
Is that fine?
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
yes, read previous post and forgive my brainfart!
Jude
|
|
|
|
|
Hi All,
Can anyone give me refference of how to send sms messages through a cell phone???
Thanx.
|
|
|
|
|
|
Use the SMS client installed on the phone.
led mike
|
|
|
|
|
Check out http://www.smscountry.com/[^]
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Good Evening All
i have Restored a SQl 2005 Database into my machine, and that Database carried the Stored Procedure. now i have an Application that depends on those Stored Procedure. In the Business Intelligance ,i can see the Stored Procedures and i have recompile the Sp's thinking that it might Solve the Problem, So my Application complains that the Stored Procedure could not Found, but in my DB its there. And Secondly Second it will tell me that the Connection object has not been initialized, but i know that i deed, and i can prove it
con = new SqlConnection(strcon);
con has been Declared Globaly, i have the Same Application running at my work place and this SQl am having a Problem with , its my hom machine.
And here is how i use my Procedure ion C#
<br />
cmdinserted = new SqlCommand();<br />
<br />
cmdinserted.CommandText = "prmInsert_Property";<br />
<br />
cmdinserted.CommandTimeout = 0;<br />
<br />
cmdinserted.CommandType = CommandType.StoredProcedure;<br />
<br />
cmdinserted.Connection = con;
as we can see everything its done and Perfect, does the Problem lies on the resoted DB, what should be taken into consideration when restoring a Db that has SP's
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Vuyiswa wrote: and i can prove it
Showing code doesn't prove that what yuo have is correct.
Vuyiswa wrote: everything its done and Perfect
Obviously it isn't perfect, or you wouldn't be having problems.
Check you connection string, varify it is correct, don't assume it is.
only two letters away from being an asset
|
|
|
|
|
my connection string is poiting to the correct Server and DB.
and the connection object is declared and initialized.
thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
First step - stop making excuses, read the error messages and work out why it is that you're wrong in thinking that everything is perfect.
If it works on one machine and not another, I'd say the problem is the connection string.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|