232 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
47
views
Trouble with creating XAML GUI in separate runspace
I'm having an issue getting the following to actually show me the GUI. I just get a bunch of properties output.
Such as :
Commands : System.Management.Automation.PSCommand
Streams ...
1
vote
1
answer
142
views
Is it correct/necessary to use UnsafeStart to launch a second STA thread to avoid UI context in C#?
Context:
My app has a "Paste" feature which triggers a file copy or move operation for copied/cut files. The code that does the eventual IO is a method within a static helper class and is ...
1
vote
1
answer
182
views
How to verify C functions with array parameters using Isabelle
I am using Isabelle to verify a C program. During the verification process, I used the c-parser install-C-file to load the code, but the following issue occurred:
attempt to cause decay to pointer on ...
1
vote
3
answers
237
views
How to make FileSystemWatcher events run in an STA Thread in a console application?
I'm writing a console application that scans a directory for files and uploads the data in them to a database. The files are a proprietary type that require a specific library that requires the ...
5
votes
1
answer
273
views
If a thread has to be STA in Windows, will it work in Linux or MacOS?
Recently I was upgrading a library to use .NET 6 and .NET 7, and there was some code that was setting the apartment state to STA, but I found out that setting the apartment state is a Windows only ...
1
vote
2
answers
701
views
tcl: how to rebuid foreach_in_collection as proc in tcl
for some reason, I need to rebuild foreach_in_collection (SDC command) as "foreach" in tcl.
here's snapshot code:
proc set_disable_timing { argv } { body ... }
proc get_cells { argv } { body ...
-2
votes
3
answers
5k
views
"The calling thread must be STA, because many UI components require this."
I am trying to get a window to open in plain C#.
I've created, for this, a window constructor (SGFWindow) extending the Window class from System.Windows :
namespace SGF
{
public partial class ...
0
votes
1
answer
690
views
How to take a screenshot from a background thread using WinRT?
I'm having issues with WinRT ScreenCapture blocking/freezing my UI.
My app is looping through selected windows and takes a screenshot of each every few seconds.
Every time a screenshot is taken the UI ...
-1
votes
1
answer
171
views
WPF .Net update Progress Bar while loading Classes
I am creating a WPF MVVM Application where I have a Main Window and different Pages displayed in a Frame. I want to add a Loading Screen with a Progress Bar which updates while the Instances for the ...
0
votes
0
answers
215
views
EFCore add-migration error : Error: The calling thread must be STA, because many UI components require this
Error: An error occurred while accessing the Microsoft.Extensions.Hosting services. Continuing without the application service provider. Error: The calling thread must be STA, because many UI ...
0
votes
1
answer
130
views
How to create a STA thread for F# Asynchronous workflow
I am attempting to write a printed form in F# using WPF controls—-and do so in an asynchronous workflow. Being new to this, I can’t figure out how to place the wpf controls, consumed by the F# ...
0
votes
0
answers
1k
views
Catastrophic failure(Exception HRESULT: 0x8000FFFF (E_UNEXPECTED)) while trying to use MS WebView2 in ASP,NET Web API in production environment
I'm getting 'Catastrophic failure(Exception HRESULT: 0x8000FFFF (E_UNEXPECTED))' run-time error while trying to use MS WebView2 in ASP.NET Web API in production environment (Win10, IIS v.20H2 (OS ...
0
votes
2
answers
434
views
Parallel running Progress Bar "Indeterminate" on Login in WPF
Can someone help me on following problem ?
I want to show a "Progress Bar" that is "Indeterminate = TRUE" while the user is connecting to SSH server. If the the connection to the ...
0
votes
0
answers
126
views
Can a WPF Application be hosted on a thread separate from the UI thread?
I'm working on a project to integrate WPF Windows into a large application written in Visual FoxPro. The project has been progressing for a couple of years with success.
One downside to this project ...
0
votes
1
answer
1k
views
What is STA/MTA vs apartments/free threads vs UI threads/worker threads? Why the name changes?
I am reading Inside COM by Dale Rogerson, and it uses the terms apartment threads and free threads to describe the different types of COM threads.
He also clarifies that these correspond directly to ...