|
Yes, I am opening a file and don't want the my updateList method to run because it opens a file too and I get a error stating it is already open. So, I was able to stop the timer in the Edit_click method but not the onchanged method. WHy? Any ideas?
|
|
|
|
|
Hi Cory,
I am sorry, but as I don't know your app, I don't understand what you mean.
The only thing I can think of that you could try is to add a second timer.
Good luck,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Can anyone help me with this?
I am able to stop and start the timer on my program when I click something. But when I try to stop and start a timer in a method that runs when a file is updated, it would stop the timer. WHY?:
Private Sub OnChanged(ByVal source As Object, ByVal e As FileSystemEventArgs)<br />
Me.updateTimer.Stop()<br />
frm.OpenFile(OpenCertainFile)<br />
Do While Not EOF(1) <br />
<br />
Input(1, Str.Ticket)<br />
Input(1, Str.Hauler)<br />
Input(1, Str.Truck)<br />
Input(1, Str.Material)<br />
Input(1, Str.DateIn)<br />
Input(1, Str.DateOut)<br />
Input(1, Str.WeighIn)<br />
Input(1, Str.WeighOut)<br />
Input(1, Str.NetWeigh)<br />
Input(1, Str.Loader)<br />
<br />
<br />
If Str.Ticket = newDataGrid.Item(newDataGrid.CurrentRowIndex, count).ToString Then<br />
MessageBox.Show("Same")<br />
Else<br />
MessageBox.Show("Not same")<br />
End If<br />
count = count + 1<br />
Loop<br />
<br />
FileClose(1)<br />
<br />
<br />
<br />
Me.updateTimer.Start()
|
|
|
|
|
i am not too familiar with events in .net
I am wishing make my program fire an event when a variable changes, how can I do that?
thx
|
|
|
|
|
2hdass wrote: I am wishing make my program fire an event when a variable changes, how can I do that?
You can't.
If the variable is a field on the class then you should encapsulate it in a property and have the property's setter fire the event.
This article[^] shows how to use events (See the sibling to sibling section). The event is fired from a method, but a property is just syntactic sugar for a get or set method anyway.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
Thx
The app I am writing actually wants to read the System's Power State using P/Invoke to the Win32 API on my WM5.0 PDA. I am wondering if there is a predefined event already included in the library/
|
|
|
|
|
could u please tell me a way to send data from a listbox to textbox vb.net 2005
|
|
|
|
|
sixecho wrote: could u please tell me a way to send data from a listbox to textbox vb.net 2005
What data do you want to send from the list box?
Let's assume you mean that you want the text box to display the currently selected item in the list box.
MyTextBox.Text = MyListBox.SelectedItem.ToString();
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
this code was helpful but what i really wanted was to get all the items in the list box at once to the text box...(without selecting any item)...
|
|
|
|
|
Then iterate over the items collection.
For Each Object item In MyListBox.Items<br />
...
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
I need a button that when the user runs the mouse over the button (not click) the color of the button's border changes (showing the user that the mouse is in the button's active area). I cannot find anyway to change the color so any hints would be very helpful.
Thanks!
Natalie
|
|
|
|
|
DotNet Button Control is exactly what you are talking about.whats the problem with that?
A.E.K
|
|
|
|
|
A.E.K wrote: DotNet Button Control is exactly what you are talking about.whats the problem with that?
How do I change the color of the border (from black to something else)?
|
|
|
|
|
hie guys,
i am developing a call logging system using VB.Net and SQL 2005 . How do i calculate the downtime of a job (i.e. the difference between the time call is logged and when call is closed) excluding weekends and non-working-hours.
thanks, i am stack........
|
|
|
|
|
i think you must log the downtime call to your database and when the call is closed. then get the difference of the two.
Don't block the drive way of all the newbies in programming.
|
|
|
|
|
klaydze wrote: i think you must log the downtime call to your database and when the call is closed. then get the difference of the two.
Don't block the drive way of all the newbies in programming
yep, thats pretty straight klaydze; maybe i did not point out clear that i need to EXCLUDE weekends and non-working-times(i.e. time b4 8am and time after 5pm).
e.g. if a call is logged on Friday 8am and closed the following Monday 17pm, for a business thats runs 9 hours a day; the downtime should be 18hrs NOT all inclusive hours from Friday 8am to Monday 5pm.
thanks,
|
|
|
|
|
I have build an application where I create an extension "alm". Now I want to register this extension so that on double click of any file with "alm" Extension should run my application.
Regards
|
|
|
|
|
The easiest way is interactively:
double-click a file with that extension in Windows Explorer
when it shows its dialog telling "Windows can not open..." choose "select from list",
then "Browse", browse to your exe file, check the checkbox "Always use..." and
click "OK". This will create a permanent link and register it.
You can do that programmatically also, I don't know the details be heart.
|
|
|
|
|
Thanks Pattyn
I have posted this message here because I need to do it programmatically.
|
|
|
|
|
Hi,
search CodeProject for file association
(that would have worked yesterday too)
|
|
|
|
|
i want my program to load graphics from a directory and display them onscreen... how do i go about doing this?
|
|
|
|
|
I'm assuming the files are pictures (jpg,jpeg,gif,tiff,...)
than you can just go to the directory and for every picture you find in it you create a picturebox with the imagepath to that directory/picturename
|
|
|
|
|
hi all
i need to write the click event of the form's close button on the upper right corner of the form usualy the X button
how can i do this
|
|
|
|
|
Handle the Form's Closed or Closing event based on what you want to do. In VS .net 2005, they have been renamed to FormClosed and FormClosing
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
There are two kinds of people, those who do the work and those who take the credit. Try to be in the first group; there is less competition there. - Indira Gandhi
|
|
|
|