Posts
[VC.NET] 如何修復 quot;C2039: lsquo;GetCurrentDirectoryA()rsquo; : is Not a Member of lsquo;System::IO::Directoryrsquo;quot;問題
int main(array<System::String ^> ^args) { Console::WriteLine(L"Dir: “+System::IO::Directory::GetCurrentDirectory()); // Error! return 0; } #undef GetCurrentDirectory
int main(array<System::String ^> ^args) { Console::WriteLine(L"Dir: “+System::IO::Directory::GetCurrentDirectory()); return 0; }
read morePosts
[C#]使用GetSystemPowerStatus API查看目前電源使用狀態
<td valign="top" width="499">表示目前充電狀態。 <br />1為High(66%以上電力)、2為Low(33%以上電力)、4為Critical(5%以下電力)、8為Charging、128為NoBattery、255為UnKnow</td> </tr> <tr> <td valign="top" width="200">BatteryFullLifeTime</td> <td valign="top" width="499">表示充滿電力可使用多久時間(-1為不詳)。</td> </tr> <tr> <td valign="top" width="200">BatteryLifePercent</td> <td valign="top" width="499">表示電力剩餘多少百分比,其正常值為0~100,255為電力不詳。</td> </tr> <tr> <td valign="top" width="200">BatteryLifeTime</td> <td valign="top" width="499">表示剩餘電力可使用多久時間(-1為不詳)。</td> </tr> <tr> <td valign="top" width="200">ACLineStatus</td> <td valign="top" width="499">表示電源狀態。 <br />0為offline、1為online、255為unknow。</td> </tr> namespace Battery { [Flags] public enum BatteryChargeStatus : byte { High = 1, Low = 2, Critical = 4, Charging = 8, NoSystemBattery = 128, Unknown = 255 }
read morePosts
VC.NET Natived Property
int _tmain(int argc, _TCHAR* argv[]) { TestObj obj; obj.m_bIsRunning = true; return 0; }
read morePosts
C++/CLI索引子
int _tmain(int argc, _TCHAR* argv[]) { ArrayClass a; for (int i=0;i<1024;++i){ a[i]=i; } return 0; }
read more