Discussion Locked
0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How do I get my own Task ID in VB6. (I know I can use Shell to start and retrieve one, I just want my own!)
1 reply
Um... "Task ID"?
App.ThreadID returns the thread ID.
App.hInstance returns the instance handle. (Not very useful in Win32 - See Dan Appleman's "Visual Basic Programmer's Giude to the Win32 API", page 1104.)
If you mean the Process ID (as shown in Task Manager, and as used by the kill command at a command prompt), then declare the following API call...
Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
...(note this may have wrapped in your browser window), and call it thus...
LabelPID.Caption = Str(GetCurrentProcessId())
- Cheers,
Chuck Somerville, Dayton Ohio
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending
Discussion Locked
What Makes a Business Website Effective in 2026
1 helpful
10 replies
Question
Windows and macOS computers becoming slow or unstable after updates - what should I check first
0 helpful
1 reply
1 helpful
3 replies
Discussion
Optimizing WordPress widgets and DOM size
0 helpful
3 replies
Discussion Locked
Best Ways to Improve Website Visibility
0 helpful
5 replies