pro_vb thread: RE: AUtomatic Logging Out an Application HELP PROVID- ED..................
Hi
Fortunately I have just now accomplished automatic logging for my Vb
application . A warning is issued after 10 minutes of total inactivity and
then after 5 more minutes of the same the user is logged out .
for this :
Put a timer control on ur main or parent form
set its interval to 64000(approx 1 minute thats the max allowed)
At the same time on this form make a label with a caption that displays ur
warning message.prefer using an eye catching back color for that.dont use a
message box for this warning bcoz msgboxes kind of hold the application with
an OK button and as soon as ok is clicked the timer gets reset bcoz of mouse
move.SO,use a label ,keep it invisible initially.
in the timer event of timer
dim Time Elapsed as integer
timeelapsed=datediff("n",timestamp,now)
if timeelapsed >=10 then
warningLabel.visible=true
elseif timeelapsed>=15 then
unload me
endif
end sub
timestamp is a global variable of datatype "date".this variable should
continuously be updated to now at every mousemove or keypress event.
i.e. on mousemove or keypress of every form paste the following code
timestamp=now
mainform.warninglabel.visible=false
thats all u need to do
hope I have solved ur problem.
Now if possible can u help me with this :
I m working on a VB application.The backend is Oracle8i and I m using ADO
with a DSNLess connection thru Oracle ODBC Driver version 8.1.5.7 .The code
works absolutely fine when I run it thru VB design environment,but gives me
Oracle ODBC Driver errors when I try to make an installable package of the
same application thru package and deployment wizard of VB6.0.
In the installable Package whenever I want to make database transactions I
get an error saying
"The Request properties are not supported by Oracle ODBC Driver"
Error Number : -2147217887
Error Source : Microsoft OLE DB Provider for ODBC Drivers
Now what troubles me is the fact that I m using ORACLE ODBC Driver which
works fine if I run this application from VB design environment but
apparently some dependencies are not loaded properly when Package and
Deployment wizard makes a package.