Help!

Hi..im writting a new program but i need some help. Well i want this program to put a notify icon.So when you clik on it the menu appears. I know how to do that. But you see the only way to "communicate" with this program is the notify icon..so i don't want any forms.

I have a form and added the notify icon and a contextMenuStrip. But i don't want this form to be visible. I tried the Me.Visible = false but it's not working. I also tried to start the program from inside a module (Sub Main) and write Form.showdialog but i can't make it invisible after.

Any ideas




Answer this question

Help!

  • Barzot

    Here we go again...

    See this thread for a similar problem:

    http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=778699&SiteID=1

    The simplest thing to do in your case is to add this to your form code:

    Protected Overrides Sub SetVisibleCore(ByVal visible As Boolean)

    End Sub


  • Salman Maredia

    you should be able to make it visible = false. Otherwise try doing Me.Hide() to hide it and Me.Show() to show it. Does this work for you

    You stated by adding Form.ShowDialog() on the sub main() that it won't work, well this is true since you are telling the program to show your form, you dont need to put this code in at all but only either Me.Visible = false or Me.Hide()



  • SParker1

    Ok thank's a lot Mike! Take care.

  • Hassan Ayoub

    Me.Hide is not working too! I tried this also. I read that you should write Form.Visible = False into another form or module otherwise the form won't hide because it still executes the code. That's why i tried it form inside the module. And i used .Showdialog so that the form starts executing the loading code and don't return to Sub Main otherwise the program will terminate.

  • Help!