473,473 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

keep a changing variable accesable over differnet forms

84 New Member
ok my program starts on a log in screen and depending if your a admin or a user u enter your info and click on the relivent button.

What i want to know is that is it possible to start a timer (i know how to do that)
then as it switches to a new form when you login the timer still ticks over and say "logintimer" keeps going up by one

i think this make sence :)

can somone plz supply some code as this will help loads!

Thanks.
Oct 11 '07 #1
4 935
debasisdas
8,127 Recognized Expert Expert
To access the timer on other form use the the formname.timername . and don't unload the other form just hide that while you work with second form.
Oct 11 '07 #2
metalheadstorm
84 New Member
To access the timer on other form use the the formname.timername . and don't unload the other form just hide that while you work with second form.
formname.timername *

Ah kk ty ill give that a try
Oct 11 '07 #3
metalheadstorm
84 New Member
ok ive tried every possible way

the login form with the timer is called "form1"
the timer is called "timer1"
the label on the main_menu is called "lbllogintimer"

can u plz put this in you formname.timername format
cus ive tried every way and it wont work :(
Oct 11 '07 #4
QVeen72
1,445 Recognized Expert Top Contributor
hI,

IN Form1's Timer1_Timer event write this code :

frmMainMenu.lblLoginTimer.Caption = Now

Regards
Veena
Oct 11 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Chuck | last post by:
Hi! Any ideas as to how I can get ride of the script error undefined variable "Exp_Month"? I am trying to get this drop down list to default to the current month as opposed to 01. Thank...
0
by: Rick | last post by:
I have a global variable in a module declared as Public frmcnt as integer I have 112 window forms inheriting the default look and layout from one standard form. When I navigate from one form to...
5
by: Dani | last post by:
Hello everybody, I have some code that disables form elements on body load, but I notice when I hit the "back" button, I need to re-enable the form elements (that is done by clicking on a radial...
1
by: Robert | last post by:
What I would like to do is set my database so that the users can add, change, and delete data on the forms and print the reports, but not modify the forms, the reports, the table layouts, or use...
10
by: Altman | last post by:
I have only done a little programming in C++ so I am still learning but I am having a problem with a variable that is changing on me. I have tried this 2 ways with the same result. I have a...
1
by: Peter Morris [Droopy eyes software] | last post by:
Hi all In my login form (forms authentication) I check that the login is valid, retrieve an "Author" object, and keep track of the author's roles. string roles; if (author.IsAdministrator)...
1
by: ezmiller | last post by:
Here is the situation. I have a series of xml files each of which are linked to one of a set of .xsl files that perform transformations. The problem is that I want to be able to open these .xml...
2
by: boyleyc | last post by:
Hi all the following code works perfectly well. Basically it populates a series of check boxes on my form, depending on whether dlookup finds an associated record. The problem i have is that...
4
by: Robson Siqueira | last post by:
Folks, I am facing a problem. I am trying to manipulate the HTML data (thru the Document and DocumentText properties) of the WebBrowser object (System.Windows.Forms). The problem is that the...
25
by: shadyabhi | last post by:
I heard that all global variables are static.. If its so then what is the difference between the 2 declarations: #include<stdio.h> int a; static int b; main()
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.