Click here to Skip to main content
15,887,450 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I'm using this Move and Resize Controls on a Form at Runtime (With Mouse)[^] for move and resize control runtime.
It's working fine except when cursor crosses border of control(e.g shrinking) it forcefully closes application.

I can not understand where to put exception handling code.

What I have tried:

I've tried putting it in resize method.
Posted
Updated 22-Oct-18 5:51am
Comments
Mehdi Gholam 22-Oct-18 10:15am    
You are probably getting an exception, check the error.
MekVala 22-Oct-18 10:49am    
I'm just getting exception as "Parameter is not valid.". Can you suggest where should I put exception handling code ?
BillWoodruff 23-Oct-18 9:10am    
" except when cursor crosses border of control(e.g shrinking) it forcefully closes application.

exactly what error is thrown ? and where is it thrown ?
MekVala 30-Oct-18 13:28pm    
I've found the solution, It was throwing error on minimum size of textbox. So I Simply added conditions before changing size of control.

1 solution

How about asking this question in the forum at the bottom of the article. That way the author gets notified you have a question about his/her code.
 
Share this answer
 
Comments
MekVala 22-Oct-18 12:21pm    
I did it month ago, but now it's kind of urgent so.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900