joven Posted May 12, 2009 at 01:37 PM Report #263382 Posted May 12, 2009 at 01:37 PM Boas Estou a tentar por na minha aplicação NotifyIcon e já consegui por. A minha ideia é alterar o icon durante o programa, mas obriga-me a ter os icons na mesma pasta que o exe.` Há alguma maneira para ter os icons dentro do exe e chama-los sem ter que fazer notifyIcon1.Icon = new Icon("*.ico") ? Obrigado
Betovsky Posted May 12, 2009 at 02:03 PM Report #263396 Posted May 12, 2009 at 02:03 PM Podes ter as imagens no Resources. "Give a man a fish and he will eat for a day; Teach a man to fish and he will eat for a lifetime. The moral? READ THE MANUAL !" Sign on a computer system consultant's desk
joven Posted May 12, 2009 at 02:17 PM Author Report #263411 Posted May 12, 2009 at 02:17 PM como posso fazer isso? ? eu já adicionei os ficheiros dos icons ao projecto Obrigado
Betovsky Posted May 12, 2009 at 03:13 PM Report #263436 Posted May 12, 2009 at 03:13 PM Se fores ver pelo Solution Explorer, irás ter uma coisa de nome Resources.resx. Abres isso e irá aparecer uma janela, se reparares tens opção de adicionar vários tipos, um deles imagens. "Give a man a fish and he will eat for a day; Teach a man to fish and he will eat for a lifetime. The moral? READ THE MANUAL !" Sign on a computer system consultant's desk
joven Posted May 12, 2009 at 03:33 PM Author Report #263444 Posted May 12, 2009 at 03:33 PM certo, e como depois os chamo?
Betovsky Posted May 12, 2009 at 03:39 PM Report #263451 Posted May 12, 2009 at 03:39 PM Resources.(nome do icon que deste nos resources); Atenção que precisas de adicionar o namespace no inicio do código. Presumindo que o teu projecto tem de nome MeuProjecto, deverá ser algo do género: using MeuProjecto.Properties; "Give a man a fish and he will eat for a day; Teach a man to fish and he will eat for a lifetime. The moral? READ THE MANUAL !" Sign on a computer system consultant's desk
joven Posted May 12, 2009 at 04:10 PM Author Report #263466 Posted May 12, 2009 at 04:10 PM boas já adiconei no inicio ao workspace. mas quando faço Resources ou Properties.Resources nao aparece o items. só me aparece: -Culture -Equals -ReferenceEquals -ResourceManager tens algum exemplo?
Betovsky Posted May 12, 2009 at 04:22 PM Report #263480 Posted May 12, 2009 at 04:22 PM Hmmm adicionaste o Icon ao Resources.resx? É que basta adicionar, gravar, e deveria aparecer na mesma lista que indicaste. "Give a man a fish and he will eat for a day; Teach a man to fish and he will eat for a lifetime. The moral? READ THE MANUAL !" Sign on a computer system consultant's desk
joven Posted May 12, 2009 at 04:43 PM Author Report #263490 Posted May 12, 2009 at 04:43 PM boas já descobri o erro estava a adicionar aos da form que estava a utilizar e nao ao da propriedade 👍 my bad, sorry
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now