The OpenFileDialog object interacts with the Computer's API (Application Programming Interface) to present available files to the user and retrieves the user's file selection back to the program. This object is part of the System.Windows.Forms library so no additional using reference will be needed.
This dialog can be customized to show the file type, beginning directory, and the title to be displayed on the dialog itself.
When you limit the file type to just the extension .txt as we did in this sample code, only those particular file types will be visible to the user although they do have the option to select All files (*) as well.
">
nishant ranjanPosted Mar 29, 2012, 6:13 AM
SenthilkumarPosted Mar 29, 2012, 5:59 AM
If you want to start as new line then you need to give the \r\n.
There is no margin, but you can give the empty space length which you want.