|
Do any of the child forms have FormClosing(..) handlers? If so check them to see if they might be doing anything that's interfering, such as setting e.Cancel to true.
You might also try stepping through the main form's closing handler with the debugger if you haven't done that already.
BDF
I often make very large prints from unexposed film, and every one of them turns out to be a picture of myself as I once dreamed I would be.
-- BillWoodruff
|
|
|
|
|
i am using three tables and i want ot bind that tables to the treeview control so please suggest me with an example
|
|
|
|
|
WPF? Silverlight? ASP.NET? Windows Forms?
The technique you will use depends on the technology you are using.
|
|
|
|
|
Hi.
I want source code for image encryption (and decryption) in C# language (with chaos signals), please help me, it's my project.
thanks.
|
|
|
|
|
If we give you the source code, it's not really your project is it? It's someone else's project at that point. Are you willing to give them whatever award you are trying for here?
|
|
|
|
|
no it's in my university.
I'm interesting
do u have source code ?
|
|
|
|
|
Danial C wrote: do u have source code ?
I do.
Am I going to give it to you? No.
Why? Because that would be helping you to cheat. If you can't do this task on your own, why should we help you to cheat? Note the use of the word "cheat" here.
|
|
|
|
|
I want just you help me, I want to learn about this. cheat ? no, i'm not who you think.
however thanks.
|
|
|
|
|
There are tons of articles out on the web, most wih code samples! All you have to do is Google "steganography".
This is for a univeristy project? Didn't they teach you how to do research, oh, back in high school? You better learn very fast because that skill is what is going to keep you in a job.
|
|
|
|
|
im using microsoft visual c# express and its database.
through my c# program i wanted to retrieve a folder path from the database to select files.but im getting this error.please help.
i have created a column 'folder_path nvarchar(50)'
my folder path is : @"f:/pick_up"
if i put folder path as 'comp' it reads.i guess the error has something to do with special characters @,/ and ".
reply asap.thank you.
|
|
|
|
|
ausia19 wrote: @"f:/pick_up"
Is that what you have stored in the database? If so, you need to remove the @ sign.
|
|
|
|
|
stored it as '@"f:/pick_up"'..but if i remove it.d the path is not complete.
i also tried to store without '@' in a string variable s(where s= "f:/pick_up") and then did s="@" +s;
even then i get the error.
in fact when i directly put d path in
string[]folderPath=Directory.GetFiles(@"f:/pick_up","*.jpg",SearchOption.AllDirectories);
it runs
but if d path is replaced with s it gives error
|
|
|
|
|
ausia19 wrote: stored it as '@"f:/pick_up"
that is a big no no.
If
string myString=@"f:/pick_up";
Console.WriteLine(myString);
then myString will hold exactly 10 characters, starting with f and ending with p.
It's those 10 characters you would type after "dir" in a command window to display the content of the folder. The special characters @ and " are NOT part of the string, they only exist in your source code to tell the compiler what the value of myString really has to be.
And it is exactly those 10 characters you should store in your database.
I suggest you open an introductory book to C# and start studying the very first chapters ASAP.
modified 5-Apr-12 8:02am.
|
|
|
|
|
ausia19 wrote: did s="@" +s;
Won't work, @ tells the compiler it doesn't need to take in account the escape character. ('\') it is not part of the string itself.
Store the variable as "f:\\pick_up\\" or use @"f:\pick_up\" which is the same. It will be saved as "f:\pick_up\" and when you get it out it will come out as "f:\\pick_up\\" which is what you need.
If it still shouldn't work, post the error message and check the debug information.
V.
|
|
|
|
|
thank you so much V,'f:\\pick_up\\' worked.
but not @"f:\pick_up\".y so?
also when i explicitly put d path in d command string[] folderPath = Directory.GetFiles(@"f:/pick_up", "*.jpg", SearchOption.AllDirectories);it works.
but when i retrieve d same string saved in d databse i get d error.
im new to c#.
|
|
|
|
|
When you retrieve it from the database, the string contains @. What you are issuing as a command is Directory.GetFiles("@\"f:\pick_up\"", "*.jpg");. That is why I told you to remove the @ earlier. Perhaps you might listen next time.
|
|
|
|
|
thank you...
|
|
|
|
|
thanks V..
|
|
|
|
|
you're welcome
V.
|
|
|
|
|
ausia19 wrote: .i guess the error has something to do with
Don't guess. Paste the entire Exception.ToString here, the error-message will point where the problem is.
ausia19 wrote: reply asap
..not today
Bastard Programmer from Hell
|
|
|
|
|
Good day
I am using Visual Studio 2010 to develop a Windows app. I am busy with a module where the user can specify setting for days of the week, for example Mondays the lunch duration is 1 hour, Tuesday it is 30 minutes, and so on.
I want to display the days of the week (Sunday, Monday, …) in a ComboBox so that the user can select a day.
The DisplayMember must be the name, e.g Monday
The ValueMember must be the ordinal number of the day in the DayOfWeek enum, e.g. 1
How do I populate the ComboBox using the DayOfWeek enumerator?
I tried:
private void Form1_Load(object sender, EventArgs e)
{
for (int j = 0; j < 7; j++)
{
comboDay.Items.Add((DayOfWeek)j);
}
}
private void comboDay_SelectedIndexChanged(object sender, EventArgs e)
{
MessageBox.Show("Selected Day = " + comboDay.SelectedValue);
}
This shows the DayOfWeek names in the combobox, but the SelectedValue is always null.
Any suggestions on better ways of doing this?
Thanks.
Kobus
|
|
|
|
|
Use SelectedItem instead of SelectedValue .
|
|
|
|
|
Thanks
I feel a fool for not thinking of that.
Regards.
Kobus
|
|
|
|
|
It's always the way. As soon as someone else looks at it, you see it.
|
|
|
|
|
public static List LI = new List();
|
|
|
|