Debug error!

albertkhor

Well-known member
Joined
Jan 12, 2006
Messages
150
Programming Experience
Beginner
Sorry wrong type! "Runtime error"
why this error appear? how to solve it?
 

Attachments

  • error.jpg
    error.jpg
    29.9 KB · Views: 114
Seems like you are hitting the windows handle limit?
Win2000 and higher have an (abritrary) limit of about 10 000 handles per process , if I recall correctly.
Are you running on Win98 perhaps? (limit is sometimes as low as two hundred handles).
 
Don Delegate said:
Seems like you are hitting the windows handle limit?
Win2000 and higher have an (abritrary) limit of about 10 000 handles per process , if I recall correctly.
Are you running on Win98 perhaps? (limit is sometimes as low as two hundred handles).

thanks for reply me! i running my system on window xp. this error occur after click few time to other form. how to avoid it?

below is the code which this error occur
VB.NET:
[SIZE=1]
[/SIZE][SIZE=1][COLOR=#0000ff]Private[/COLOR][/SIZE][SIZE=1] [/SIZE][SIZE=1][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=1] ShowForm([/SIZE][SIZE=1][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=1] form [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] Form[/SIZE][SIZE=1])
[/SIZE][SIZE=1]form.ShowDialog()  <---------- error
[/SIZE][SIZE=1][/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1] [/SIZE][SIZE=1][COLOR=#0000ff]If
[/COLOR][/SIZE][SIZE=1][/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1] [/SIZE][SIZE=1][COLOR=#0000ff]Sub
[/COLOR][/SIZE]
 
So far for the hWnd limit.

Is this an MDI form?
Are you sure the form reference is still valid?
Where is this form created?
Do you "reuse" the form, or the form variable?
Where exactly is this code executed? From an eventhandler in another form? From another thread?
 
Don Delegate said:
So far for the hWnd limit.

Is this an MDI form?
Are you sure the form reference is still valid?
Where is this form created?
Do you "reuse" the form, or the form variable?
Where exactly is this code executed? From an eventhandler in another form? From another thread?

all my form is Window Form not Inherited Form.
i'm sure that the form is sill valid and the form can be reuse anytime. this code i put in a library. when i call another form the using form will be disappear until user close the calling form.

my system is like that:
i have 2 form each form also have listview (eg contact form and stock form). my system allow user to add link, let said if customer1 want to order stock, on customer form user can click on link button and select which stock the customer want to take order, same as stock form. Stock form can open customer form to check which customer had order this stock or add customer.

if have any questin please ask me, thanks!
 
Back
Top