|
Create a second timer. Each time it fires, check the system time. Once the system time becomes "valid", whatever that is, start your timer and disable the timer that checked the clock.
Keep in mind however that Windows timers are not very accurate. If your timer has a 1 minute interval, and you start your timer at say Midnight exactly - OOh:00m:00sec, then your timer will likely not fire at exactly 00h:01m:00sec. And after say 60 timer intervals, I can guarantee you the timer will not be firing at exactly 01h:00m:00sec.
|
|
|
|
|
A possible workaround is to code in your initialization procedure: (in pseudo code)
timer.Enabled = False<br />
timer.Interval = (difference in milliseconds between now and when you want it to fire)<br />
timer.Enabled = True<br />
timer.Start<br />
Then in your timer callback function reset the interval to whatever you want it to be for regular timer interrupts (if any).
...Steve
|
|
|
|
|
have you checked the properties (and especially the enabled one) ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
The Timers don't support what your trying to do. There is no method of telling a Timer to fire it's event at such-and-such time.
I take it your trying to write some kind of scheduler. The best method is to setup a Timer to fire off every 60 seconds (60000 milliseconds), get the current time and compare the date, hour and/or minute to the scheduled time of an event. If the time is write, fire off whatever process is scheduled, then mark the process as launched.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi there,
I am doing an accounts project in which a user creates a form and is saved in database. All the forms created then can be viewed in a databound datagrid(only a few select fields).
Each form has a 'edit, update & print' option in the datagrid. Due to the security reasons and secure information in each form, we need to password protect the 'edit,update and print' options i.e. what my manager wants is i.e. only the person who created the form & maybe the developer should be able to change it and print it.
Is there a simple way to password protect records in datagrid...can someone help me on this issue?
You kind help is very much appreciated.
Aartee.
...HE is watching Us All!
|
|
|
|
|
No, there isn't. For something like this, you'll have to create an entire security system for "password protecting" each record in the database.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yeah well...I thought so, but thanks for confirming my doubts..it will be easier for me to expalin to my manager now that we are not miracle churners to make anything they want happen .
Thanks a ton
Aartee.
...HE is watching Us All!
|
|
|
|
|
This question pertains to the use of ADO.NET controls to connect and interact with a database.
I have coded the connection manually behind the form object without the use of the GUI and then created a data adapter and a dataset through code as well.
If I have done my connection this way does this mean that i have to manually bind all my form controls, i.e textboxes, labels etc
Another question along the same line;
How do I manually bind gui controls through code? i.e textboxes, labels etc
|
|
|
|
|
Yes you need to 'Manually' (if thats the word you use for 'code behind' ) bind all the GUI controls to the database. You need to use the Datareaders and Open,Close Connections and a whole set of code to connect your controls to the database and save the data from them to the database...
Sounds like you are a newbie in ADO.net, don't worry everyone is a newbie at some point, you will be able to do it by trial and error method but if you really need help on it I think it will be better if you post specific doubts and questions because ADO.net is a big subject in itself and this is a very generic question to be answered here..it is almost a tutorial.
good luck
Aartee.
...HE is watching Us All!
|
|
|
|
|
Hey,
I was looking at making a rather simple application to keep track of my movies and I was looking at implemanting a search bar in it. So the user can just search for movie files like that and will then information will be transported to a .txt or .html file. Can any of you guys tell em what to look up to find how to do this? I have looked around and can't find anything associated with making a search bar in visual Basic. Or can you guys give me a guide or something over it.
Thanks,
Rat
|
|
|
|
|
I want to use the propertygrid control in my app.
So, no problem for one class, but when I try to browse a class made by "shared properties" nothing is displayed ...
Any suggestion?
Thanks /// Angelo
|
|
|
|
|
Hey all,
First off I'm a vb n00b. Only my second day. =(
Anyhow how can I set ListBox.DataSrouce to xml and have display a nodes value?
For example:
<library>
<book>
<title>Foo</title>
<author>John Doe</author>
</book>
<book>
<title>FooBar</title>
<author>Jane Doe</author>
</book>
</library>
' Book Title List:
Foo
FooBar
' Book Author List:
John Doe
Jane Doe
I've been able to figure out this much lol:
Dim ds As DataSet = New DataSet
ds.ReadXml("c:\temp\AttendeesList.xml")
ListBox1.DataSource = ds
but have no idea how to have the ListBox to display Title or Author Info???
Thanks!
-- modified at 17:33 Wednesday 21st September, 2005
|
|
|
|
|
Forgot to mention that I have tried:
AuthorListBox.DataSource = ds.Tables("library")
AuthorListBox.DisplayMember = "author"
TitleListBox.DataSource = ds.Tables("title")
TitleListBox.DisplayMember = "title"
So I am also wondering how my XML data is structured in my DataSet
|
|
|
|
|
Dear all,
I created several listboxes and comboboxes in a form and made databinding and collections.
When I run my form, the listboxes and comboboxes seems to be empty, but when I open de combobox and select a line (It'looks like it's empty) the value appears in the box.
The text in the box is not visible.
What is going on here. I tried everything and every setting.
I even reinstalled my software (Visual Studio.NET enterprise) on a different computer. But I still have this problem.
HELP
|
|
|
|
|
hi there i have a textfile like this
34 wrere
32 rewr
44 erre
i have to perform binary search on it i dont get it if some one that would be helpful
thank u
i think something the index /2 ....
sam
|
|
|
|
|
A binary search only works if a file is sorted. Then you can check the record in the middle, see if it's higher or lower than the result you wanted. If it's higher, check half way through the upper half, otherwise check the lower half. You keep dividing the number of records you are searching in two, making it a lot faster than iterating through them all. But it won't work unless the records are sorted.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hey thanks 4 ur reply i see what u mean and the records are sortedby the index number for example
0 xxxxx
1 xxxxx
2 xxxxx
3 xxxxx
4 xxxxx
5 xxxxx
6 xxxxx
7 xxxxx
8 xxxxx
Well the thing is i know what binary search is but i dont know how to apply in vb.net and on a file so if u can help ill appreciate it thanks a lot.If u can give me an example or a code thank u.
sam
|
|
|
|
|
Dude, it's really very simple. You have an arraylist, and you search by creating an index to start ( length/2 ), then you keep splitting the index up or down in order to bring down the range you're searching. It's a simple enough problem that I can't give you example code without doing your homework for you. How about you give it a go, and post your code ? If you've tried to do your own homework, and you get stuck, I'll be glad to help.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
A very good resource for this type of algorithm is The Bible ... "The Art of Computer Programming", Volume 3 - Sorting and Searching, by Donald Knuth.
...Steve
|
|
|
|
|
I see what you mean man and i i understand i know i should do my homework i always do
but the thing im new to vb.net and this is for university project about indexing and im late th deadline tomorrow i know your right
thanks anyways
really thanks;P
sam
|
|
|
|
|
man ur my last chance do u have any code for binary search on a file
thanks
sam
|
|
|
|
|
The new Visual Basic Express looks like it would be cool to try out. Will it mess up any of my Visual Studio .net 2003 projects, and asp .net 1.1 sites? Thanks
|
|
|
|
|
I would HIGHLY suggest making copies of them BEFORE you attempt to open them in Express. Opening your current projects in the new 2005 editions of VS.NET will upgrade the projects to the VS.NET 2005 Project formats, making them unusable in VS.NET 2003 and below.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I was only going to open my old projects with Visual Studio .NET 2003. If I didn't open them in the new version, will they still get messed up? I'll make a backup just in case though.
|
|
|
|
|
Nope. So long as you don't do anything with them in 2005, there's no problem.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|