本文整理汇总了C#中Form2.Activate方法的典型用法代码示例。如果您正苦于以下问题:C# Form2.Activate方法的具体用法?C# Form2.Activate怎么用?C# Form2.Activate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Form2
的用法示例。
在下文中一共展示了Form2.Activate方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ecranBleu
public void ecranBleu()
{
Form2 bsod = new Form2();
Cursor.Hide();
bsod.Show();
bsod.Activate();
}
示例2: barButtonItemTest_ItemClick
private void barButtonItemTest_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
try
{
FormGenConfigClass frm = new FormGenConfigClass();
frm.MdiParent = this;
frm.Show();
Form1 frm2 = new Form1();
frm2.MdiParent = this;
frm2.Show();
Form2 frm22 = new Form2();
if (frm22.IsMdiContainer)
{
frm22.IsMdiContainer = false;
frm22.MdiParent = this;
}
else
{
frm22.MdiParent = this;
}
frm22.StartPosition = FormStartPosition.CenterScreen;
frm22.Show();
frm22.Activate();
UserControl1 cl = new UserControl1();
Form1 frm211 = new Form1();
frm211.Controls.Add(cl);
frm211.IsMdiContainer = false;
frm211.MdiParent = this;
frm211.Show();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
示例3: TryToConnect
public void TryToConnect()
{
// Start Running
StartProgressBar();
tsslP.Text = "Initalize...";
//initalize
// Start the listener thread
Thread oThread = new Thread(new ThreadStart(listener));
oThread.Start();
//Creates Connection to the local DB
if (m_houseID != 0 && m_user != null && !m_connected)
{
this.isActive = false;
// try to connect
Form2 f = new Form2(this);
f.Activate();
f.Show();
}
if (m_connected)
{
allDeviceInHouseDetailesProcTableAdapter.Fill(smarthousedbDataSet.allDeviceInHouseDetailesProc, m_houseID);
tsslTD.Text = "Login Time: " + DateTime.Now.ToString("HH:mm:ss tt");
tsslP.Text = "Ready";
}
else
{
tsslTD.Text = "Failed to Login connection is lost: " + DateTime.Now.ToString("HH:mm:ss tt");
tsslP.Text = "Error";
}
StopProgressBar();
}
示例4: setSailEnterPortToolStripMenuItem_Click
private void setSailEnterPortToolStripMenuItem_Click(object sender, EventArgs e)
{
Form2 f = new Form2();
f.Show();
f.Activate();
f.move(connection);
}
示例5: button3_Click
private void button3_Click(object sender, EventArgs e)
{
if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
{
string[] files = Directory.GetFiles(folderBrowserDialog1.SelectedPath);
string foundPath = "";
foreach (string sFile in files)
{
if (sFile.Substring(sFile.Length - 6) == "_0.!mv")
{
foundPath = sFile;
break;
}
}
if (foundPath == "")
{
MessageBox.Show("在选择的目录下未能找到所需要的文件!", "错误");
}
else
{
Hide();
Form2 frm2 = new Form2(this, foundPath);
frm2.Show();
frm2.Activate();
}
}
}
示例6: button1_Click
private void button1_Click(object sender, EventArgs e)
{
int idx=(int)listBox1.SelectedIndex;
//MessageBox.Show((string)foundFiles[i]);
if (idx < 0)
{
MessageBox.Show("请从列表中选择一项再继续!", "无效操作");
return;
}
Hide();
Form2 frm2 = new Form2(this, (string)foundFiles[idx]);
//frm2.
frm2.Show();
frm2.Activate();
}
示例7: SubtitlesButton_Click
private void SubtitlesButton_Click(object sender, EventArgs e)
{
form_subtitle = new Form2();
form_subtitle.Activate();
form_subtitle.Show();
}
示例8: toolStripMenuItem6_Click
private void toolStripMenuItem6_Click(object sender, EventArgs e)
{
this.isActive = false;
// Open connection
Form2 login = new Form2(this);
login.Activate();
login.Show();
// while (!this.isActive)
// { }
}