473,503 Members | 2,142 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Do I need a hook or something else?

I have a vb.net program that disables the close button (the X) on a
given window that I am looking for.

If I start the program (the one I want to disable the X) and then
start my vb.net program, the vb.net program finds the program's window
handle and disables the X.

If I start my vb.net program first and then start my program I want to
disable, since my vb.net code has already searched for the program and
found it missing, it does not disable anything.

All as expected.
What I want to know is how to handle it any time the program is
started. I thought about a timer to just go out and poll and see if
the program was running, but that doesn't seem right. I thought about
a hook, but not sure that's the right word for it. I just want my
vb.net program to know when the program is started and run its disable
code on that window. Again, I have the disable code. It works fine.
I just want to know how to detect windows and the best method to do
that.

Thanks for advice.

May 23 '07 #1
0 822

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
19045
by: Mohammad | last post by:
Can someone explain to me what a hook is? Does it has something to do with a debugger? Thanks
3
2808
by: Ramon F Herrera | last post by:
Greetings++, folks: I am really desperate on this search. I have been looking all over for a sample code that uses the GPGme (GPG Made Easy) SDK library to decrypt a file. I finally found...
1
1737
by: Daniel Cagara | last post by:
Hello I get a WM_USER+1010 via PostMessage sent to my window by another process. I wanted to set a Hook to somehow catch this Message, so i did: myHook = SetWindowsHookEx (WH_MSGFILTER ,...
1
1852
by: ½£¾ªºè | last post by:
Give an example:When user pressed "B" or "b",HOOK get that message and let TextBox1.text display "a". The executing founction is as following: **************************************** IntPtr...
0
1838
by: gekoscan | last post by:
Hello, http://msdn.microsoft.com/msdnmag/issues/02/10/cuttingedge/ I don't know if any of you are familiar with Dino Esposito article in MSDN magazine on .NET Hooks but I used the class he...
1
7658
by: blueturtle | last post by:
Hi, I've implemented a hook (WH_CALLWNDPRO), using the sample posted at MSDN magazine. ( see url: http://msdn.microsoft.com/msdnmag/issues/02/10/CuttingEdge/ ) I succeed in intercepting the...
0
2477
by: zeng.hui.stephen | last post by:
I download the demo http://msdn.microsoft.com/msdnmag/issues/02/10/cuttingedge/. I inherite the demo, and write my code. I want to use Hook to monitor C++ Edit change. I use a C# form...
2
4409
by: bizcor | last post by:
Is it possible to do a local keyboard hook to a process running in a new thread. The process is a command line application and is instanciated when a button is pressed on the main form. I have had...
3
2134
by: Sami | last post by:
Hello, I am new to Python. I tried to hook my own ExceptionPrintingFunction sys.excepthook but it does not work. This is what I wrote:...
0
7205
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7008
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7467
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5594
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5022
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4688
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3168
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
746
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.