Create an event handler for a third party library that I use

Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Oct 2009
Posts: 3
Reputation: papageorge is an unknown quantity at this point 
Solved Threads: 0
papageorge papageorge is offline Offline
Newbie Poster

Create an event handler for a third party library that I use

 
0
  #1
Oct 29th, 2009
Hello,

I am developing an application and I use a 3rd party library which is basically Native excel. The problem is that this library does not implement an event which is able to notify me when the value of a cell value changes. Can I do it in my program and how?

(I thought that I could posible do sth like this :

  1. while(OLDvalue=NEWvalue)
  2. end while
  3. MsgBox("The value has changed")

but this is a very slow procedure so is there a better way or I will have to stick to this)
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 307
Reputation: TomW is on a distinguished road 
Solved Threads: 44
TomW TomW is offline Offline
Posting Whiz
 
0
  #2
Oct 30th, 2009
The problem with the above statement is this loop will run constantly looking for this new value. You could change this to a timer event where you can set the interval of how often it checks to see if the value has change but again this is something that will run in the background until it either finds the changed value or is explicitily coded to turn off. I prefer not to have things such as this run in the background whenever possibile (although sometimes it may be unavoidable). I'm not sure what your app is doing but if possible I would suggest something where the user clicks a control on your form when there ready to get/save the changes.
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 3
Reputation: papageorge is an unknown quantity at this point 
Solved Threads: 0
papageorge papageorge is offline Offline
Newbie Poster
 
0
  #3
Oct 30th, 2009
I saw this thread http://www.daniweb.com/forums/thread124842.html# I didnt understand a lot but does this help?
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,264
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 582
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast
 
0
  #4
Oct 31st, 2009
Create another class to encapsulate the third party library. This way you will be able to wire up events and handle any business logic when properties are being modified.
Last edited by sknake; Oct 31st, 2009 at 10:33 am.
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 3
Reputation: papageorge is an unknown quantity at this point 
Solved Threads: 0
papageorge papageorge is offline Offline
Newbie Poster
 
0
  #5
32 Days Ago
thank you
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the VB.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC