Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Crazy question

Posted on 2002-03-22
13
Medium Priority
?
141 Views
Last Modified: 2010-05-02
Is there a way?
In many application I must to call my forms MODALS,
but I need to be able to click in the form or the  pgm. that call my form(like: Internet Explorer) even if the form called is MODAL!!!!!!!!!

API(maybe)??

300points for the good answer.
Thanks
0
Comment
Question by:dosyl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 3
  • +2
13 Comments
 
LVL 6

Expert Comment

by:anthony_glenwright
ID: 6890240
Why do you have to call your forms as modal?  The desired behaviour you describe is that of non-modal forms.
0
 
LVL 1

Author Comment

by:dosyl
ID: 6890248
Because It is a ocx to use on Internet Explorer,VB, VFoxPro and anywhere. FoxPro, IE, need Modal form.
0
 
LVL 1

Author Comment

by:dosyl
ID: 6890250
Scuse it is LIKE a message, but the user must be able to click in the form that call the "message".
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Expert Comment

by:anthony_glenwright
ID: 6890261
So you are calling a method and showing the form with code like:

frmMyForm.Show vbModal ?

Are you specifying an owner?  (as the second parameter to .show).  Do you get a particular error message if you show the form as non-modal?
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6891116
following Anthony's thinking:
frmMyForm.Show vbModeless, Me
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6891254
do you want something like a top most window (just like the help files)?

Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long,
ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long

Const SWP_NOSIZE = &H1
Const SWP_NOMOVE = &H2
Const SWP_NOACTIVATE = &H10
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Const SWP_SHOWWINDOW = &H40

Dim num As Integer
Dim chkChangeByPrm As Boolean

Public Function SetTop()
   SetWindowPos Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, _
       SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE _
       Or SWP_NOSIZE
End Function

Public Function SetNOTOP()
   SetWindowPos hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, _
       SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE _
       Or SWP_NOSIZE
End Function
0
 
LVL 1

Author Comment

by:dosyl
ID: 6891354
emoreau, My form ia already on the top with: Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, _
but I must to be able click in the calling form.

anthony_glenwright
my form is call like this:
Form2.Show 1

else If I write it like this:From2.Show, the pgm. doesn't work.I have the message that the Non Modals Forms are not accepted.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6891577
if your form is already on top, remove the 1 after the show and it should work correctly.


>>else If I write it like this:From2.Show, the pgm. doesn't work.I have the message that the Non Modals
Forms are not accepted.

what is the err number? can you send and example of this application?
0
 
LVL 6

Expert Comment

by:anthony_glenwright
ID: 6891587
Hmm... I have actually run into this before, with a MS project add-in.  It also doesn't allow non-modal forms, and gives an error if you try to show one.

The bad news is, I never found a solution.
0
 
LVL 1

Author Comment

by:dosyl
ID: 6895391
emoreau:
The error is #406. I cannot remove the 1, else I have the error with IExplorer and FoxPro. If I keep the 1, I cannot access to the calling form.!!!!!

I tought something like a timer with the Interval 500 to set the focus to the calling form and set the focus to the called form every .5 second. But how???????????

Thnks anthony
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 1200 total points
ID: 6895464
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7060605
This question appears to be abandoned. A question regarding it will be left in the Community Support
area; if you have any comment about the question, please leave it here.

Unless there is objection or further activity, one of the moderators will be asked to accept the comment
of <emoreau>.

The link to the Community Support area is:
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt

DO NOT ACCEPT THIS COMMENT AS AN ANSWER.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7065747
Thanks, emoreau  for your help here.

I have finalized this question, and will monitor it for comments.

Moondancer - EE Moderator
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question