MyApplication_Startup is not on UI Thread
Open
:books: documentation
area-VisualBasic
- Dominant language
- C#
- Stars
- 4.9k
- Forks
- 1.1k
- Avg merge
- 20h 23m
- Merged PRs (30d)
- 103
Description
* .NET Core Version:
* Have you experienced this same bug with .NET Framework?:
No
**Problem description:**
Runtime error
System.InvalidOperationException: 'Cross-thread operation not valid: Control 'UserName' accessed from a thread other than the thread it was created on.'
**Expected behavior:**
MyApplication_Startup is on UI Thread as it is on Framework
**Minimal repro:**
```VB
Private Sub MyApplication_Startup(sender As Object, e As StartupEventArgs) Handles Me.Startup
' Get the splash screen.
CType(Me.SplashScreen, SplashScreen1).UserName.Text = "Current user: " & User.Name
End Sub
```
Contributor guide
Assessment
This issue has not been assessed yet.