Click here to Skip to main content
15,902,189 members
Home / Discussions / C#
   

C#

 
QuestionPost Access Data Tables to a ListView Box Pin
PDTUM17-Jun-10 16:56
PDTUM17-Jun-10 16:56 
AnswerRe: Post Access Data Tables to a ListView Box Pin
Dan Mos17-Jun-10 17:11
Dan Mos17-Jun-10 17:11 
GeneralRe: Post Access Data Tables to a ListView Box Pin
PDTUM17-Jun-10 18:32
PDTUM17-Jun-10 18:32 
AnswerRe: Post Access Data Tables to a ListView Box Pin
PatrickPantao17-Jun-10 17:28
PatrickPantao17-Jun-10 17:28 
GeneralRe: Post Access Data Tables to a ListView Box Pin
PDTUM17-Jun-10 18:28
PDTUM17-Jun-10 18:28 
QuestionDoes Control binding really worth ? [modified] Pin
Xmen Real 17-Jun-10 14:40
professional Xmen Real 17-Jun-10 14:40 
AnswerRe: Does Control binding really worth ? Pin
Xmen Real 17-Jun-10 15:47
professional Xmen Real 17-Jun-10 15:47 
Question[SOLVED] small problem with mci playback Pin
klm201017-Jun-10 10:51
klm201017-Jun-10 10:51 
hello,

i'm programming a small game.
in the background should run a thread that plays background music.
in another thread there are running the soundeffects.
when i run my project everything works.
my system is win7 64bit.
when the same project is run under a win7 32bit machine the mci player can't find the device.
the alias (guid) is correct), any idea how to fix it?

BackgroundMusic = new MCIPlayback(Properties.Settings.Default.SOUNG_MUTE);

BackgroundMusic.Open(soundFilePath, "mpegvideo");//mp3player

BackgroundMusic.Play();


    private String alias;
  
    /// <summary>
    /// Initializes a new instance of the <see cref="MCIPlayback"/> class.
    /// </summary>
    public MCIPlayback(bool m)
    {
      muted = m;
      this.alias = Guid.NewGuid().ToString("N");
    }

    /// <summary>
    /// Öffnet einen Stream.
    /// </summary>
    /// <param name="file">Datei</param>
    /// <param name="type">Medientyp (siehe Klasssenbeschreibung)</param>
    public void Open(string file, string type)
    {
      this.alias = Guid.NewGuid().ToString("N");
      name = file;
       string cmd = "open \"" + name + "\" type " + type + " alias \"" + alias + "\"";
       // Guid.NewGuid().ToString("N") 
        
      int errCode = mciSendString(cmd, null, 0, IntPtr.Zero);
      if (errCode == 0)
        isOpen = true;
      CheckError(errCode);
    }


    /// <summary>
    /// Plays the new track. :-)
    /// </summary>
    /// <param name="file">The file.</param>
    public void PlayNewTrack(string file)
    {
      Stop();
      //Close();
      Open(file, "mpegvideo"); //mpegvideo
      Play();
    }


    /// <summary>
    /// Mutes this instance.
    /// </summary>
    public void mute()
    {
      muted = true;
      Pause();
    }



    /// <summary>
    /// Spielt geladenen Stream ab.
    /// </summary>
    public void Play()
    {
      if (muted)
      {
        Pause();
        return;
      }
      if (!isOpen)
        return;
     // SeekToStart();
      string cmd = "play \"" + name + "\"";
      int errCode = mciSendString(cmd, null, 0, IntPtr.Zero);
      CheckError(errCode);
    }
}



i have no clue, thx!

p.s.
the error code is
MCIERR_INVALID_DEVICE_NAME 263

modified on Thursday, June 17, 2010 6:15 PM

AnswerRe: small problem with mci playback Pin
klm201017-Jun-10 12:15
klm201017-Jun-10 12:15 
QuestionHow to remove a registry key during un-install (with the VS Setup Project) Pin
Kaare Tragethon17-Jun-10 8:49
Kaare Tragethon17-Jun-10 8:49 
AnswerRe: How to remove a registry key during un-install (with the VS Setup Project) Pin
Not Active17-Jun-10 9:47
mentorNot Active17-Jun-10 9:47 
GeneralRe: How to remove a registry key during un-install (with the VS Setup Project) Pin
Kaare Tragethon17-Jun-10 10:59
Kaare Tragethon17-Jun-10 10:59 
GeneralRe: How to remove a registry key during un-install (with the VS Setup Project) Pin
Not Active17-Jun-10 11:17
mentorNot Active17-Jun-10 11:17 
GeneralRe: How to remove a registry key during un-install (with the VS Setup Project) Pin
Kaare Tragethon17-Jun-10 23:16
Kaare Tragethon17-Jun-10 23:16 
GeneralRe: How to remove a registry key during un-install (with the VS Setup Project) Pin
Not Active18-Jun-10 0:48
mentorNot Active18-Jun-10 0:48 
GeneralRe: How to remove a registry key during un-install (with the VS Setup Project) Pin
Kaare Tragethon18-Jun-10 1:45
Kaare Tragethon18-Jun-10 1:45 
QuestionSAPI speech problem! Pin
Warren2kx17-Jun-10 8:19
Warren2kx17-Jun-10 8:19 
AnswerRe: SAPI speech problem! Pin
Ravi Bhavnani17-Jun-10 8:49
professionalRavi Bhavnani17-Jun-10 8:49 
GeneralRe: SAPI speech problem! Pin
Warren2kx21-Jun-10 11:08
Warren2kx21-Jun-10 11:08 
GeneralRe: SAPI speech problem! Pin
Ravi Bhavnani21-Jun-10 11:13
professionalRavi Bhavnani21-Jun-10 11:13 
QuestionWhy cannot delegate set the form control? Pin
yu-jian17-Jun-10 7:55
yu-jian17-Jun-10 7:55 
AnswerRe: Why cannot delegate set the form control? Pin
Abhinav S17-Jun-10 8:08
Abhinav S17-Jun-10 8:08 
AnswerRe: Why cannot delegate set the form control? Pin
Luc Pattyn17-Jun-10 8:17
sitebuilderLuc Pattyn17-Jun-10 8:17 
AnswerRe: Why cannot delegate set the form control? Pin
Adam R Harris17-Jun-10 9:07
Adam R Harris17-Jun-10 9:07 
QuestionPInvoke for DirectoryInfo Class Pin
CodingDaddy17-Jun-10 7:12
CodingDaddy17-Jun-10 7:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.