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

x
?
Solved

SetSysModalWindow

Posted on 1999-06-29
10
Medium Priority
?
708 Views
Last Modified: 2008-02-26
Declare Function SetSysModalWindow Lib "User" (ByVal hWnd As Integer) As Integer

                                    
Can Anybody tell how to use this API with full source code????
Thanks.....You....
0
Comment
Question by:zubairi
[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
  • 3
  • 2
  • 2
  • +3
10 Comments
 
LVL 2

Expert Comment

by:BeedleGuis
ID: 1520857
this function does not exist in the user32.dll, do you have a 'user.dll'? and if so, where did you get it?
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1520858
I't obsolete, why would you wanna know how to use this one?
0
 
LVL 2

Expert Comment

by:BeedleGuis
ID: 1520859
if you do have a user.dll (must be win16) and this function is valid ..  my guess is :
'Modular Declare's in form1
private declare function setsysmodalwindow lib "user" (ByVal hwnd as LONG) as LONG

private sub form1_load() ' or whatever event you want to use it in
Setsysmodalwindow form1.hwnd
end sub

0
Industry Leaders: 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 2

Expert Comment

by:BeedleGuis
ID: 1520860
check if it works or not by:
dim retVal as long
retval = setsysmodalwindow(form1.hwnd)
if retval <> 1 then
    msgbox "Error# " & err.lastdllerror & " has occurred"
end if


Then you could look up the value under the api32.txt constants that start with error_ to find the cause of the error
0
 
LVL 1

Accepted Solution

by:
stewfidgeon earned 150 total points
ID: 1520861
Obsolete? Yeah right. Obviously you have'nt worked in too many small buisnesses. Every place I have worked still has a few 16 bit machines, which use user.dll

It's easy to use, just follow the code below:

private declare function setsysmodalwindow lib "user" (ByVal hwnd as Integer) as integer

private sub form1_load()
result = Setsysmodalwindow (form1.hwnd)
end sub

It sets form1 to the topmost window, and keeps it there until you close the form. No other applications or forms can be used until you close the modal form.

0
 
LVL 7

Expert Comment

by:Inteqam
ID: 1520862
The SetSysModalWindow function is not implemented in the Win32 API. The new input model does not allow for System Modal windows.
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 1520863
Obsolete. Yes. I'm sorry for small businesses but if they are not willing to upgrade then good luck to 'em...
0
 
LVL 1

Expert Comment

by:stewfidgeon
ID: 1520864
Sure, it may not be the most current version of the operating system, not by a long shot, but as long as something has an established user base, it cannot be obsolete.

Most small businesses that havent upgraded have not done so because of the huge costs involved. Purchasing the new software, compatability with existing software, installation costs, technical training, and user training. Willingness often does not come into it, budgets do.

0
 
LVL 10

Expert Comment

by:caraf_g
ID: 1520865
Huge cost involved - they are willing to spend money on zubairi's work. So now zubairi is going to deliver something that is incompatible with 32 bit Windows which will even more tie them down to obsolete technology. Ultimately it will cost them even more to upgrade at a later stage. And upgrade they must eventually.
0
 

Author Comment

by:zubairi
ID: 1520866
Hiii..
I think i got the solution...It come from yours' idea
Thanks alot....
Case close

0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

664 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