CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 1999
    Posts
    57

    How to display a Modeless Form ?



    I have a form displayed ( Form 1) . On Right Click I am displaying another form ( Form 2) . Now when I shift my focus to Form1 I want Form2 to remain Visible but not active ( something like Properties Window ) .


    How do I do it ?


    Thanks in advance


    Anand

  2. #2
    Join Date
    Apr 1999
    Posts
    57

    Re: Still problem exists



    Form.Show allows me to specify whether I want Modal or Modeless . But still it doesn't work

    Any Clue ?

  3. #3
    Join Date
    Jan 1999
    Location
    Cairo /egypt
    Posts
    7

    Re: How to display a Modeless Form ?



    Hello ,

    '/**************************************/

    this code display modless form with focus

    1-add module to project


    2-Declare this api function to module


    Public Declare Function BringWindowToTop Lib "user32" (ByVal hwnd As Long) As Long

    '/**************************************/


    3-add this code to command or menue :

    '/**************************************/


    a-

    Private Sub wael()

    ' if you decide to load it without parent

    Form1.Show 0

    BringWindowToTop (Form1.hwnd)

    End Sub

    '/**************************************/

    b-

    Private Sub wael()

    ' if you decide to load it with parent form named MDIForm1

    Form1.Show 0 , MDIForm1

    BringWindowToTop (Form1.hwnd)

    End Sub

    '/**************************************/

    WAEL FAROUK AHMED



  4. #4
    Join Date
    Feb 1999
    Location
    kar,india
    Posts
    12

    Re: How to display a Modeless Form ?



    Set the property style of the form2 as ToolWindow (ToolBox).


    Show form one.

    On right click show form2

    Suddenly you change the focus to form1


    That's all....

    Girish

    Project Manager

    GuildSoft Pvt. Ltd.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured