SystemModal form 
Author Message
 SystemModal form

Hello,
Can anyone help me with these two questions:

1. In windows3.1 to make a form System Modal, i.e. on top of /all/ other
windows, I could use:

Declare Function SetSysModalWindow Lib "User" (ByVal hWnd As Integer) _
As Integer
Declare Function SetWindowPos Lib "User" (ByVal hWnd As Integer, _
ByVal hWndInsertAfter As Integer, ByVal X As Integer, _
ByVal Y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal _
wFlags As Integer) As Integer

Global Const SWP_NOMOVE = 2
Global Const SWP_NOSIZE = 1
Global Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Global Const HWND_TOPMOST = -1
Global Const HWND_NOTOPMOST = -2

Call:
  Form1.Show
  success% = SetWindowPos(Form1.hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
  status% = SetSysModalWindow(Form1.hWnd)

However, this doesn't work in Windows95 (even after I've tried
substituting fro 32bit dlls). Is there a way to fix it, or what other
API should be used in Win95 to acomplish it.

2. When I play a wav using mciSendString API's, how can I set it to
play the audio in /background/, i.e. with-out taking control over the
form?
 X = mciSendString("open " & WavFile & " type waveaudio alias mywave",_
strRet, lngRetLngth, lngCallBack)
 X = mciSendString("play mywave wait",strRet,lngRetLngth,lngCallBack)
 X = mciSendString("close mywave",strRet,lngRetLngth,lngCallBack)

Any help would be appreciated.
Thank you.
--------------------------------------------------------------------------

World Wide Web homepage:                     http://www.*-*-*.com/ ~hbcsc093
ICQ (UID# 1393541) pager:                 http://www.*-*-*.com/
--------------------------------------------------------------------------
"There is a theory which states that if ever anyone discovers exactly what
the Universe is for and why it is here, it will instantly disappear and be
replaced by something even more bizarre and inexplicable.
There is another which states that this has already happened."
                 Douglas Adams (The Restaurant at the End of the Universe)
--------------------------------------------------------------------------



Sat, 05 Feb 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. SystemModal

2. Systemmodal

3. SystemModal MsgBox

4. VB6 Application as Systemmodal

5. custom form control: Cannot view design view of forms that inherit this form

6. Open form, close form, open form = disposed object exception

7. load another form form one form

8. Q: Form activate Fires On Non Child MDI Forms But Only Once On Child Mdi Forms

9. form VB form to web based form

10. Forms Forms Forms

11. Making a form a child form of an MDI form

12. Forms Collection: Using it to Open Forms by Passing the Form Name as a String Variable

 

 
Powered by phpBB® Forum Software