Property SelectedThread
SelectedThread
Gets a currently selected thread.
[Browsable(false)]
public ThreadInfo SelectedThread { get; }
Property Value
Examples
Here is how to use a SelectedThread in the C# code:
using Alternet.Scripter.Debugger;
using Alternet.Scripter.Debugger.UI;
using System;
public partial class Form1 : Form
{
private Threads threadsControl;
private void Form1_Load(object sender, EventArgs e)
{
var debugger = new ScriptDebugger();
threadsControl = new Threads();
threadsControl.Dock = System.Windows.Forms.DockStyle.Fill;
threadsControl.Debugger = debugger;
}
private void Button_Click(object sender, EventArgs e)
{
var thread = threadsControl.SelectedThread;
System.Windows.Forms.MessageBox.Show(string.Format("file: {0} id: {1}", thread.File, thread.ThreadId));
}
}
Here is how to use a SelectedThread in the Visual Basic code:
Imports Alternet.Scripter.Debugger
Imports Alternet.Scripter.Debugger.UI
Imports System
Partial Public Class Form1
Inherits Form
Private threadsControl As Threads
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim debugger = New ScriptDebugger()
threadsControl = New Threads()
threadsControl.Dock = Windows.Forms.DockStyle.Fill
threadsControl.Debugger = debugger
End Sub
Private Sub Button_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim thread = threadsControl.SelectedThread
Windows.Forms.MessageBox.Show(String.Format("file: {0} id: {1}", thread.File, thread.ThreadId))
End Sub
End Class
Remarks
The SelectedThread property can be changed by clicking on the appropriate thread in the ThreadInfo list displayed by this control.