on 02-08-2005 8:07 AM
What is the recommended technique for developing an add-on, which does not open any additional window when it is started from the add-on manager? I use C# with Visual Studio.NET where I created a dotnet form to keep the add-on live. I tried to make this dotnet form invisible (hidden) but it did not work.
Any hints would be highly appreciated.
Thanks,
Miki
Hi Miklos,
I have use this technique for starting my add-ons, no windows form is used:
public class RunClass
{
public RunClass()
{
}
public static void Main(string[] args)
{
MyNewAddOn Addon = new MyNewAddOn();
Application.Run();
}
}
On the properties page of your project you need to change the startup object to the RunClass.
Regards, Lita
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Miklos,
I have made several addons hidding the main form, and allways worked for me (VB.Net). Could you post the code you are using?
Regards,
Ibai Peñ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
public class BxUIHelloAddOnForm :
..System.Windows.Forms.Form {
.....
..private void OnLoad(object sender,System.EventArgs e) {
....try {
......new BxUIHelloAddOn();
......this.Hide();
......this.SetVisibleCore(false);
....} catch(Exception ex) {
......Debug.WriteLine(ex);
..}
..static void Main(string[] args) {
....Application.Run(new BxUIHelloAddOnForm());
..}
}
Why do you think the form is not hidden?
Mybe application main forms cannot be made hidden in C#?
Thank you,
Miki
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.