Advertisement
shy327

what can be the error?

Mar 4th, 2015
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.79 KB | None | 0 0
  1.  using System;
  2.  using System.Collections.Generic;
  3.  using System.Linq;
  4.  using System.Text;
  5.  using System.Threading.Tasks;
  6.  using System.Windows.Forms;
  7.  
  8.  namespace ConsoleApplication2
  9.  {
  10.      class Program
  11.      {
  12.          static void Main(string args)
  13.          {
  14.              string TheFormText;
  15.              string TheFormName;
  16.              string TheFormTag;
  17.              Form activeForm = Form.ActiveForm;
  18.              TheFormText = activeForm.ActiveMdiChild.Text.ToString();      
  19.              TheFormName = activeForm.ActiveMdiChild.Name.ToString();
  20.              try
  21.              {
  22.                  TheFormTag = activeForm.ActiveMdiChild.Tag.ToString();
  23.              }
  24.              catch
  25.              {
  26.                  TheFormTag = "<none>";
  27.              }
  28.          }
  29.      }
  30.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement