Found it :p
Sub main()
Dim frmMain As New main()
If sAM_tray_start = 0 Then
frmMain.Show()
ElseIf sAM_tray_start = 1 Then
frmMain.systray.Visible = True
End If
Application.Run()
End Sub
Thanx a lot :p
And for the closing problem:
Private Sub main_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
End
End Sub
you.someicon.visible = True
Will show the form too!
btw: How kan i work around it?
it only seems to stay in memery when clsoe via the [X] not when usding END in the code, that bring me back, how can i detect that [X] is pushed?
After some playing i found application.run(fomr) works :D
But still can't get the tray to work :(
btw anyid on howto execute code when a form is closed?
ok,
I can see the form for a few sec, when sub main end so does my programm :s
And it says, trayicon.shoc() gives a error, maby becouse it on the form :s
Sub main + Howto Execute code when app is closed
Ok,
How do i use sub main to do:
Check to see if a valeu in the reg is 1 or 0
If it is 0, show a form, if it is 1 then show a notifyicon.
btw: the notify icon is on the form :s
I have a temp fix, but it us irritating that the form flashesa few times befor it disapears :confused: :eek:
btw: you can look at the latest stabel code here:
http://users.skynet.be/jorge/apachemon/apachemon-src.zip
Thanx in advance
http://www.xtremedotnettalk.com/t74721/s.html
Take a look here,
Hehe, works great -> best to make a funtion out of it to trim down the number of line's of code and simply call it.
Cool, got it to work for normal menus in a test project :D
but won't work in as a menu called from a trayicon, you know whats wrong? give's a blanck strip :( ask if you need a screenshot
greets
Jorge
some more questions:
1. How do i add your code to the project?
2. Does it work for a contextmenu when it is link to a tray icon? i get a small strip thats all???
btw: I'm not going to make a setup, they can dowwload the framework form microsoft.com, so they only need one exe.
greets and thanx agen
Ok,
I'l try both,
IF i run into problems i'll let you know.
btw:VF, the one you gave compiles into a dll, and i want only one exe file, But none work when using as a context menu for a trayicon :s.
thanx agen
ok, forget the array, i'll call it evry time with:
Call Colorcoding("AddAltByEncoding", Color.RoyalBlue)
But it there a way to make it case insensitive?