I have done this before, creating a new form at runtime dynamically with code. Make sure you select all the options, especially FormBorderStyle, to no one, or something like that, so that the user cannot close it. Then just manipulate the shortcuts that appear on this form, and finally close them as soon as your process is complete. This way you don't have to worry about streaming usage, and a good side effect is that the original form will not be available.
For example, I have a form that appears at runtime (if I don't change anything, but the idea is:
AboutForm aboutForm = new AboutForm(); aboutForm.StartPosition = FormStartPosition.CenterParent; Label lblAbout = new Label(); Version applicationVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; lblAbout.Text = applicationVersion.ToString(); lblAbout.Location = new Point(145,104); aboutForm.Controls.Add(lblAbout); aboutForm.ShowDialog();
Shows the version number of the current software, etc. There are other labels that already exist on the form (I first rendered it and then called the instance).
Hope this helps!
source share