|
i get an Error that says
Cannot find table 0.
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
|
|
|
|
|
I want ot use tree node in my application and want to check if a particular node is clicked. How to do so?
|
|
|
|
|
What have you tried ? Did you read the MSDN help ? Did you try google ?
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 )
|
|
|
|
|
Hello,
I have a program consisting of four modules and three forms. When I try to terminate it using following sub:
Public Sub END_IT()
Unload Form1
Unload inicializace
Unload tech_krivka
MsgBox "applicaion terminated", vbInformation
End
End Sub
the MsgBox appear, but then the program get stuck and it's neccesary to quit it from TaskManager (where CPU usage 99% for the VB6.EXE is shown).
When made to .exe file, the situation is the same except CPU usage 0%.
thank you for your oppinion
Ondra Pokorny
|
|
|
|
|
Why don't u write simply
"End"
insted of unloading all the forms?
Tell me if it works
|
|
|
|
|
Because I've tried it and it was all the same. So I've looked in VB6 Help and:
"
The End statement provides a way to force your program to halt. For normal termination of a Visual Basic program, you should unload all forms. Your program closes as soon as there are no other programs holding references to objects created from your public class modules and no code executing.
"
|
|
|
|
|
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
|
|
|
|