I have a project that reads domain names from a text file and with a button control it resolve their mx records and IP of mx records.reading small files is easy but when i try to read a large file UI is freezing.

are you reading the file in a method contained in your form class?
When you execute code in the same thread as the UI the UI will pause until the code has finished executing. If the file is taking a while to process your UI will show as "Not Responding" until it is done.
To avoid this problem you will need to move the file operation into its own thread. Take a look at the BackGroundWorker class. It is a handy wrapper around the thread class which will execute a method in its own thread and can report progress/result back to your UI thread without having to manually write the invokes and delegates usually needed.