i have created a form and now i want to instanciate it. i do it and then call it as ShowDialog() and i want to catch if it returns dialogresult.ok or dialogresult.cancel...now in the form how do i do it? i tried putting the a command button as a AcceptButton but it still doesnt seem to work..what is the problem?