A pseudohandle is a special constant that is interpreted as the current thread handle.
The calling thread can use this handle to specify itself whenever a thread handle is required.This handle has the maximum possible access to the thread object.
The function cannot be used by one thread to create a handle that can be used by other threads to refer to the first thread. The handle is always interpreted as referring to the thread that is using it.
The pseudohandle need not be closed when it is no longer needed. Calling the CloseHandle function with this handle has no effect.
[Visual Basic]
Imports System
Public Class GetNameTest
Enum Colors
Red
Green
Blue
Yellow
End Enum 'Colors
Enum Styles
Plaid
Striped
Tartan
Corduroy
End Enum 'Styles
Public Shared Sub Main()
MessageBox.Show("The 4th value of the Colors Enum is " + [OpenNETCF.Enum].GetName(GetType(Colors), 3))
MessageBox.Show("The 4th value of the Styles Enum is " + [OpenNETCF.Enum].GetName(GetType(Styles), 3))
End Sub 'Main
End Class 'GetNameTest
[C#]
using System;
public class GetNameTest
{
enum Colors { Red, Green, Blue, Yellow };
enum Styles { Plaid, Striped, Tartan, Corduroy };
public static void Main()
{
MessageBox.Show("The 4th value of the Colors Enum is " + OpenNETCF.Enum.GetName(typeof(Colors), 3));
MessageBox.Show("The 4th value of the Styles Enum is " + OpenNETCF.Enum.GetName(typeof(Styles), 3));
}
}
[Visual Basic]
Dim thisDOW As New DayOfWeek
For Each thisDOW In OpenNETCF.Enum.GetValues(Type.GetType("System.DayOfWeek"))
ComboBox1.Items.Add(thisDOW)
Next
[C#]
foreach(DayOfWeek thisdow in OpenNETCF.Enum.GetValues(typeof(DayOfWeek)))
{
comboBox1.Items.Add(thisdow);
}NoteIf AutoReset is false, the Start method must be called in order to start the count again.
If Device.Win32Library("coredll").HasMethod("FindWindow") Then
NativeMethods.FindWindow("MyWindowName", String.Empty)
End If
if (Device.Win32Library("coredll").HasMethod("FindWindow")
{
NativeMethods.FindWindow("MyWindowName", String.Empty);
}