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

x
?
Solved

ing a hidden task in Windows 98

Posted on 1999-07-20
10
Medium Priority
?
152 Views
Last Modified: 2010-05-02
I need help listing and disabling certain programs in Win98.  I still want to be able to use the programs, but want to limit access.  I would like to check to see if they are running, then stop them.
0
Comment
Question by:fc_hnat
[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
10 Comments
 
LVL 8

Expert Comment

by:vettranger
ID: 1526258
The only sure way to do that is to take them off their computer. ;-)
0
 
LVL 2

Expert Comment

by:BeedleGuis
ID: 1526259
could you explain a little more?  You just need to stop them from running, say InternetExplorer while your app is running? somthing like that?
0
 
LVL 2

Expert Comment

by:BeedleGuis
ID: 1526260
what is '   ing' ?
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!

 

Author Comment

by:fc_hnat
ID: 1526261
Edited text of question.
0
 
LVL 2

Accepted Solution

by:
BeedleGuis earned 600 total points
ID: 1526262
use the findwindow api with there titles then use sendmessage to close them.  I'll post code in a comment in a few minutes.
0
 
LVL 2

Expert Comment

by:BeedleGuis
ID: 1526263
Public 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
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Public Const WM_CLOSE = &H10


Public Const SWP_HIDEWINDOW = &H80
Public Const SWP_NOMOVE = &H2
Public Const SWP_NOSIZE = &H1
Public Const SWP_SHOWWINDOW = &H40
Public Const HWND_TOP = 0

Private sub timer1_timer
    Dim winhndl As Long
    Dim RetVal As Long
    winhndl = FindWindow(vbNullString, "Test")
    If winhndl > 0 Then
       RetVal = PostMessage(winhndl, WM_CLOSE, 0, 0)
    End If
end sub

Where test is the titlebar text of the app you want to close
0
 
LVL 2

Expert Comment

by:BeedleGuis
ID: 1526264
some of the declares and consts are not needed by the way..just forgot to take them out
0
 
LVL 2

Expert Comment

by:BeedleGuis
ID: 1526265
if you don't know the titlebar text, ie: it's internet expolerer where the title bar changes, I can give you code to get their handles too..just let me know.
0
 
LVL 2

Expert Comment

by:BeedleGuis
ID: 1526266
if you don't know the titlebar text, ie: it's internet explorer where the title bar changes, I can give you code to get their handles too..just let me know.
0
 
LVL 3

Expert Comment

by:Egore
ID: 1526267
I have some really good C++ code to get file handles of any application if you have part of the text in the titlebar.  I can send this to you if you'd like.
0

Featured Post

Technology Partners: 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!

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 …
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
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

715 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