|
from MSDN on the BeginGetContext call[^]
The InvalidOperationException is thrown when the server is stopped. So there you go it is normal behaviour. You can check the IsListening Property to see if the _Server is started or not.
|
|
|
|
|
Thanks GDavy,
Your solution works. Cool!
regards,
George
|
|
|
|
|
you should put break for while loop...
while (true)
{
try
{
result = _Server.BeginGetContext(new AsyncCallback(this.HttpCallback), _Server);
result.AsyncWaitHandle.WaitOne();
}catch (HttpListenerException) { break; }
catch (InvalidOperationException) { break; }
}
|
|
|
|
|
George_George wrote: catch (Exception ex)
{
throw ex;
}
You're not doing anything with the exception and then you throw a modified exception (without the original stack trace).
If you want to re-throw the original exception use
throw; Simple.
|
|
|
|
|
|
hi i want an application that is used to create an auto updater
like anitvirus updater or windows updater.
what will i need to do please guide me
wasim khan
|
|
|
|
|
|
Hello all Technologist
Can some one help me distinguish between a DRM protected Audio/Video files on windows platform ? I don't wanna use Itune's SDK or WMF -SDK for the same . here i am looking seem general properties of Protected files which will just let me know .....if file is DRM protected or not .
Thanking you in anticipation.
Regards
Ritesh
aa
|
|
|
|
|
have you ever found an answer for this?
(2B)||(!2B)
|
|
|
|
|
We declare an array as
int arr[] = new int[5]; // <---a
now can we also declare the same array as
int[] arr = new int[5]; // <---b
Are both declaring the same array, or is there a diffrence in them?
|
|
|
|
|
humdumof wrote: We declare an array as
int arr[] = new int[5]; // <---a
Its incorrect syntax. How can you declare array like this?
|
|
|
|
|
well i think i got a little confused,
that i had read in a code written in java, & hadn't check with
c#. So, thats y i ask the question.
int[] arr = new int[5]; // is the correct way.
thanks for ur reply.
|
|
|
|
|
Creating arrays in C# has different syntax than other languages.
In C# it's like this:
int[] array = new int[5];
In other languages, like C, it's like this:
int array[5];
|
|
|
|
|
Hi !
i have two project in one solution i want to send image from one project to another , i attached my project in rar format please download it and run with the src folder .
Detail:
one project is mine its simple one only have one form withing it only one picturebox and one button , other peject is paint.net , free product of image editing ,now i want to send my image to paint.net editor its using workspace class etc, i m stuck how to send image in it for editing and then again send back to my project :
//its a button that is place in form1 its in myproject , and i m calling paint.net in mysoftware thorugh this code i get success but wanna send image that is in picturebox to paint.net but not getting any thing plz help me .
private void button2_Click(object sender, EventArgs e)
{
PaintDotNet.MainForm mF;
mF = new PaintDotNet.MainForm();
//PaintDotNet.PdnResources.GetImageResource(@"C:\Sunset.jpg");
//PaintDotNet.PdnResources.LoadImage(@"C:\Sunset.jpg");
// string[] fileNames ;
////string startingDir = Path.GetDirectoryName(documentWorkspace.FilePath);
// string startingDir = @"C:\Temp";
//public documentWorkspace;
//DialogResult result =PaintDotNet.DocumentWorkspace.ChooseFiles( PaintDotNet.DocumentWorkspace. , out fileNames, true, startingDir);
//PaintDotNet.DocumentWorkspace.ChooseFile(
//PaintDotNet.Actions.ImportFromFileAction(@"C:\Sunset.jpg");
// ImportFromFileAction(@"c:\sunset.jpg");
//PaintDotNet.Actions.OpenFileAction(pictureBox1.Image);
//PaintDotNet.Actions.NewImageAction();
// mF.AppWorkspace.PerformAction(new OpenFileAction());
// PaintDotNet.AppWorkspaceAction(new Image("C:\sunset.jpg"));
//PaintDotNet.AppWorkspaceAction(new OpenFileDialog());
mF.Show();
}
|
|
|
|
|
1. Use System.Diagnostics.Process class to start Paint.net and pass the path to your image as arguments.
2. The Process object allows you to associate an event handler that triggers when Paint.NET closes. In this event, load the file back into your application.
|
|
|
|
|
i tried but i m still unable to do this can u give me the code becouse i m not running the exe from my project i m running the applicaton calling one project to another
i m confused , can u give me ur email address i ll send u the hole project in rar format can u do this and send me back plzzzzz
my id is nomanforu@gmail.com
please help me i m facing this problem since 3 days becouse i m new in c# and i have no support from any where plzzzzzzzzzzzzz
|
|
|
|
|
Please don't be desperate. Take your time, and study the documentation for System.Diagnostics.Process. If you see 10 posts below, someone has posted code using this method to start WinRar. It is more gratifying when you find the answer yourself than when someone else does it for you.
The key to knowledge is not to rely on people to teach you it.
|
|
|
|
|
Hi,
I want to convert PDF file to Tiff.
It may have multipage also.
Kindly provide me some information.
I want to do in console appilcation,
so if any idea about any code then please help me.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
|
Hi,
have googled it lot but not get anything.
so trying something else.
If getting any help from you guys then thanks.
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
i refer to this book-'visual c# 2005 how to program'(pearson international edition)
//the program to loads data for the rows with the specified last name into the addressbookDataSet.Address table
private void findButton_Click(object sender, EventArgs e)
{
//fill the DataSet's DataTable with only rows containing the user-specified last name
addressTableAdapter.FillByLastName(addressBookDataSet.Address, findTextBox.Text);
}
but when i implement this coding to my program error happens:
private void enterButton_Click(object sender, EventArgs e)
{
this.rEGISTERTableAdapter.FillByRFID(this.rFIDdbDataSet.REGISTER, this.rfidTextBox.Text);
}
it said:-Error-1 No overload for method 'FillByRFID' takes '2' arguments
I've already added query to the table adapter using the instruction in the book,i really don't understand why this error happens
|
|
|
|
|
Intellisense will tell you how many arguments it should be expecting. What does it say ?
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 )
|
|
|
|
|
how to use the intellisense?
|
|
|
|
|
It just happens. Hit the comma and it will pop up and show you the method signature. Even when you type the opening brackets, it should appear. You can also right click and choose 'go to definition'
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 )
|
|
|
|
|
this appear when i hit the comma
->int REGISTERTableAdapter.FillByR(RFIDdbDataSet.REGISTERDataTable dataTable)
|
|
|
|