Cambiar el nombre del thread en curso

2023 vistas

Tendremos que hacer un Import System.Threading

Para cambiar el nombre del thread en curso tendremos que hacer lo siguiente:



vbnet
  1. Thread.CurrentThread.Name = "MainThread"



Damos el nombre "MainThread" al thread.

Si queremos realizar ésto para el thread principal, entonces tendremos que añadir esta línea antes de "Application.Run" .