Click here to Skip to main content
15,888,351 members
Home / Discussions / C#
   

C#

 
GeneralRe: KeyDown for arrows Pin
S O S13-Aug-03 8:27
S O S13-Aug-03 8:27 
GeneralRe: KeyDown for arrows Pin
Nnamdi Onyeyiri13-Aug-03 8:40
Nnamdi Onyeyiri13-Aug-03 8:40 
GeneralRe: KeyDown for arrows Pin
Ista13-Aug-03 13:19
Ista13-Aug-03 13:19 
GeneralRe: KeyDown for arrows Pin
Ista13-Aug-03 13:21
Ista13-Aug-03 13:21 
Generaldatagrid Pin
mdolby13-Aug-03 5:26
mdolby13-Aug-03 5:26 
GeneralRe: datagrid Pin
Ista13-Aug-03 13:24
Ista13-Aug-03 13:24 
GeneralRe: datagrid Pin
Ista13-Aug-03 13:25
Ista13-Aug-03 13:25 
Generalupdating treeview from another thread Pin
Ista13-Aug-03 5:00
Ista13-Aug-03 5:00 
The error:

The action being performed on this control is being called from the wrong thread. You must marshal to the correct thread using Control.Invoke or Control.BeginInvoke to perform this action.

Begin the delegate call:
<br />
		private void Form_QueryOperation_Load(object sender, System.EventArgs e)<br />
		{<br />
			//LoadTreeView();<br />
<br />
			SampleSyncronized sampSyncObj = new SampleSyncronized();<br />
			SampSyncSqrDelegate sampleDelegate = new SampSyncSqrDelegate(sampSyncObj.LoadTreeView);<br />
			IAsyncResult aResult = sampleDelegate.BeginInvoke(tvOperation, null, null);<br />
<br />
			aResult.AsyncWaitHandle.WaitOne();<br />
<br />
			sampleDelegate.EndInvoke(aResult);<br />
<br />
<br />
		}<br />



Updating class
<br />
	// Syncronized class<br />
	[Synchronization()]<br />
	public class SampleSyncronized : ContextBoundObject<br />
	{<br />
		public void LoadTreeView( System.Windows.Forms.TreeView crossTV )<br />
		{<br />
			LoadTreeViewNow(crossTV);<br />
		}<br />
<br />
		private void LoadTreeViewNow(System.Windows.Forms.TreeView tv)<br />
		{<br />
<br />
                    add tree node codew here<br />


how do I catch the current main thread to update the trre view

I'm not an expert yet, but I play one at work. Yeah and here too.
GeneralRe: updating treeview from another thread Pin
Furty13-Aug-03 13:41
Furty13-Aug-03 13:41 
GeneralRe: updating treeview from another thread Pin
Ista14-Aug-03 4:14
Ista14-Aug-03 4:14 
GeneralRe: updating treeview from another thread Pin
Ista14-Aug-03 6:50
Ista14-Aug-03 6:50 
GeneralXPath question Pin
Mazdak13-Aug-03 0:55
Mazdak13-Aug-03 0:55 
GeneralRe: XPath question Pin
Kannan Kalyanaraman13-Aug-03 1:07
Kannan Kalyanaraman13-Aug-03 1:07 
GeneralRe: XPath question Pin
Mazdak13-Aug-03 1:13
Mazdak13-Aug-03 1:13 
GeneralRe: XPath question Pin
Anonymous13-Aug-03 4:42
Anonymous13-Aug-03 4:42 
GeneralRe: XPath question Pin
Arjan Einbu13-Aug-03 5:05
Arjan Einbu13-Aug-03 5:05 
GeneralRe: XPath question Pin
Mazdak13-Aug-03 5:43
Mazdak13-Aug-03 5:43 
GeneralRe: XPath question Pin
Arjan Einbu13-Aug-03 11:51
Arjan Einbu13-Aug-03 11:51 
Generalsimple unicode conversion Pin
Anonymous12-Aug-03 23:53
Anonymous12-Aug-03 23:53 
GeneralRe: simple unicode conversion Pin
Nnamdi Onyeyiri13-Aug-03 0:40
Nnamdi Onyeyiri13-Aug-03 0:40 
GeneralA RAY Pin
eggie512-Aug-03 22:36
eggie512-Aug-03 22:36 
GeneralRe: A RAY Pin
J. Dunlap12-Aug-03 22:54
J. Dunlap12-Aug-03 22:54 
GeneralRe: A RAY Pin
eggie513-Aug-03 13:31
eggie513-Aug-03 13:31 
GeneralRe: A RAY Pin
Nnamdi Onyeyiri13-Aug-03 0:45
Nnamdi Onyeyiri13-Aug-03 0:45 
GeneralRe: A RAY Pin
eggie513-Aug-03 13:31
eggie513-Aug-03 13:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.