Whats the MP equivilent of Application.DoEvents(); (1 Viewer)

egonspengleruk

Retired Team Member
  • Premium Supporter
  • June 30, 2005
    250
    0
    In my MP3 ripping code, I have code that hogs the CPU for large amounts of time causing the entire MP screen to white out. In the original code there are lots of DoEvents calls, but MP seems to not like me using these.
    What method should I be using to let the rest of Windows operate while my code runs.

    Egon
     

    egonspengleruk

    Retired Team Member
  • Premium Supporter
  • June 30, 2005
    250
    0
    samuel337 said:
    Should you be using threading for that - running the CD ripping thread on a different one to the UI one so that the UI continues to work...

    I guess if you've fixed it now, it doesn't really matter.

    San

    It would probably be a good idea......but this is just my first mock up to prove it all works.
    Do you have any links or example code that demo's threading in C#? Im learning as I go here :)

    Egon
     

    samuel337

    Portal Pro
    August 25, 2004
    772
    0
    Melbourne, Australia
    I don't have any great examples - I'm a VB.NET guy learning C# so I know how to do it, but I don't have any great examples.

    You could check out the code that MP uses to update the database within MP or the code that MP uses to update the TVGuide - both those use threading.

    Sam
     

    MrSensitive

    Portal Pro
    May 18, 2004
    239
    0
    Belgium
    Hi,

    the easiest way is to use a backgroundworker..
    Visual studio 2005 has one ready in the toolbox.
    it wraps all the threading stuff in a nice package.. and is very easy to use..

    (i'm using a custom one in my pocketpc application to poll the server every second)
     

    Users who are viewing this thread

    Similar threads

    Previous posts not related to this thread have been moved here
    Previous posts not related to this thread have been moved here
    While we are chatting, now get mad, you know that I said I would refactor the database to get rid of any redundancies. I've done...
    Replies
    396
    Views
    23K
    Hi, must be really a while, cuz I can not remember any post from you ;) But might be also that I joined the team too late. Yes, there will be many things. Main reason is simply, that MP2 is not developed based on MP1. I for example never used MP1. I tried it lately to test voice control and was shocked about many inconsistancies in...
    Hi, must be really a while, cuz I can not remember any post from you ;) But might be also that I joined the team too late. Yes...
    It´s been a while... :) Well, simply the reason is cause MP1 was working so well... :) Now I decided to upgrade my old servers and...
    Replies
    1
    Views
    1K
    MP1 MP2 MP 1.23 Key Mapping DE
    Ok I've spent way too much time on this but for the sake of other users that are having problems and searching for answers here is the final result. To clarify this testing has been carried out using MP 1.23 using PureVisionHD Skin and a HID keyboard with MP/Config/Remotes set to HID "full" profile - Enable HID - Use HID keyboard...
    Ok I've spent way too much time on this but for the sake of other users that are having problems and searching for answers here is...
    I recently upgraded from MP 1.14 to MP 1.23. In 1.14 I was using the InputPlugIn to map my remote keys and all was working fine. In...
    Replies
    14
    Views
    3K
    Hello, Thanks for your comments. Generally we recommend to also take a look at the Wiki where many questions are answered. Right - and we explicitly say so in case of the installation not working.;) I guess there is a 50:50 chance if you have two network adapters. I am not sure if "Auto" will automatically use one or the other...
    Hello, Thanks for your comments. Generally we recommend to also take a look at the Wiki where many questions are answered. Right...
    Hello ! I've installed the latest version (2.2 client-server mode) on a fresh new installation of windows 7 and here is my...
    Replies
    1
    Views
    764
    I found the same anyone starting out can very easily get lost in the plugin then patch then ask for help which can be a while coming round about as the are sometimes a few patches that apply to a specific problem and sometimes need to be applied in a specific order for the fix to be successful. Do this for all the plugins you would...
    I found the same anyone starting out can very easily get lost in the plugin then patch then ask for help which can be a while...
    Hi everyone. I am a big fan of MediaPortal. I have been using it for several years now and I hope to do so in the future. I have a...
    Replies
    6
    Views
    2K
    Top Bottom