[ERROR]Error creating window handle.

[ERROR]Error creating window handle.

最近有個客戶使用系統時,發生「Error creating window handle.」的錯誤,詳細資訊如下,

at System.Windows.Forms.NativeWindow.CreateHandle  <System.ComponentModel.Win32Exception>
Error creating window handle. 
   at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
   at System.Windows.Forms.Control.CreateHandle()
   at System.Windows.Forms.Form.CreateHandle()
   at System.Windows.Forms.Control.get_Handle()
   at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
   at System.Windows.Forms.Control.Show()

 

有找到Microsoft Support「每個處理序的最大的 NT 使用者控點是在 Windows XP 中的 10000」。

修正方式如下,

必須建立或修改下列登錄值以指定您想要允許的 NT 使用者控點的數目。最大數目是 18,000。
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Windows\USERProcessHandleQuota

HKLM\Software\Microsoft\Windows NT\CurrentVersion\Windows\USERPostMessageLimit(REG_DWORD)

 

所以就請客戶新增或修改機碼的設定值,改成18,000,再觀察是否還會發生那個錯誤。

有其他狀況,再上來更新。

Hi, 

亂馬客Blog已移到了 「亂馬客​ : Re:從零開始的軟體開發生活

請大家繼續支持 ^_^