| 
		        
                
 
 
	Group: StrataFrame Users 	        
    Posts: 430, 
    Visits: 507 
    
 
          
		     | 
				                       
                 
                
                    
			            I have a form with a SearchTextBox on it, the only purpose of the SearchtextBox is to enter some text, then do a search, and populate other textBoxes on the form when you return from the search----- All working fine. The Search Results in a Grid being displayed, and a record can be selected.
  I have the code to do the search on the SearchTextBox_Leave event. 
  My only probelm is that, if I have focus on the SearchTextBox, and I click on the X of the form to close the form, the Form Closes , but leaves a dangling search Grid on the screen, even though the Form itself is gone at this stage.
  It probably does not matter , but the Grid happens to be a Devexpress grid which I use to do the searching. Is there a way to prevent the Code in the _Leave event from running, as I dont want it to run if the form has been released                
			            				
			                                 
                     
                                            
                         
                    
                  
             |