|
hi Ondra
Simply hide your forms and use unload function of vb6 and your Application will be terminated. like this
unload(frmmain) .
Hope it helps
Thanks
-- modified at 6:54 Friday 30th November, 2007
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
I've tried:
unload(Form1)
but a window appeared "invalid property value"
|
|
|
|
|
ok, do it this way
forgive me, i dont know when last did i use Vb6, but let me give you a solution to that.
i assume you have a an MDI, a main Form. on every clsing exent or Dispose, make sure you put this code.
umload me .
and it will be very Easy if you have one MDI and other forms as Children, when you unload the MDI and other Form will be terminated.
try it and tell me what is happening.
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
no sucess, situation is the same- but I assume that there is not problem in this (see my later comment-it's probably caused by timers). Anyway, thank you very much.
|
|
|
|
|
1) Where is this sub defined?
2) Do you have any code in the event that is called when you unload any of these forms?
|
|
|
|
|
1)it is defined in one of the module
2)I don't think so; Actually,I use two winAPI timers form winmm.dll and one VB timer in the program,but they are all stopped before terminating the application
|
|
|
|
|
there may be a connection with timers I use (2*winAPI timers from winmm.dll and one "standard" VBTimer). I've noticed that when I terminate the application before starting these timers, it ends correctly.
|
|
|
|
|
YESS, it's most probalby caused by WinAPI timers- I've trierd to start VBTimer Only and it ends correctly. The syntax of timers is:
Declare Function timeKillEvent Lib "winmm.dll" (ByVal uID _
As Long) As Long
Declare Function timeSetEvent Lib "winmm.dll" (ByVal uDelay _
As Long, ByVal uResolution As Long, ByVal lpFunction _
As Long, ByVal dwUser As Long, ByVal uFlags As Long) _
As Long
they are started:
Time2 = timeSetEvent(Period2, Period2, AddressOf Timer2Clb, 0, TIME_PERIODIC)
Time1 = timeSetEvent(Period1, Period1, AddressOf Timer1Clb, 0, TIME_PERIODIC)
and stopped:
Public Sub StopTimers()
Form1.VBTimer.Interval = 0
If Time1 <> 0 Then
timeKillEvent (Time1)
Time1 = 0
End If
If Time2 <> 0 Then
timeKillEvent (Time2)
Time2 = 0
End If
End Sub
If you know what's wrong, I would be grateful for reply.
-- modified at 8:52 Friday 30th November, 2007
|
|
|
|
|
hi all,
i am developing an application (a 15 days trial version).
can someone tell me how can i handle the situation, when the user change the system date, the application must not start.
how can i detect the changes in system date.
or if someone have any other logic to handle it anyway.
thanks in advance
help everyone
|
|
|
|
|
Every time the app stores, you need to store the date somewhere. If the date goes backwards, you store that it's gone backwards and the app therefore will no longer start.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
thanks christian
i am thinking about to use file system watcher, what do u say
and i am also keeping an eye on the date and time as well as u say.
but their is a problem, if the user install the product on day 1, after 15 days he change the date and can use the product. how can i resolve that any idea.
thanks again
help everyone
|
|
|
|
|
eyes2007 wrote: i am thinking about to use file system watcher, what do u say
What would watching the file system achieve?
|
|
|
|
|
any change in system date
thats just an idea and i have to read more about that component.
help everyone
|
|
|
|
|
eyes2007 wrote: help everyone
I don't see what the point is. I told you what to do, and you're talking about something else that won't work.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
eyes2007 wrote: i am thinking about to use file system watcher, what do u say
Sounds bizarre to me. Why not do what I suggested instead ?
eyes2007 wrote: but their is a problem, if the user install the product on day 1, after 15 days he change the date and can use the product. how can i resolve that any idea.
Refer to my original answer.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
here is how I would do it (wich resembles what christian said I think)
on installing the programme --> store the current date
everytime the programme starts --> store the current date in second location
now on startup off you'r programme you do 2 checks:
first check to see if the current date is before the date stored in location 2
if so --> user had turend clock back and trial ends
if not --> do check 2
check to see if the current date isn't 15 days after the date stored at location 1
if so --> trial has ended
if not --> store date in location 2 and start programme
to keep the user from hacking you'r programme (or at least make it harder too do) you might want to encrypt the date's
hope this helps
Credit to Christian who gave me this idea and I think this was also what he meant in his reply
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
I need to add some set of values in combo box.
eg :
Red
Blue
Green
Yellow
violet
I need red item to bold in the combo box. some one help me.......
Thanks & Regards
Kumaran
|
|
|
|
|
You need to owner draw the combo box
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i want to be able to display the users office version(2000,2003 xp ect) and office applications like word, excel in a check box if they have it. i have seen the code in c++ i guess a vb.net its ppossible too
thanks
|
|
|
|
|
Various ways. You could look at registry keys.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I need help!!
An Application that was written by someone before me used the Infragistics controls. These controls have expired and my company have now purchased the full licence.
How can I change the licence in the solution? When I build the solution I get an "Unable to resolve type" error. The file being referenced is the Licences.licx.
Can someone please give me advice as to fix it? I am on a very very short deadline...
Thank you in advance!!
Illegal Operation
Making Computer Software Talk
|
|
|
|
|
You should speak to Infragistics tech support. This question has nothing to do with the VB(.NET) language.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I created user control and dropped textbox over there.
I want the control to use all degault properties which windows Textbox provides + defined by me
right now it doesn't show even text property !
|
|
|
|
|
If you inherit the textbox class then U will be able to use all the default properties of text box
Hope this will help you
Best Of Luck
|
|
|
|
|
1.How to pop up a window in web application ?
i have written a function like this :
function openpopup(popurl)
{
var winpops = window.open (popurl,"","width 700, height = 400,toolbar = 0,status = 1 ,resizeable = 1, scrollbar = 1 ")
}
where should i call this function ?
|
|
|
|