|
mimi8469 wrote: am doin my dissertation on cd database in C#.
You do realise that your code isn't C# don't you? I can't read the sample either because it is too spaced out - please use the <pre> tags around the sample code and format it so that it can be read.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
yes i know its in vb.net. but i can easily convert it to c# with a special software. I just really need help with the copying of cd contents pls. the re-formatted version is below. would really appreciate it.
<code> Imports System
<code>Imports System.Collections.Generic
<code>Imports System.ComponentModel
<code>Imports System.Data
<code>Imports System.Drawing
<code>Imports System.Text
<code>Imports System.Windows.Forms
<code>Namespace CdRomManagement </code>
<code>Public Partial Class Form1
Inherits Form
Public Sub New()
InitializeComponent()
End Sub
<code>Private Sub axWindowsMediaPlayer1_CdromMediaChange(ByVal sender As Object, ByVal e As AxWMPLib._WMPOCXEvents_CdromMediaChangeEvent) </code>
<code> axWindowsMediaPlayer1.currentPlaylist = axWindowsMediaPlayer1.cdromCollection.Item(e.cdromNum).Playlist </code>
<code>axWindowsMediaPlayer1.Ctlcontrols.play() </code>
<code>'this.textBox1.Text = axWindowsMediaPlayer1.currentMedia.getItemInfo("Name");</code>
<code> Me.textBox1.Text = ("Name: " & axWindowsMediaPlayer1.currentMedia.getItemInfo("Name")) + Environment.NewLine </code>
<code> Me.textBox1.Text += ("author: " & axWindowsMediaPlayer1.currentMedia.getItemInfo("author")) + Environment.NewLine </code>
<code> Me.textBox1.Text += ("Title: " & axWindowsMediaPlayer1.currentMedia.getItemInfo("Title")) + Environment.NewLine </code>
<code>Me.textBox1.Text += ("Album: " & axWindowsMediaPlayer1.currentMedia.getItemInfo("Album")) + Environment.NewLine </code>
<code>Me.textBox1.Text += ("copyright: " & axWindowsMediaPlayer1.currentMedia.getItemInfo("copyright")) + Environment.NewLine </code>
<code>Me.textBox1.Text += ("Artist: " & axWindowsMediaPlayer1.currentMedia.getItemInfo("Artist")) + Environment.NewLine </code>
<code>Me.textBox1.Text += ("Genre: " & axWindowsMediaPlayer1.currentMedia.getItemInfo("Genre")) + Environment.NewLine </code>
<code>Me.textBox1.Text += ("Bitrate: " & axWindowsMediaPlayer1.currentMedia.getItemInfo("Bitrate")) + Environment.NewLine </code>
<code>Me.textBox1.Text += ("Abstract: " & axWindowsMediaPlayer1.currentMedia.getItemInfo("Abstract")) + Environment.NewLine </code>
<code>Me.textBox1.Text += ("bitRate: " & axWindowsMediaPlayer1.currentMedia.getItemInfo("bitRate")) + Environment.NewLine </code>
<code> Me.textBox1.Text += ("duration: " & axWindowsMediaPlayer1.currentMedia.getItemInfo("duration")) + Environment.NewLine</code>
End Sub
End Class
End Namespace
|
|
|
|
|
Waw. It is looking much much better now. I wouldn't change a single character, it would only ruin the subtle balance you created.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Well, you've got an event handler here, axWindowsMediaPlayer1_CdromMediaChange. Does it get called? Do you have a hookup on the event, e.g.
axWindowsMediaPlayer1.OnCdromMediaChange += new CdromMediaChange(axWindowsMediaPlayer1_CdromMediaChange);
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
What error are you getting? And by the way this would probably be better in the vb forums.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
am not getting any errors. its just not copying the cd contents like the artist, song , etc after the cd is put in cd drive.
|
|
|
|
|
Are you sure the event is being fired? Put a break point inside the event handler and step through the code. I don't see any obvious mistake in the code.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
Hi. I need to find the location and size of the taskbar within a Windows environment so that I can finish some coding in a windows forms configuration library that I have built based on some code that I originally got from another Code Project post. What I specifically need to know is the bounds of the Primary Screen not including the taskbar if it is displayed and locked.
Is there are .NET Framework class for that will provide this or will I need to go to the Windows API? My searches thus far in MSDN and here have not been helpful.
Any help greatly appreciated. Thanks.
|
|
|
|
|
Take a look at Screen.WorkingArea [^];
Gets the working area of the display. The working area is the
desktop area of the display, excluding taskbars, docked windows,
and docked tool bars.
I are Troll
|
|
|
|
|
Greating, How I can install Visual Studio 2008 Service Pack 1 without internet connection? I need install SQL Server 2008, but the wizard installer say me, Visual Studio 2008 Service Pack 1 is necesary. Exist any way?.
Thanks.
|
|
|
|
|
Edison1885 wrote: How I can install Visual Studio 2008 Service Pack 1 without internet connection?
Use the ISO format installation package[^].
If you've never worked with iso image files, there's some info here[^].
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
It looks like they copied the same info from the online installer.
Try it!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Yes, It worked, I use Alcohol 120% for the ISO files, Thanks very much.
But Now I have a problem installed SQL Server 2008 64x on Windows 7, the installer show me some mistakes like can't install the Database Motor.
Again Thanks very much.
|
|
|
|
|
Edison1885 wrote: Now I have a problem installed SQL Server 2008 64x on Windows 7, the installer show me some mistakes like can't install the Database Motor.
I'm not sure about that one. I'm using SQL Server 2008 on
Windows 7 and I don't recall any install issues. I did
install it before Visual Studio so I wouldn't get 2005,
however. Is there another version installed?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Ok, I go to install SQL Server 2008 32 bits on Windows 7.
Greatings and Thank you very much.
|
|
|
|
|
Edison1885 wrote: I go to install SQL Server 2008 32 bits on Windows 7.
I didn't say that. I meant I use SQL Server 2008 x64 on
Windows 7 x64 with no issues. If you're on Windows 7 x86
then you'll need to use the 32-bit SQL server.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
No, I have Windows 7 64 bits and I can't install perfectly SQL server 2008 64 bits.
|
|
|
|
|
Make sure you have .NET framework 3.5 SP1 installed.
If you have any previous versions/instances of SQL server
installed that you aren't using, you can remove those first
as well.
But if you want to use 32-bit SQL server go right ahead
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
So...Perhaps is it, I tried install SQL Server 2005 64 bits, but I had too problems, I don't if is the DVD installer or another problem.
I go to remove some SQL Server 2005 component installed.
Thanks.
|
|
|
|
|
Maybe some info in the SQL Server 2008 SP1 release notes[^]
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thank you, I go to see the release notes and the SQL Servers installers options this weekend.
Greatings.
|
|
|
|
|
I solved the problem, an msi file from installer was with other name.
Thanks very much.
|
|
|
|
|
I get the following error msg while compiling the code.
1. Cannot implicitly convert type 'System.Data.SqlClient.SqlDataReader' to 'System.Data.SqlClient.SqlDataAdapter'
2. 'System.Data.SqlClient.SqlDataAdapter' does not contain a definition for 'Read'
public static List<class1> GetEmp()
{
List<class1> GetEmp = new List<class1>();
SqlConnection conn = new SqlConnection(@"server=XXXX; Initial Catalog=xxxxxx");
SqlCommand cmd = new SqlCommand("Select EmpId, Name, Address from tblTemp", conn);
using (conn)
{
conn.Open();
SqlDataAdapter dr = cmd.ExecuteReader();
while (dr.Read())
{
GetEmp.Add(new Class1(dr["EmpId"].ToInt, dr["Name"].ToString(), dr["Address"].ToString()));
}
}
return GetEmp;
}
|
|
|
|