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

"Prosledjivanje" forme

[es] :: C/C++ programiranje :: "Prosledjivanje" forme

[ Pregleda: 2096 | Odgovora: 4 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

milan_sr
Milan Savov
Strumica

Član broj: 262218
Poruke: 108
92.55.108.*



+26 Profil

icon "Prosledjivanje" forme18.10.2010. u 08:35 - pre 163 meseci
Imam problem pri prosledjivanje forme(ako smem tako reci). Imam neku login formu kad korisnik se logira odnese ga na neku drugu formu...od tu formu ode na trecu i.t.d. E sad problem je pri zatvaranju celog programa ili pri minimiziranje forme (osim pocetene). Kada se logiram svaka druga forma kada se minimizira ne ode u taskbar nego u levi kosak same aplikacie(forma koja je bila pre te). To sam probao da resim tako sto prethodnu formu stavim na hide a ta sto ide posle otvorim...al to tako ne funkcionise izgleda :). Moze nekakva pomoc
 
Odgovor na temu

X Files
Vladimir Stefanovic
Pozarevac

SuperModerator
Član broj: 15100
Poruke: 4901
212.200.65.*

Jabber: xfiles@elitesecurity.org


+638 Profil

icon Re: "Prosledjivanje" forme18.10.2010. u 09:54 - pre 163 meseci
Skini sa neta:
http://www.frasersoft.net/program/bcbdev.zip
... i procesljaj razne teme, znacice ti jer si se bacio na BCB.

Tebe zanima: faq9.htm

Citat:

Q: Create forms that minimize to the taskbar

Answer:

Many Windows programs create secondary forms that minimize to the taskbar. For example, MS Exchange opens a new window when you read a mail message, and these windows minimize to the taskbar. Netscape creates different windows for its browser, news reader, and mail reader, and each window minimizes to the taskbar. Come to think of it, having forms that minimize to the desktop isn't too useful, and not many apps seem to work that way.

A window will minimize to the taskbar if its extended window style contains the WS_EX_APPWINDOW style. By default, secondary forms do not have this style set. You can make a form minimize to the taskbar by overriding the CreateParams function and altering the extended windows style. Use this code from the secondary form.
void __fastcall TForm2::CreateParams(TCreateParams &Params)
{
TForm::CreateParams(Params);
Params.ExStyle |= WS_EX_APPWINDOW;
}

In addition to making a form minimize to the taskbar, you will also want to change the owner of the secondary form. By owner, I mean the owner window of the form in API terms, not the VCL owner. The hidden application window owns all forms in a C++Builder program. The OS hides all owned windows when their owner window is hidden or minimized. When you create an independent form that minimizes to the taskbar, this behavior will seem awkward. To fix the problem, set the WndParent member of TCreateParams to the result of GetDesktopWindow. This makes the desktop the owner of the form, and prevents the form from being hidden when you minimize the main form of the program.
void __fastcall TForm2::CreateParams(TCreateParams &Params)
{
TForm::CreateParams(Params);
Params.ExStyle |= WS_EX_APPWINDOW;
Params.WndParent = GetDesktopWindow();
}

Remember that changing the WndParent member of CreateParams does not affect who deletes the form object.
...
 
Odgovor na temu

itf
Zagreb

Član broj: 59794
Poruke: 993
161.53.237.*



+9 Profil

icon Re: "Prosledjivanje" forme18.10.2010. u 11:55 - pre 163 meseci
Nakon što se pozove Form1 i nakon što korisnik unese podatke i klikne na ok:

Hide();
Fom2->ShowModal();
Close();
 
Odgovor na temu

milan_sr
Milan Savov
Strumica

Član broj: 262218
Poruke: 108
92.55.108.*



+26 Profil

icon Re: "Prosledjivanje" forme18.10.2010. u 12:48 - pre 163 meseci
Otome sam i ja pricao, ali tako se dobije ovo onda aplikaciju nemas ni u taskbaru. A ovo sto si mi dao XFile javlja gresku... CreateParms(........) is not member of TForm2...
 
Odgovor na temu

X Files
Vladimir Stefanovic
Pozarevac

SuperModerator
Član broj: 15100
Poruke: 4901
212.200.65.*

Jabber: xfiles@elitesecurity.org


+638 Profil

icon Re: "Prosledjivanje" forme18.10.2010. u 13:18 - pre 163 meseci
Citat:
[...] A ovo sto si mi dao XFile javlja gresku... CreateParms(........) is not member of TForm2...

Code:

// ...
// HEADER fajl druge forme
// ...
  protected:
        virtual void __fastcall CreateParams(TCreateParams &Params);
// ...
 
Odgovor na temu

[es] :: C/C++ programiranje :: "Prosledjivanje" forme

[ Pregleda: 2096 | Odgovora: 4 ] > FB > Twit

Postavi temu Odgovori

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