|
I found reson of error and handle it at last.
this was because i new another form in this form and don't using them,i think this resource that don't be free occured problems.
however i solved this finally.thanks for your attention.
|
|
|
|
|
Hi, I have a class running on a secondary thread that listens to an IRC channel (don't worry if you aren't familiar with IRC, all this code is working), and fires an event when it receives a message, passing on this message on.
The problem is that I need the main thread to do all the business once a message is received. Attaching events in the normal manner causes the code fired by the event to be run on the secondary thread, which is not good.
So basically; how can I attach an event handler that runs on my main thread to events fired on a secondary thread?
Hope that all makes sense, I have done lots of searching but cannot find what I'm looking for, this is partly because I'm not really sure what I am looking for, as I am totally stuck.
thanks
Martin
|
|
|
|
|
AFAIK there's no other way than doing the following inside each event handler.
private void _Click(object sender, EventArgs e)
{
if (this.InvokeRequired)
{
this.Invoke(new EventHandler(this._Click), new object[] { sender, e });
return;
}
}
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
www.troschuetz.de
|
|
|
|
|
ahh that's great, works a treat, thanks.
|
|
|
|
|
Hi All
Is it possible to have mulitple column data displayed in a tree view control?
If yes, can you let me know how we can do it.
eg
+ Great Britian| Country | 32
- India | Country | 91
Bangalore | City | 560000
Mumbai | City | 440000
- America | Country | 21
New York | City | 2423612
Washinton | City | 4572125
+ Japan | Country | 23
Thanks in advance for any advice
PS: Please ignore if it has taken duplicate post. I was getting error while posting it.
Regards,
Kais
|
|
|
|
|
Kais4U wrote: Is it possible to have mulitple column data displayed in a tree view control?
No, but you can use an Owner Draw ListView control to render the "Tree" construct in the left column of the ListView when in Report View.
|
|
|
|
|
how i will use Crystal Report 10 in Visual Studio 2005 Express Edition using C#?
|
|
|
|
|
Hi All
Is it possible to have mulitple column data displayed in a tree view control?
If yes, can you let me know how we can do it.
eg
+ Great Britian| Country | 32
- India | Country | 91
Bangalore | City | 560000
Mumbai | City | 440000
- America | Country | 21
New York | City | 2423612
Washinton | City | 4572125
+ Japan | Country | 23
Thanks in advance for any advice
Regards,
Kais
|
|
|
|
|
|
I saw many problems with that implementation. In VS2005 they exposed the "OwnerDraw" of the ListView control so it is relatively simple to do your own.
|
|
|
|
|
Well lads how are things,
I have a question about the RijndaelManaged class in C#. I am using it and everything is ok. However I spotted on some message board that another lad was using it and he said that he did a Microsoft security update and could no longer decrypt his old data previous to the update, but anything encrypted/decrypted post update was ok. Has anyone ever heard of this problem? I would have thought that the AES standard is independant of any such changes and that once you have key and IV your sorted. However, the possibility of this happening to me is so serious that I have to investigate this. Thanks for any help in advance,
|
|
|
|
|
Hi,
How can converty the FieldInfo to Dictionary ?
my code :
fieldInfo = this.GetType().GetField("dictionary1");
Dictionary<string, string=""> dic2 = (Dictionary<string, string="">)fieldInfo;
The second line is wrong.
Thanks
Wilson
|
|
|
|
|
Hi,
assuming your field is really of type Dictionary then:
Dictionary dic2 = (Dictionary)fieldInfo.GetValue(this)
|
|
|
|
|
|
Hi everyone
i have a assigment, at that exercise, my teacher asked me that, when my teacher put a new picture, a new program allow him to divide it into many parts as he wants, each part he can assign index for them. affter that, that image is posted into Web. If he press on any part, it imediately is link to another image or another link.
Please help me.
superdragon
|
|
|
|
|
Hi, I wonder if anyone could advise what is involved in inheriting a class from a different assembly (and namespace)?
am I right to think I need to:-
1) Set a reference to the assembly containing the class I want to inherit.
2) include a 'using' statement, refering to the namespace of the class I want to inherit.
And that's it. I can now inherit the class. am I missing anything?
Thanks for your assistance
|
|
|
|
|
there are two steps as under :
1) include the reference of the dll file in your project.
2) write using statement for the namespace in which your class exists.
I think you are doing the right thing.
|
|
|
|
|
|
hi,
please let we know how to shutdown a remote computer by knowing its ip address using c#.
I am new to remote access.
can we use RPC here.?
how to use RPC in .net?
thanks,
sangitaraj
|
|
|
|
|
hello,
can anybody please help me.
thanks,
sangitaraj
|
|
|
|
|
I just only forbid contextmenu in mshtml control. The HtmlDocumentClass containt the event of HTMLDocumentEvents2_Event_oncontextmenu,so I write the code below ------------------------------------------
doc.HTMLDocumentEvents2_Event_oncontextmenu+=new mshtml.HTMLDocumentEvents2_oncontextmenuEventHandler(doc_HTMLDocumentEvents2_Event_oncontextmenu);
private bool doc_HTMLDocumentEvents2_Event_oncontextmenu(mshtml.IHTMLEventObj pEvtObj)
{
return false;
}
//
------------------------------------------------------
But the editor,mshtml control can not edit when the property of designMode is 'On' using keyboard.
Can you tell me why? And how to deal with the error? Thank you very!
|
|
|
|
|
I have 4 layers of control here.
First: a splitpanel
Second: a tabcontrol on a splitpanel
Third: a tabpage on a tabcontrol
Fourth: a tabpage_panel on a tabpage (for text painting)
The scrolling doesn't work properly until the splitpanel, the tabpage and the tabpage_panel are all set to autoscrollable. Though it works properly, it is not desirable as there are 2 set of scrollbars and I have to scroll through them all in order to reach the bottom of the page. ie. scroll down the scrollbar of the tabpage_panel but there are still text outside the visible area. Then I have to scroll down the scrollbar of the splitpanel to reach the very bottom.
Can anyone help? It's desirable to have only one set of those scrollbars.
|
|
|
|
|
what is the difference between DataSet and DataTable in C# using ADO.Net?
|
|
|
|
|
A dataset is a collection of datatables.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
-- modified at 3:47 Thursday 22nd June, 2006
|
|
|
|
|
dataset in addition to datatable collection can hold many other collections e.g. views, relationships, constraints etc. Dataset is basically a cache copy of your database. I hope it clears your doubt.
|
|
|
|