|
Just call a constructor of IPAddress class which accepts byte array.
Simple, isn't is? The only thing you need to do is read documentation
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
There I go trying to over complicate things. I did look through the documentation but I was to busy looking for a way to convert to look at the IPAddress Constructor.
|
|
|
|
|
Create a new instance of System.Net.IPAddress class with System.Net.IPAddress.IPAddress(byte[]) constructor.
|
|
|
|
|
hy everyone!
I do have a problem:
I insert a picture in an application and try to fetch it again with my tool. the strange thing is although i insert 300x300 dpi pics when fetching they are 299x299 dpi.
after fetching they should be converted to a pdf, but it doesn't accept the 299x299 dpi, but it works fine with 300x300 dpi. (it throws an error it can't handle the format because it is unknown)
is there a chance to check this and to correct it to 300 dpi?
to change it to 300 dpi hardcoded isn't a good idea because there could be 600x600 dpi pics as well etc.
but i wonder, where this 1 dpi was lost and why!
anyone of you a clue?
thanks!
stephan.
|
|
|
|
|
You can check/set the DPI within a Graphics object, but I am not sure how you process the image.
|
|
|
|
|
How should I abort a running procedure if it takes longer than 10 seconds?
|
|
|
|
|
By setting a 10 second timer and then changing a flag or something. What are you aborting ? I assume a thread.
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 )
|
|
|
|
|
semiramisContraA wrote: How should I abort a running procedure if it takes longer than 10 seconds?
Since this is in the C# forum I'm guessing you actually mean method rather than procedure. If you do mean procedure (as in a stored procedure) then you should proceed to the SQL Server forum and ask there.
You can run the method in another thread and WaitFor it to return. When you WaitFor it you can set a time out.
|
|
|
|
|
I am trying to call a method of a web service & I want the request to be aborted if the web service takes longer than 10 seconds to answer!
|
|
|
|
|
If you are using a SoapHttpClientProtocol - derived class to invoke the web service you can set the Timeout property of it to 10 seconds.
|
|
|
|
|
I'm using MSXML2.XMLHttpClass. & it doesn't have a timeout attribute
|
|
|
|
|
Friends I want to do the following things in a function.
Forms.frmFIR fr = new uHTMCM.Forms.frmFIR();
fr.show();
where frmFIR is the form name and uHTMCM is the namespace of the project.
what I want is to send the form name and namespace name in that function(suppose the function name is frmshow(takes two parameter)) and do the above two lines in that function. Can any1 help???
|
|
|
|
|
Saiyed Alam,
You dont need to pass anything to the constructor, just add the below lines in the frmFIR, they will give you the details you want.
Class name: System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name;
Namespace name: System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Namespace;
MSDN[^]
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
a) if the form is in the same assembly of your method
Assembly asm = Assembly.GetExecutingAssembly();
Form frmTemp = asm.CreateInstance(Your_Namespace + "." + Your_Form_Name);
frmTemp.Show();
b) if the form to be called in from some other assembly
Assembly asm = Assembly.LoadFrom(AssemblyPath);
Form frmTemp = asm.CreateInstance(Your_Namespace + "." + Your_Form_Name);
frmTemp.Show();
Hope this helps
|
|
|
|
|
u can easily solve ur problem by this way...
at first create a function like:
public void fnFormShow(Form fc)
{
fc.show();
}
now, create a object and pass through with this function, like:
Forms.frmFIR fr = new uHTMCM.Forms.frmFIR();
fnFormShow(fr);
|
|
|
|
|
I need a mechanisme to handle with EXCEL, like creating and reading Excel files. For this, at starting a new C# windows application, I have added COM reference, by using the "AddReference" dialog box's COM tabsheet. In fact there are two smilar object definiton there:
-Microsoft Excel 5.0 Object Library
-Microsoft Excel 11.0 Object Library.
I have chosen the "11.0"; At the and I managed to handle Excel Files as I wish. But, when I run my application at another pc (that is the one of our customer), it causes exceptions. I noticed that my computer Excel versiyon is 11.xxx which corresponds to Excel-2003, whereas our customer has the Excel-2002. The reason seems the version's difference. Right?
Using COM isn't a good idea? Or Which manner I should use for works with Excel Files? Maybe I use the wrong Classes or Interfaces in the COM object. What to do to avoid version differences; at least close to each other versions? Or Should I prepare seperate applications for each version of Excel.?
Thanks to all of you; for help to my this problem and previous ones.
I love CodeProject and you all.
|
|
|
|
|
You may use 11.0 on your development machine and the same can be used on other machines as well (even though these machines have a different version).
To achieve this, you need to late bind the excel object using "CreateObject" method.
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
Hi
I have a server process and client process connected with Named pipes(server is sending message to client).
If the server is already running, I open the client process,only for first time communication is taking place.If I close client process and reopen again, the serverside is throwing exception at WaitForClients method:"Pipe is broken".I need to close and reopen server in order to take place communication again.
I am using NamedpipeServer Stream and NamedpipeClient Stream objects.
What could be the reason???please advise..
Thanks in adcance
|
|
|
|
|
Hi i want to get lots of practice questions for this exam(free).
|
|
|
|
|
Short of piracy you will find that a very difficult thing to achieve. If you are willing to pay for the questions then i would highly recommmend the Transcender practice exams.
Kev
http://esendexdeveloper.spaces.live.com/
|
|
|
|
|
This is why the exam is worthless, and you can expect anyone worth working for, will interview you and work out that you don't have the skills the exam claims to prove.
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 )
|
|
|
|
|
Too bad there aren't too many of the one who's worth working for, though.
|
|
|
|
|
Once again I was successfully demotivated to go for certifications.
|
|
|
|
|
Someone has never implemented Dijkstra Algoritm?
I would want to use it in a program but I have some problem to implement it… Please help me!!!
|
|
|
|
|