Your question is not clear.
1. What does "I tried it but I may not get the solution." mean, exactly? What happened?
2. In your second Form Form2, the lines:
Form1 f1=new Form1();
f1.close();
do exactly what you are telling them to do. The first line creates a new instance of
Form1
(it does not reference the original Form1, as you seem to think). The second one simply closes this new instance.
If
Form1
is the first form that loads when your application starts then you cannot close it. If you do, then the application also closes because when the first Form closes program flow returns to the method that called it and continues there. This would be fine but the call to Form1 is the last statement so there's nothing else to do and the app closes.
This whole thing would be easier to discuss if you used sensible names for your controls (Forms). For example give them names that represent what they do. Form1 could be renamed to 'MainForm' and Form2 as 'AddressForm', if it was for entering addresses.
However, what I suspect that you are trying to do is have a login form and then a main form, in which case they should be Form1 as 'LoginForm' and Form2 as 'MainForm'. If this is correct then, firstly you should have searched this forum for "login form" before asking (you would have found loads of answers) and secondly you should have described it properly in your question.
If this is a Login Form problem then follow the links in
Login form [
^].