Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Kako da dovedem formu u fokus?

[es] :: .NET :: Kako da dovedem formu u fokus?

[ Pregleda: 769 | Odgovora: 5 ]

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

Burgos
Zrenjanin

Član broj: 12484
Poruke: 1247
*.smin.sezampro.yu.

ICQ: 290190857
Sajt: www.last.fm/user/Burgos


Profil

icon Kako da dovedem formu u fokus?04.09.2004. u 23:27

Kako da klikom na ikonicu u SysTray-u, dovedem formu na prvo mesto jer je forma ostala iza nekih drugih, recimo Mozille?


"Don't you worry about wikipedia, we'll change it when we get home... We'll change a lot of things..."
Homer J. Simpson
Ovo mora u potpis:
"Portability is for people who cannot write new programs" Linus T.
04.09.2004. u 23:27 

Burgos
Zrenjanin

Član broj: 12484
Poruke: 1247
*.proxy.astra-net.com

ICQ: 290190857
Sajt: www.last.fm/user/Burgos


Profil

icon Re: Kako da dovedem formu u fokus?05.09.2004. u 10:54
Mozda nisam bio precizan: Hocu formu da BringToFront.
"Don't you worry about wikipedia, we'll change it when we get home... We'll change a lot of things..."
Homer J. Simpson
Ovo mora u potpis:
"Portability is for people who cannot write new programs" Linus T.
05.09.2004. u 10:54 

Burgos
Zrenjanin

Član broj: 12484
Poruke: 1247
*.proxy.astra-net.com

ICQ: 290190857
Sajt: www.last.fm/user/Burgos


Profil

icon Re: Kako da dovedem formu u fokus?05.09.2004. u 11:37
Resio sam:
Code:
    
    void notifyIcon1Click(object sender, System.EventArgs e)
        {    
            this.Activate();
        }


"Don't you worry about wikipedia, we'll change it when we get home... We'll change a lot of things..."
Homer J. Simpson
Ovo mora u potpis:
"Portability is for people who cannot write new programs" Linus T.
05.09.2004. u 11:37 

havramm
Miroslav Havram
Software Developer / Engineer
Beograd

Član broj: 4603
Poruke: 255
212.62.55.*



Profil

icon Re: Kako da dovedem formu u fokus?05.09.2004. u 11:44
Deklarisi sledecu funkciju:

Code:
[DllImport("user32.dll")]
public static extern bool SetForegroundWindow(IntPtr hWnd);


A onda u, recimo, DoubleClick event handler-u za NotifyIcon uradi sledece:

Code:
SetForegroundWindow(this.Handle);


Gde je this referenca na formu;
If it's a girl then they're gonna call it Sigourney, after an actress. If it's a boy, then they're gonna call it Rodney, after Dave!
05.09.2004. u 11:44 

havramm
Miroslav Havram
Software Developer / Engineer
Beograd

Član broj: 4603
Poruke: 255
212.62.55.*



Profil

icon Re: Kako da dovedem formu u fokus?05.09.2004. u 11:46
Citat:
havramm: Deklarisi sledecu funkciju: ...

Sto prosto kad moze kompikovano... (odnosi se na mene, naravno...)

Dok sam ja pisao odgovor, on resio...
If it's a girl then they're gonna call it Sigourney, after an actress. If it's a boy, then they're gonna call it Rodney, after Dave!
05.09.2004. u 11:46 

Burgos
Zrenjanin

Član broj: 12484
Poruke: 1247
*.proxy.astra-net.com

ICQ: 290190857
Sajt: www.last.fm/user/Burgos


Profil

icon Re: Kako da dovedem formu u fokus?05.09.2004. u 12:47
Da, u pravu si moze i tako .
"Don't you worry about wikipedia, we'll change it when we get home... We'll change a lot of things..."
Homer J. Simpson
Ovo mora u potpis:
"Portability is for people who cannot write new programs" Linus T.
05.09.2004. u 12:47 

[es] :: .NET :: Kako da dovedem formu u fokus?

[ Pregleda: 769 | Odgovora: 5 ]

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.