Hi Jorge,
   
   Try this:
  One solution is: you define in your form the method:
   
  void setFormModal(int _thisHWND, boolean _bModal)
  {
      DLL             _winApiDLL;
      DLLFunction     _EnabledWindow;
      DLLFunction     _getTop;
      DLLFunction     _getNext;
      DLLFunction     _getParent;
   
      void local_enableWHND(int _lHWND)
      {
          int lnextWnd;
   
          lnextWnd = _getTop.call(_getParent.call(_lHWND));
   
          while (lnextWnd)
          {
             if (lnextWnd != _lHWND)
                  _enabledWindow.call(lnextWnd, (!_bModal));
   
              lnextWnd =  _getNext.call(lnextWnd, 2);
          }
      }
      ;
      _winApiDLL              = new DLL('user32');
      _getNext                = new DLLFunction(_winApiDLL, 
"GetWindow");
      _EnabledWindow          = new DLLFunction(_winApiDLL, 
"EnableWindow");
      _getTop                 = new DLLFunction(_winApiDLL, 
"GetTopWindow");
      _getParent              = new DLLFunction(_winApiDLL, 
"GetParent");
   
      _getParent.returns(ExtTypes:: DWORD);
      _getParent.arg(ExtTypes:: DWORD);
   
      _EnabledWindow.returns(ExtTypes:: DWORD);
      _EnabledWindow.arg(ExtTypes:: DWORD, ExtTypes:: DWORD);
   
      _getTop.returns(ExtTypes:: DWORD);
      _getTop.arg(ExtTypes:: DWORD);
   
      _getNext.returns(ExtTypes:: DWORD);
      _getNext.arg(ExtTypes:: DWORD, ExtTypes:: DWORD);
   
      local_enableWHND(_thisHWND);
   
      local_enableWHND(_getParent.call(_thisHWND));
  }
   
   
   
  Call this function in run:
   
  public void run()
  {
      super();
   
      this.setFormModal(this.hWnd(), true);
  }
   
   
  and in method close : 
   
  public void close()
  {
      super();
   
      this.setFormModal(this.hWnd(), false);
    }
   
  Hope this will fix your issue.
   
  Abdul

Varden Morris <[EMAIL PROTECTED]> wrote:
          My mistake. This only makes the form stay on top. This may not be the 
solution you are looking for.

Regards,

Varden Morris 

85 Saddleland Close N.E. 
Calgary, Alberta T3J 5J5 
Canada 

(403) 366-8434 (H) 
(403) 615-1604 (C)
[EMAIL PROTECTED]



----- Original Message ----
From: Varden Morris <[EMAIL PROTECTED]>
To: Axapta-Knowledge-Village@yahoogroups.com
Sent: Monday, February 5, 2007 4:48:07 PM
Subject: Re: [Axapta-Knowledge-Village] Locking forms in Axapta 3.0 SP4

On the Design node of the form, change the WindowType property to the value 
popup. This will make the form modal.

Varden Morris 

85 Saddleland Close N.E. 
Calgary, Alberta T3J 5J5 
Canada 

(403) 366-8434 (H) 
(403) 615-1604 (C)
[EMAIL PROTECTED] com

----- Original Message ----
From: Jorge HS <[EMAIL PROTECTED] com.ar>
To: Axapta-Knowledge- [EMAIL PROTECTED] ups.com; Axapta_Documentatio [EMAIL 
PROTECTED] com; 4AxaptaProfessional [EMAIL PROTECTED] com; development- [EMAIL 
PROTECTED] ps.com
Sent: Monday, February 5, 2007 7:59:10 AM
Subject: [Axapta-Knowledge- Village] Locking forms in Axapta 3.0 SP4

Hello everybody,

I'm opening a Form from a Class, and I need lock all anothers forms that are 
opened. Then when I close the actually form, unlock all anothers forms.

That I need do is the same that happen when I call the DialogBox (this function 
open a dialog and lock all the others form that are opened, and when this 
dialog is close, the others forms are unlocked).

I can't use the DialogBox, because I need use a form for data entry.

Somebody know how I can do this??

Thanks in advance to all.

Jorge

------------ --------- --------- ---
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
Probalo ya! 

[Non-text portions of this message have been removed]

____________ _________ _________ _________ _________ _________ _
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail. yahoo.com

[Non-text portions of this message have been removed]

__________________________________________________________
Expecting? Get great news right away with email Auto-Check. 
Try the Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html 

[Non-text portions of this message have been removed]



         

 
---------------------------------
Sucker-punch spam with award-winning protection.
 Try the free Yahoo! Mail Beta.

[Non-text portions of this message have been removed]

Reply via email to