Click here to Skip to main content
15,896,912 members
Home / Discussions / C#
   

C#

 
GeneralRe: run some event after the form has been loaded Pin
DaveyM698-Jul-08 10:59
professionalDaveyM698-Jul-08 10:59 
AnswerRe: run some event after the form has been loaded Pin
PIEBALDconsult8-Jul-08 10:51
mvePIEBALDconsult8-Jul-08 10:51 
Questionloading the header of document file Pin
Miss_hacker8-Jul-08 10:02
Miss_hacker8-Jul-08 10:02 
AnswerRe: loading the header of document file Pin
Nitrus8-Jul-08 10:20
Nitrus8-Jul-08 10:20 
JokeRe: loading the header of document file Pin
PIEBALDconsult8-Jul-08 10:57
mvePIEBALDconsult8-Jul-08 10:57 
GeneralRe: loading the header of document file Pin
leppie8-Jul-08 20:50
leppie8-Jul-08 20:50 
JokeRe: loading the header of document file Pin
PIEBALDconsult9-Jul-08 5:04
mvePIEBALDconsult9-Jul-08 5:04 
QuestionPossible bug! iTunes event handlers do not work with Clipboard! Pin
Nitrus8-Jul-08 9:43
Nitrus8-Jul-08 9:43 
Does anyone know why the Clipboard will not work while it's nested within the iTunes event handler? I cannot figure this out for the life of me. Source noted code below.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using iTunesLib;

namespace WIKDSPK
{
public partial class Form1 : Form
{
private iTunesAppClass m_iTunes = new iTunesAppClass();
public Form1()
{
InitializeComponent();
try
{
m_iTunes.OnPlayerPlayEvent += new _IiTunesEvents_OnPlayerPlayEventEventHandler(m_iTunes_OnPlayerPlayEvent);
}
catch(COMException)
{
Application.Exit();
}
}
protected void m_iTunes_OnPlayerPlayEvent(object iTrack)
{
string iTArtist = ((IITTrack)iTrack).Artist;
string iTName = ((IITTrack)iTrack).Name;
string iTAlbum = ((IITTrack)iTrack).Album;
string m_iClipStr = "Now Playing [ Artist: " + iTArtist + " Name: " + iTName + " Album: " + iTAlbum + " ] www.wickedradio.org";
MessageBox.Show("THIS IS A TEST!"); //This works!
Clipboard.SetText("THIS IS A TEST!"); //This does nothing!
Clipboard.SetText(m_iClipStr); //This does nothing!
}
private void Form1_Load(object sender, EventArgs e)
{
Clipboard.SetText("THIS IS A TEST!"); //This works!
m_iTunes.Resume();
}
private void Form1_FormClosed(object sender, FormClosedEventArgs e)
{
m_iTunes.Quit();
}
}
}

### DEBUG INFORMATION ###

+ this {WIKDSPK.Form1} WIKDSPK.Form1
+ iTrack {System.__ComObject} object {System.__ComObject}
iTArtist "Andy C" string
iTName "Vault" string
iTAlbum "Nightlife [IMPORT]" string
m_iClipStr "Now Playing [ Artist: Andy C Name: Vault Album: Nightlife [IMPORT] ] www.wickedradio.org" string

modified on Tuesday, July 8, 2008 7:57 PM

AnswerRe: Possible bug! iTunes event handlers do not work with Clipboard! Pin
leppie8-Jul-08 22:37
leppie8-Jul-08 22:37 
QuestionScope of variable Pin
zafersavas8-Jul-08 9:28
zafersavas8-Jul-08 9:28 
AnswerRe: Scope of variable Pin
Luc Pattyn8-Jul-08 9:31
sitebuilderLuc Pattyn8-Jul-08 9:31 
GeneralRe: Scope of variable Pin
zafersavas8-Jul-08 9:38
zafersavas8-Jul-08 9:38 
GeneralRe: Scope of variable Pin
Luc Pattyn8-Jul-08 9:43
sitebuilderLuc Pattyn8-Jul-08 9:43 
GeneralRe: Scope of variable Pin
Frank Horn8-Jul-08 10:41
Frank Horn8-Jul-08 10:41 
AnswerRe: Scope of variable Pin
PIEBALDconsult8-Jul-08 10:25
mvePIEBALDconsult8-Jul-08 10:25 
AnswerRe: Scope of variable Pin
Nirandas8-Jul-08 17:56
Nirandas8-Jul-08 17:56 
GeneralRe: Scope of variable Pin
zafersavas9-Jul-08 6:16
zafersavas9-Jul-08 6:16 
Questionwhat's mail Pin
fazel dehghani8-Jul-08 8:33
fazel dehghani8-Jul-08 8:33 
AnswerRe: what's mail Pin
DaveyM698-Jul-08 8:48
professionalDaveyM698-Jul-08 8:48 
AnswerRe: what's mail Pin
Christian Graus8-Jul-08 14:28
protectorChristian Graus8-Jul-08 14:28 
AnswerRe: what's mail Pin
Paul Conrad8-Jul-08 15:45
professionalPaul Conrad8-Jul-08 15:45 
Questionhow to asterisk in datagrid Pin
netJP12L8-Jul-08 7:35
netJP12L8-Jul-08 7:35 
AnswerRe: how to asterisk in datagrid Pin
led mike8-Jul-08 8:53
led mike8-Jul-08 8:53 
AnswerRe: how to asterisk in datagrid Pin
PIEBALDconsult8-Jul-08 9:16
mvePIEBALDconsult8-Jul-08 9:16 
QuestionAdding a DBNull value as a parameter to a Int32 database field. Pin
Steve Holdorf8-Jul-08 7:01
Steve Holdorf8-Jul-08 7:01 

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.