7 Replies - 623 Views - Last Post: 14 February 2013 - 10:28 AM Rate Topic: -----

#1 mehran901  Icon User is offline

  • New D.I.C Head

Reputation: -2
  • View blog
  • Posts: 10
  • Joined: 13-February 13

How can we make a unloadable program with vb6?

Posted 13 February 2013 - 12:41 PM

hi guys , do you know about how can we lock a process with vb6?
some programs such as anti-viruses lock them-self by making them-self as services ... how can we make a program as service in vb6?(for avoiding to close the program ) ?
or if you think someways are existed that help me to unload the program by other programs please explain your method : )

best regards
Is This A Good Question/Topic? 0
  • +

Replies To: How can we make a unloadable program with vb6?

#2 mehran901  Icon User is offline

  • New D.I.C Head

Reputation: -2
  • View blog
  • Posts: 10
  • Joined: 13-February 13

Re: How can we make a unloadable program with vb6?

Posted 13 February 2013 - 02:11 PM

hi guys , do you know about how can we lock a process with vb6?
some programs such as anti-viruses lock them-self by making them-self as services ... how can we make a program as service in vb6?(for avoiding to close the program ) ?
or if you think someways are existed that help me to dis-unload(Non-closure plan) the program by other programs please explain your method : )

best regards
Was This Post Helpful? 0
  • +
  • -

#3 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3091
  • View blog
  • Posts: 10,349
  • Joined: 12-December 12

Re: How can we make a unloadable program with vb6?

Posted 13 February 2013 - 03:09 PM

It is much easier to create a Windows Service in .NET but it is possible in VB6: discussed here at SO.

I'm not sure about your emphasis on avoiding closing the program :innocent:. IMO this should be reserved for vital Windows Components and I would always want the ability to stop a service that wasn't (vital).

This post has been edited by andrewsw: 13 February 2013 - 03:12 PM

Was This Post Helpful? 1
  • +
  • -

#4 Neku  Icon User is offline

  • D.I.C Regular

Reputation: 20
  • View blog
  • Posts: 268
  • Joined: 21-May 09

Re: How can we make a unloadable program with vb6?

Posted 13 February 2013 - 03:25 PM

you could use the sleep function to actually make a program to go to "sleep" for a given time, thus it wont respont to user commands (like clicking button) however that would make other code of the program to stop working for the given time.
also if you dont want a user to easily close a program you could use a boolean variable and as long it is true the program wont unload.
hoever it wont help if the program actually get stuck for some reason and if you try to close it via task maneger.
and you'll need to give a condition when a user can close the program.
Was This Post Helpful? 1
  • +
  • -

#5 mehran901  Icon User is offline

  • New D.I.C Head

Reputation: -2
  • View blog
  • Posts: 10
  • Joined: 13-February 13

Re: How can we make a unloadable program with vb6?

Posted 14 February 2013 - 02:36 AM

oops ...thank Andrews & Neku ....
that was helpful and the target of the post pointed to make a program that the user couldn't close it easily ... bythis-way using a program as service for the reason that i said , isn't good...

some viruses had been seen that using a method for avoiding to close them-self and keep them-self on the windows for always ...

when we are using sleep function , the user can stop the program by task manager because its couldn't respond messages that windows has been sent

im searching a easy way to avoid a vb6 program from closing by other applications ... ( so like as some viruses that we saw them)

my friends do you have any idea about it?

best regards
Was This Post Helpful? 0
  • +
  • -

#6 maj3091  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 299
  • View blog
  • Posts: 1,767
  • Joined: 26-March 09

Re: How can we make a unloadable program with vb6?

Posted 14 February 2013 - 09:13 AM

As a suggestion, or something to look at, but you might need to hook into the windows message queue to pick up on the WM_CLOSE message (I think), which I believe is what is sent to close applications.

That being said, it's not something I've tried, and I'm not sure whether you can do the same for the Terminate Process message from TaskManager processes screen when you initiate a force close.

What is the reasoning in preventing this close? Maybe a little more explanation on what you're trying to achieve might make it easier for people to give more specific suggestions.
Was This Post Helpful? 1
  • +
  • -

#7 mehran901  Icon User is offline

  • New D.I.C Head

Reputation: -2
  • View blog
  • Posts: 10
  • Joined: 13-February 13

Re: How can we make a unloadable program with vb6?

Posted 14 February 2013 - 10:23 AM

thank maj3091 :rolleyes2: , sometimes
i need to make a program that the user can't close it

actually i want to write a program ( like as virus) which
useres shouldn't terminate it by TaskManager exactly ( (in every ways are existed possible)

i hope that you will understand my purpose . : )



once again thanks alot
Was This Post Helpful? -2
  • +
  • -

#8 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8849
  • View blog
  • Posts: 33,159
  • Joined: 12-June 08

Re: How can we make a unloadable program with vb6?

Posted 14 February 2013 - 10:28 AM

Hmmm.. no. I was a bit iffy on the whole 'avoiding to close the program' bit, but now I am certain. Sorry, we don't help people do malicious apps - even vb6 viruses. Do not persist in asking for help on, here, in the future.

I am going to close the topic. If you have questions feel free to PM me.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1