DialogResultresult=MessageBox.Show("The folder path you have entered doesnt exist, would you like to create it?","Create Folder",MessageBoxButtons.YesNo);
if(result==DialogResult.Yes){
try{Directory.CreateDirectory(folderPath.Text);
}catch{
MessageBox.Show("Error Creating Folder! Please check the path and try agian.","Error creating folder",MessageBoxButtons.OK,MessageBoxIcon.Error);
MessageBox.Show("You cannot have a unified file without some form of compression, please select again.","Compression Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
}
else
{
createRecord();
}
while(this.Size.Height!=299){
initHeight--;
this.Size=newSize(583,initHeight);
Thread.Sleep(10);
}
}
privatevoidcreateRecord()
{
SqlCeConnectionconn=databaseTools.conn;
SqlCeCommandcmd=conn.CreateCommand();
conn.Open();
conn.Close();
MessageBox.Show("Record created successfully!","Success",MessageBoxButtons.OK,MessageBoxIcon.Information);