My problem is that my licensing form doesn't want to disappear when the license is already active on the system, so it does work because it does proceed to the next form, but it it further doesn't hide itself. So nou my login and License form is shown, is here any way someone can help me please?
Problem between ** ** I do believe.
public partial class frmLicensing : Form
{
public static frmLicensing instance;
public frmLicensing()
{
InitializeComponent();
instance = this;
}
private void frmLicensing_Load(object sender, EventArgs e)
{
using (IsolatedStorageFile isolatedStorageFile = IsolatedStorageFile.GetStore(IsolatedStorageScope.User | IsolatedStorageScope.Assembly, null, null))
{
using (IsolatedStorageFileStream isolatedStorageFileStream = new IsolatedStorageFileStream("Setting.txt", System.IO.FileMode.Open, isolatedStorageFile))
{
using (System.IO.StreamReader sr = new System.IO.StreamReader(isolatedStorageFileStream))
{
var Activated = Activation.isactive(sr.ReadLine());
if (!Activated)
{
this.Show();
}
else if(Activated == true)
{
** this.Hide();
FrmLogin form = new FrmLogin();
form.Show(); **
}
}
}
}