INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: "Plug-In Mode" can it be changed when the plugin is running?  (Read 3034 times)

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
"Plug-In Mode" can it be changed when the plugin is running?
« on: August 29, 2002, 11:01:08 am »

i know if you change the plugin mode to = 1 that keeps the plug-in loaded. but is there a way to change the mode when the program is running?
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

Nikolay

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1681
  • Former CTO, JRiver, Inc.
RE:
« Reply #1 on: August 29, 2002, 11:45:43 am »

NOPE.
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
RE:
« Reply #2 on: August 29, 2002, 12:35:29 pm »

ok

Thanks
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

RhinoBanga

  • Citizen of the Universe
  • *****
  • Posts: 1703
  • Developer
RE:
« Reply #3 on: August 29, 2002, 12:50:34 pm »

Why would you want to anyway?
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
RE:
« Reply #4 on: August 29, 2002, 01:24:54 pm »

well lets say i have it set to "1"

when a user selects the program, it loads up the playing now list.

they can now work with that list, if they go out of the plug-in they can go and delete a file in playing now or add to it.

when a user does that, that changes the the files and when a user goes back into ther program and tryes to edit or do something to the files it will not match to the orginal list pulled up in the list box.

this would mean that some of the data from one file could be mixed with another. unless there was a way to tell if a user left the plug-in and then came back. if i could now that then i could refreash the list before something happened that would be bad.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

RhinoBanga

  • Citizen of the Universe
  • *****
  • Posts: 1703
  • Developer
RE:
« Reply #5 on: August 29, 2002, 10:28:47 pm »

Why not put a change notification on the files you want to monitor?

You could either setup a timer and check to see if the files/playlist has changed or use the SHChangeNotify function.

There's plenty of examples of how to use then both in VB all over the place.
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
RE:
« Reply #6 on: August 30, 2002, 03:00:06 am »

Not sure I follow you how that will tell me if in MJ that VB option will tell me if the playing now list changed.

I will lookup the function.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

RhinoBanga

  • Citizen of the Universe
  • *****
  • Posts: 1703
  • Developer
RE:
« Reply #7 on: August 30, 2002, 03:05:20 am »

No.

In VB you setup a timer to call you, say, every 250 milliseconds and then you can see if the playlist has changed by comparing it to the list you had from the last call.

The SHChangeNotify function is used to determine if a physical file has changed.


I asked J River months ago for a notification facility but they wern't too keen on it.
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
RE:
« Reply #8 on: August 30, 2002, 06:01:31 am »

RhinoBanga

>> say, every 250 millisecond
I have not read anything yet, but if you used that option every 250 milliseconds and see if it changed sounds like it would take to much CPU more so if you had a large list and only the last entry was changed.

I was more thinking if they left and came back when a user used an option check to see if they left and came back if so reload the list.

I am going to go read now about it (I am not working now) and see if i can understand this function your talking about.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

RhinoBanga

  • Citizen of the Universe
  • *****
  • Posts: 1703
  • Developer
RE:
« Reply #9 on: August 30, 2002, 06:11:52 am »

You'd be surprised in how much work you can do in 250ms without affecting the CPU.

AV does a lot in it's 250ms cycle.

But I have found a better solution for you.

When MJ changes from the plugin to another screen, say Playing Now, it hides your control's window.

So in VB terms look at the UserControl_Hide/Show methods.   From that you can work out when a user enters/leaves your plugin.
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
RE:
« Reply #10 on: August 30, 2002, 07:00:42 am »

>> So in VB terms look at the UserControl_Hide/Show methods.
>> From that you can work out when a user enters/leaves your plugin.
I see no way to pull up show/hide for the main usercontrol form

I feel like I am at the deep end of the pool without a life guard
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

RhinoBanga

  • Citizen of the Universe
  • *****
  • Posts: 1703
  • Developer
RE:
« Reply #11 on: August 30, 2002, 07:04:17 am »

Sorry it's not methods it's events (it's tough trying to remember the terminology for so many languages).

Just add these lines to your main control's code:

Private Sub UserControl_Hide()
   MsgBox "Hide"
End Sub

Private Sub UserControl_Show()
   MsgBox "Show"
End Sub
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
RE:
« Reply #12 on: August 30, 2002, 07:21:30 am »

Excellent!

Nice and simple

Thanks.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA
Pages: [1]   Go Up