An object-oriented programming language developed by Microsoft that can be used in .NET.
Place it in a code module in your project and use it from there.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello experts,
Any idea why this public function is not accessible in other forms?
Public Declare Function SetThreadExecutionState Lib "kernel32" (ByVal esFlags As EXECUTION_STATE) As EXECUTION_STATE
Public Enum EXECUTION_STATE
ES_AWAYMODE_REQUIRED = &H40
ES_SYSTEM_REQUIRED = &H1
ES_DISPLAY_REQUIRED = &H2
ES_CONTINUOUS = &H80000000
End Enum
So this usage is OK?
Form1.SetThreadExecutionState(Form1.EXECUTION_STATE.ES_CONTINUOUS)
or it's better to use the whole above code as private in each form?
Thanks :)
An object-oriented programming language developed by Microsoft that can be used in .NET.
Answer accepted by question author
Place it in a code module in your project and use it from there.