473,805 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
+ 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 2052
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 GetAsyncKeyStat e() 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
4429
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++ program -- DSN710.SDSNSAMP(DSN8DLPL) to use for this purpose. I'm wondering if anyone out there has a COBOL equivalent to this as I do not have a C++ compiler?
0
2463
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 on computers running WinXP. This does not appear to happen in Access 2000 on a computer with Win2000. This only seems to happen if there is a hidden form also loaded and, so far, I'm only able to reproduce this if the forms are loaded through...
2
1606
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 directory and it looks like ASPNET runtime is holding on to the assemblies. Once i recycle the ASPNET process, i can delete this directory. Has this got anything to do with strong-named/signed assemblies ( even though deployed as private...
10
1752
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 projekt. The reason why I am asking is that I am creating a program and I need a Splash-screen (like the tiny screen that appears when programs like Word starts), and when the Splash-screen has been loaded for a couple of seconds it should be...
0
1571
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 asp.Net application. Occasionaly, especially during peek CPU usage, the appDomain of the application gets unloaded by the w3wp.exe, and the background thread is terminated (we receive thread was being aborted exception). I guess the reason for...
2
4218
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 whenever the user clicks the CLOSE button, i ask the user whether he wants to save before closing the form. On the Form_Unload event, i check whether there are any new changes and if yes, i pompt the user for a save. But if they have not filled any of...
1
1672
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 does all the ADO with it, but when check1.value = true its doing the ADO commands, but just not unloading, if anyone can shed some light would be most greatful. Kind Regards Devon. Module code. Option Explicit Public g_fmrSearch As...
0
1309
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 the task manager-"Applications" tab,i can detect it and prevent it from unloading,but if it is closed from the task manager-"Processes" tab,the form will be closed even without passing through the terminate,queryunload and unload events... I'm...
7
2531
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 execution so the user can fix the error and restart the code without unloading the app. Shawn
0
9716
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10366
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7646
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6876
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5542
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4323
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3845
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.