Results 1 to 4 of 4

Thread: Dialog window

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2002
    Posts
    3

    Question Dialog window

    How do I find out whether the active window is a dialog form or something else?

    Please help --- I am new to VB.

    Bye and thanks (in advance)

  2. #2
    Bouncy Member darre1's Avatar
    Join Date
    May 2001
    Location
    Peterborough, UK
    Posts
    3,828
    VB Code:
    1. Me.BorderStlye
    Confucious say, "Man standing naked in biscuit barrel not necessarily ****ing crackers."

    Don't forget to format your code in your posts

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2002
    Posts
    3
    Sorry. But that doesn't give whether the window is of type dialog box or not. I wanted to find out whether the window is a dialog box or MDI form or something else like that.

    What I am doing in my program is the following :
    1. First I am checking if any window with a particular string like "error" as the form caption (window title) is open.
    2. Then I am making that window active using setActiveWindow.
    3. After that I am pressing "enter" using sendkeys function.

    What is happening is that even if the window open is not a dialog box (say MS Word is open) it is pressing "enter"s in it. I wan't the program to press "enter" only if it is a dialog with "OK" and "Cancel" buttons.

    Please help,
    Bye

  4. #4
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ...

    I don't know how you do it, but you can check that the form size is not resizable, and it is modal. It can either be application modal, meaning it is modal only in the particular application, or system modal, which means it locks up the entire system.

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

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