473,466 Members | 1,374 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Form not unloading..

vdraceil
236 New Member
I use vb6.i have a small problem guys..my form is not unloading.

I want my application to end only if the user presses shift+F10.so i run a timer with interval=1 which checks the keyboard state of both the keys.if at any instant both the keys are pressed a messagebox must be displayed and then the form must unload.

I've done the coding and what happens is the message box is displayed but the form doesnt unload.

I've tried debugging too.what i see is the unload statement evokes the unload event of the form ,but after this event the form's load event runs again..
I dont know why this happens..does anybody know why and the solution to this problem??
Sep 22 '08 #1
6 2032
xinariscy
14 New Member
First, you can do what you want to do very easily. Having a timer running all the time is not so good.

You can make a hidden menu with shortcut key Shift+F10. In the code of the menu, just write the message box you want.

If user hit OK try the "Unload me" or the "End". Both should quit the program.

If you want further help about the menu just ask.
Sep 22 '08 #2
vdraceil
236 New Member
My application runs in the background-the form will be hidden.actually the program is designed to capture the screen at specific time intervals and store it in a folder..so the form wont get the focus and the shift+f10 associated with the menu wont work.
any alternative idea buddy?
Sep 23 '08 #3
rpicilli
77 New Member
Hi Friend.

If your app runs in background and has no iteration with the end user, the best practice is create a Service not a Windows Application.

If your application never get the focus, the short cut key will never work either.

You must take care of what key combination you'll use because this will be allways available when your service is running.

I hope this help
Sep 23 '08 #4
vdraceil
236 New Member
Ya..even though my application doesnt gets the focus,i manage to track what keys are pressed by using GetAsyncKeyState() API function.
Can you just tell me how to run my application as a windows service?pls..
Sep 25 '08 #5
Kapps
16 New Member
...
You're making a program, which you want hidden from the user and run as a service, that logs all keypresses the user inputs, and makes screenshots of whatever they're doing?

We call that illegal.
Sep 27 '08 #6
vdraceil
236 New Member
i'm just trying to monitor my own computer-i feel thats not illegal.
moreover i'm not building a keylogger.
what i'm trying to make is a application that monitors every new window opened-i dont think its gonna cause any harm to anyone.

i've completed the programming thing,but the problem is the form is not unloading as i said before.thats why i need help from members of this forum.
i'm trying it myself but i dunno why it happens and i feel this part difficult.

has anyone faced this kind of problem before?any solution to make my form unload on pressing shift+F10?
Oct 3 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Rom Marshall | last post by:
Hi. Once a LOB size goes beyond 32KB in size, I'm not able to use the LOAD utility to unload the data off the tables for DB2 7.1 on OS/390. Instead, the documentation refers to a sample C++...
0
by: dlieu | last post by:
I've found an odd situation in where the Load event of the active form fires (after the Unload event) when Access is closed. I am able to reproduce this situation in Access 2002 SP3 and Access 2003...
2
by: Guru Prasad | last post by:
Is there a delay involved in unloading assemblies once a virtual directory is "deleted" using IIS Manager ? At times even after the virtual directory is removed i cannot delete the backing physical...
10
by: peter hansen | last post by:
I tried a couple of weeks ago but I'll try again :D I old VB6-days it was possible to unload a form bu using the Unload(Form) command. I have tried the Close-function but it'll unload the entire...
0
by: ibenc | last post by:
Is there a way to prevent w3wp.exe from unloading a particular appDomain. Some parameters, config files? Here is some info about why I need this. I have a long running background thread in...
2
by: RajaKannan | last post by:
Hi All, I have a form in which i have few mandatory fields. Wheneve the user tries to save, i check for these fields and alert them, if thet are empty. I have a CLOSE button in my form and...
1
devonknows
by: devonknows | last post by:
Ok, i posted about forcing a form to unload, now since ive implemented that, when check1.value = true, when you close the form, it doesnt unload, when check1.value = false, it unloads perfectly and...
0
vdraceil
by: vdraceil | last post by:
Hi,i use VB6.0..is it possible to prevent a form from unloading ever? I know to set cancel=true in query unload event of the form..but this applies only to limited cases. If my exe is closed from...
7
by: Shawn | last post by:
Have had a complete brain-fart and cannot think of how to stop code execution without unloading the form in vb.net. In other words, if my code catches an error, I want it to tell the user and stop...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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
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
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,...
0
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
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
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.