|
And what is the exception when it is run standalone? When you run it stand alone is it a debug or release build?
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
Hi
Exception is LoginFailedException and the stand alone program has been built using debug configuration.
|
|
|
|
|
Hi!Friends...Now Im working with datalist.In it I have added only one image button control..how come I knonw which image is clicked in a datalist..please help me firends..
Hi,Im Razana
|
|
|
|
|
winforms or ASP.NET ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi
i used a quicktime object in my project to show 3 file in .mov extention.
my form object is axQTControl1 and one btn to play movie and one btn to set nevt movie url
i set the first clip url in form.load() and play it whitout problem.
when click next clip btn and click play i get the System.AccessViolationException
"System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.AxHost.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageA(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at QuickPlayer.Program.Main() in D:\\MyDoc\\My Project\\Q\\QuickPlayer\\QuickPlayer\\Program.cs:line 24"
please help me.
|
|
|
|
|
|
Good Day Sir/Maam,
<br />
DateTime StartTime = DateTime.Now;<br />
for (int i = 0; i <= List.Length - 2; i++)<br />
{<br />
for (int j = 0; j <= List.Length - 2 - i; j++)<br />
if (List[j + 1] < List[j])<br />
Swap(ref List[j], ref List[j + 1]);<br />
}<br />
DateTime EndTime = DateTime.Now;<br />
TimeSpan Duration = EndTime - StartTime;<br />
This is a bubble sort algorithm, I want to get the total duration of the sorting in Milliseconds. But the sorting was too fast that I got a 0 MS duration.
Can I get the duration in Nanoseconds using Timespan?
|
|
|
|
|
|
Ummmm.. no? It's a limitation of the hardware clock? (Others know more about it than I.)
But I'll add that you probably don't need to write your own sort algorithm (unless it's for a class project or something) because the ones built into .net are probably better than anything you or I could write.
See if something like System.Collections.Generic.List<int> will work for you, it has a Sort() method.
It just won't help you learn how to perform a sort.
|
|
|
|
|
Uhmm. I'm making a Sorting Emulator for educational purposes to present how a sorting algorithm works.
This is a class project for my course Analysis of Algorithms. Hehe.
Anyways, StopWatch class works great. Thanks! 6 ticks = 600 nanoseconds.
|
|
|
|
|
Hi, to see why regular timers dont help you here, you may want to read my timers article.
|
|
|
|
|
Hi,
I want to create an add-in for Visual Studio that : when I right-click on C# document, it will show the context menu strip which has my items in.
Thank a lot
imagic
|
|
|
|
|
I have a problem when reading a Streamreader object into a string:
<br />
private string GetStringFromURL(string url)<br />
{<br />
string strOut = "";<br />
<br />
HttpWebRequest webRequest;<br />
HttpWebResponse webResponse;<br />
Stream responseStream;<br />
webRequest = (HttpWebRequest)WebRequest.Create(url);
webResponse = (HttpWebResponse)webRequest.GetResponse();
responseStream = webResponse.GetResponseStream();
string responseEncoding = webResponse.ContentEncoding.Trim();<br />
if (responseEncoding.Length == 0) responseEncoding = "us-ascii";<br />
StreamReader sr = new StreamReader(responseStream, System.Text.Encoding.GetEncoding(responseEncoding));<br />
<br />
sr.BaseStream.ReadTimeout = 3000;
try<br />
{<br />
strOut = sr.ReadToEnd();<br />
}<br />
catch (WebException ioe)<br />
{<br />
MessageBox.Show(ioe.Message.ToString());<br />
}<br />
<br />
<br />
webResponse.Close();<br />
responseStream.Close();<br />
sr.Close();<br />
<br />
<br />
return strOut;<br />
<br />
}<br />
<br />
The above code doesn't cause the Messagebox to actually pop up. When I pause the code I find it spends alot of it's time in the catch() area though. On closer inspection of the 'sr' object, it seems to have a problem:
<br />
BaseStream = Cannot evaluate expression because a native frame is on top of the call stack.<br />
Is there a way of checking for this error with an 'if' statement so that this process doesn't take so long? (it does eventually time out but this is v. slow. The url I'm reading into the string is:
http://www.atomintersoft.com/products/alive-proxy/proxy-list/?p=4[^]
Any help or advice much appreciated!!
Gerry
|
|
|
|
|
I see that you set the ReadTimeout on the response stream, but that is the timeout for reading data from the stream, not the timeout for ding the request.
Set the Timeout property in the HttpWebRequest object before calling GetResponse .
---
single minded; short sighted; long gone;
|
|
|
|
|
Good Day Sir/Maam,
I have a ListView on my program and it has 3 columns.
I add items in the end of the List. Using .add(); command. But when the list is gets too much item, the vertical scroll bar will activate.
What I want is to FOCUS the ListView on the Last item added. So that the last item will not be hidden from view. (You need to click the vertical scroll bar to view the last item)
Thank you.
|
|
|
|
|
Use EnsureVisible() [^] to ensure a specific item (in your case, the most recently added one) is visible.
/ravi
|
|
|
|
|
Cool. It worked as expected. Thank you sir Rabi!
|
|
|
|
|
Hi Sirs,
I want to know how can we unpack the C# dll files i mean i want to c all the classes in all namespaces like System.IO etc. in java we can easily do it but i don't know how can we do it in .NEt please help me in this regard..
thanx.
Pravo
|
|
|
|
|
Hi,
if you use Visual Studio, once you add a reference to a DLL and the corresponding
"using" statement, Intellisense will show you all available methods, fields, ...
The "Refector" tool by Lutz Roeder[^]
is in many ways similar to the "jad" tool that you are familiar with.
|
|
|
|
|
thanx a lot Luc Pattyn for answering , but actually i want to c the code of the classes in dll like code of Button class and so on so that i can c whats written in it . Same we do in java with javadecompiler, so please let me know how can i do it.
thanx
Pravo
|
|
|
|
|
Hi there, check out the VS addin Reflector, this gives you what you're after
regards
Pete Kane
|
|
|
|
|
sorry I didn't see Luc's post
|
|
|
|
|
Hi,
I got a piece of heavy duty code, which makes my app look frozen.
So i added threads so the GUI stays normal, now i want to add a progressbar.
But i cant call progressbar1.performstep() from the seperate thread,
After some looking i found out that i have to invoke (i think) but i have no idea how to do that,
i found some textbox examples and i just dont get them.
Thanks!
|
|
|
|
|
Hi,
Yes, Invoke() is what you need.
There are many examples in the articles on this site.
For one, look at my Sokoban article (the pasteOneMove method).
|
|
|
|
|
hi sirs n madams
i m very new with c# and want to learn everything ebout it
can u please provide me with some code snippets!!!
|
|
|
|