Click here to Skip to main content
15,887,342 members
Home / Discussions / C#
   

C#

 
GeneralRe: Make Transparent....??? Pin
S K Y16-Mar-09 14:52
S K Y16-Mar-09 14:52 
GeneralRe: Make Transparent....??? Pin
#realJSOP18-Mar-09 1:22
mve#realJSOP18-Mar-09 1:22 
QuestionGridView and SEO Pin
Feddo0415-Mar-09 15:13
Feddo0415-Mar-09 15:13 
AnswerRe: GridView and SEO Pin
Colin Angus Mackay15-Mar-09 15:47
Colin Angus Mackay15-Mar-09 15:47 
GeneralRe: GridView and SEO Pin
Feddo0415-Mar-09 16:04
Feddo0415-Mar-09 16:04 
GeneralRe: GridView and SEO Pin
Colin Angus Mackay15-Mar-09 16:11
Colin Angus Mackay15-Mar-09 16:11 
GeneralRe: GridView and SEO Pin
Feddo0420-Mar-09 5:09
Feddo0420-Mar-09 5:09 
QuestionObjects on another form Pin
Jon Henry15-Mar-09 13:45
Jon Henry15-Mar-09 13:45 
mi working on a media player using window media player. I have a function setup on my main form where the media player object is.
public void playSong(string path)
{
    label4.Text = path;
    WMP.URL = path;
}


I have a class called utility that im using to pass in to the media player what I want to play. All works fine but one thing. In the class, I have to create a new instance of the object to gain access to the function.
public void playSelection(int ID)
{
     OleDbConnection musLibConn = new OleDbConnection();
     utility util = new utility();
     musLibConn.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\GeneSys\Library.mdb";
     musLibConn.Open();

     OleDbCommand selLib = new OleDbCommand("SELECT Path FROM Library WHERE ID ="+ID, musLibConn);
     OleDbDataReader drLib = selLib.ExecuteReader();
     int idxPath = drLib.GetOrdinal("Path");
     drLib.Read();
     Path = (string)drLib.GetValue(idxPath);
     <big>frmMain frmMain = new frmMain();</big>
     frmMain.playSong(Path);
}


How can I gain access withot having to create the newobject so that I can use the media player instance that stays open on the main form all the time?
AnswerRe: Objects on another form Pin
Christian Graus15-Mar-09 14:11
protectorChristian Graus15-Mar-09 14:11 
GeneralRe: Objects on another form Pin
Jon Henry15-Mar-09 14:30
Jon Henry15-Mar-09 14:30 
GeneralRe: Objects on another form Pin
Christian Graus15-Mar-09 18:39
protectorChristian Graus15-Mar-09 18:39 
AnswerRe: Objects on another form Pin
Natza Mitzi15-Mar-09 21:23
Natza Mitzi15-Mar-09 21:23 
Questionbind property to selected row from datagridview Pin
jogisarge15-Mar-09 10:15
jogisarge15-Mar-09 10:15 
AnswerRe: bind property to selected row from datagridview Pin
Mycroft Holmes15-Mar-09 14:09
professionalMycroft Holmes15-Mar-09 14:09 
Questiongenerate code dynamically ? Pin
Mubeen.asim15-Mar-09 9:53
Mubeen.asim15-Mar-09 9:53 
AnswerRe: generate code dynamically ? Pin
Pete O'Hanlon15-Mar-09 10:03
mvePete O'Hanlon15-Mar-09 10:03 
Questioncharacter recognition Pin
Swati Khanna15-Mar-09 7:15
Swati Khanna15-Mar-09 7:15 
AnswerRe: character recognition Pin
Xmen Real 15-Mar-09 7:48
professional Xmen Real 15-Mar-09 7:48 
AnswerRe: character recognition Pin
Christian Graus15-Mar-09 10:11
protectorChristian Graus15-Mar-09 10:11 
QuestionI thought I couldn't shadow... Pin
likefood15-Mar-09 6:39
likefood15-Mar-09 6:39 
AnswerRe: I thought I couldn't shadow... Pin
Steve_15-Mar-09 7:36
Steve_15-Mar-09 7:36 
GeneralRe: I thought I couldn't shadow... Pin
likefood15-Mar-09 7:52
likefood15-Mar-09 7:52 
GeneralRe: I thought I couldn't shadow... Pin
Steve_15-Mar-09 11:00
Steve_15-Mar-09 11:00 
AnswerRe: I thought I couldn't shadow... Pin
N a v a n e e t h15-Mar-09 7:53
N a v a n e e t h15-Mar-09 7:53 
AnswerRe: I thought I couldn't shadow... Pin
likefood15-Mar-09 8:04
likefood15-Mar-09 8:04 

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.