TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ahmed salah
NA
530
149.8k
if file exist open new form problem
Jan 25 2017 11:55 AM
I work in c# visual studio 2015 windows form
I have two forms
CreateDatabase Form
Form1 form
I need when open my application to check IF Excel file exist or not
IF Excel file not exist go to form CreateDatabase Form if excel file not exist
And
IF excel file database exist before open form1
How to do that please
what i try as following :
in form1 load event i write following code
CreateDatabase frm =
new
CreateDatabase();
var fileName =
string
.Format(
"{0}\\Book3105.xlsx"
, Directory.GetCurrentDirectory());
if
(!File.Exists(fileName))
{
Form1 frm1 =
new
Form1();
frm.Show();
frm1.Hide();
}
else
{
frm.Hide();
this
.Show();
}
Reply
Answers (
4
)
How to create more sheet then return message box success
Any website or doc with CRM Plugins examples?