|
Hi,
I am Using Ax media Player in my window application in .net 2003,
I have added reference , now i want to play a video file,
how to go abt it.... i mean i any one send me the code as how to play a video file using Ax media player .........
Thanks in advance
byeeeeeeeeeeeeeee
with thanks and regards,
kaushik pulpa
|
|
|
|
|
What is the Ax media player ? Is it the windows media player control ? Have you tried to google for articles on it ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hello everybody...
i am beginner in this field...
i need some help please...
I've done a project which use crystal report to print a report...
my problem:
- in a form there is a textbox which i make it as a color options..
- when user choose a color the text box will change according what he/she chosen..
- the color will be save as one of the data in a database (SQL Server 2000)..
- but i save it as a code (there is a column called colorcode in my database)..
reason: i don't know how to save color in database
- then i use crystal report to print the form which has a color
- but in the column "colorcode", its only show the code but not color
example: -8355585 (blue color)
- please help me with any idea, how can i print a color instead of a code..
thank you very much for your help
|
|
|
|
|
It doesn't know what that number means. You'll have to save the string name of the color in the database too and add that column to your report if you want to do this.
|
|
|
|
|
thank you very much for your reply Dave..
but i'm very sorry, i do not understand...
how can the report will be printed with color if i add string type of column?
won't the report will show a text rather than the color code or a color itself?
will u explain a little bit..please..
and if i am wrong please correct me..
thanks..
|
|
|
|
|
zed83 wrote: how can the report will be printed with color if i add string type of column?
No, you have to store the color value twice. Once as the value you currently have and once as the name of the color. Then you can add either or both of those columns to the report.
|
|
|
|
|
hello,
Is it possible to create an windows taskbar item with for example a button on it.
Or a way to inject a button in the start menu for example under the run button.
thanks!
|
|
|
|
|
Possibly, but this would probably require writing an Explorer Shell Extension to do it. This is not going to be easy, and help with something like this is going to be sparse to be sure.
Or, I've misunderstood what you're talking about. What do you mean by a "Windows Media Player taskbar item"???
-- modified at 20:48 Wednesday 11th July, 2007
|
|
|
|
|
you need to look into something called a deskband, but almost all of the source code and help is in C#.
Posted by The ANZAC : "WWBD, What Would Buffy Do?" : "I don't know man, she's stronger than me"
|
|
|
|
|
Hi,
I've got some code that allows me to click a button to browse to a zip file, and populate a DataGridView with all of the file names contained within the zip.
What I now want to do is go a stage further, and allow the user to drag a zip file into the DataGridView, and perform the same routine.
For reference, the functionality to perform the unzip is provided via DotNetZipLib.zip
The code that I've been trying to get to work is:
Imports ionic.utils.zip<br />
<br />
Private Sub DataGridView1_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles DataGridView1.DragDrop<br />
<br />
Dim strFilePathAndName As String<br />
<br />
strFilePathAndName = DirectCast(e.Data.GetData(Windows.Forms.DataFormats.FileDrop), String)<br />
<br />
Dim zip As ZipFile<br />
zip = ZipFile.Read(strFilePathAndName)<br />
<br />
Dim tblZipFilesTable As DataTable = New DataTable("CompressedFiles")<br />
Dim ds As DataSet = New DataSet("ZipFile")<br />
<br />
ds.Tables.Add(tblZipFilesTable)<br />
<br />
tblZipFilesTable.Columns.Add("File name", GetType(String))<br />
tblZipFilesTable.Columns.Add("Columns in table", GetType(Integer))<br />
<br />
Dim tblRow As DataRow<br />
<br />
For Each file As ZipEntry In zip<br />
<br />
tblRow = tblZipFilesTable.NewRow<br />
<br />
tblRow.Item("File name") = file.FileName.ToString<br />
<br />
tblZipFilesTable.Rows.Add(tblRow)<br />
<br />
Next<br />
<br />
Me.DataGridView1.DataSource = ds<br />
Me.DataGridView1.DataMember = "CompressedFiles"<br />
<br />
With Me.DataGridView1<br />
<br />
.Columns(0).Width = 210<br />
.Columns(1).Width = 120<br />
<br />
End With<br />
<br />
Me.DataGridView1.Refresh()<br />
<br />
End Sub<br />
<br />
Private Sub DataGridView1_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles DataGridView1.DragEnter<br />
<br />
If e.Data.GetDataPresent(Windows.Forms.DataFormats.FileDrop) Then<br />
e.Effect = DragDropEffects.Copy<br />
Else<br />
e.Effect = DragDropEffects.None<br />
End If<br />
<br />
End Sub
But it doesn't do anything. When I set a breakpoint within the first few lines of "Sub DataGridView1_DragDrop", I find that it doesn't even go in here.
|
|
|
|
|
Resolved it ...
Private Sub DataGridView1_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles DataGridView1.DragDrop<br />
<br />
Dim strFilePathAndName As String() = DirectCast(e.Data.GetData(DataFormats.FileDrop), String())<br />
<br />
Dim zip As ZipFile<br />
zip = ZipFile.Read(strFilePathAndName(0))
|
|
|
|
|
When a user inputs data into the textbox
The textbox control provides a list of previous entered values
is there a way to disable this in vb.net web form .net 1.1
|
|
|
|
|
It's not the Textbox that's doing this. It's the users browser that's doing it, and no, you have no control over this from your ASP.NET code.
|
|
|
|
|
You will have to set the autocomplete property for your textbox. The intellisense of Visual studio 2003 doesn't provide you with the option.
<br />
<br />
<asp:TextBox id="txtControl" runat="server" autocomplete="off"></asp:TextBox>
You can do it at the form level by setting <form id="Form1" method="post" runat="server" autocomplete="off">
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
There are two kinds of people, those who do the work and those who take the credit. Try to be in the first group; there is less competition there. - Indira Gandhi
|
|
|
|
|
Hmmm...Shows you how much of an ASP.NET expert I am!
|
|
|
|
|
You can blame Microsoft , I have found many properties not showing up in the Intellisense or the properties window of the control . I guess we just need to learn from trial and error method and of course the experience.
For ex the intellisense of the DropDownList in visual studio 2005 doesn't show the SelectedValue property and I was trying to figure out a way to bind the DropDownList to the Gridview, just trying my luck, I typed in SelectedValue inside the tag and binded it to the gridview and it worked. I guess Microsoft needs to come out with a list of "Hey I have coded this but forgot to put it in the Intellisense list"
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
There are two kinds of people, those who do the work and those who take the credit. Try to be in the first group; there is less competition there. - Indira Gandhi
|
|
|
|
|
I want to select a row and get all data in every cell in all columns. I was able to get all cells by using VisibleColumnCount. But that only gives me 4 out of 8 of the cells. I have a conection to a database and putting it into a dataset and binding it to the datagrid. Is there a way to either get the total number of columns OR to get the whole row instead of cell by cell?
|
|
|
|
|
For idx As Int16 = 0 To Me.DataGridView1.Columns.Count - 1
MsgBox(Me.DataGridView1.SelectedRows(0).Cells(idx).Value)
Next
|
|
|
|
|
Is this available in 2003
|
|
|
|
|
No...
Do this to get the column count....
Dim iColCount As Int16 = 0
If TypeOf (Me.DataGrid1.DataSource) Is DataSet Then
iColCount = CType(Me.DataGrid1.DataSource, DataSet).Tables(0).Columns.Count
ElseIf TypeOf (Me.DataGrid1.DataSource) Is DataTable Then
iColCount = CType(Me.DataGrid1.DataSource, DataTable).Columns.Count
End If
|
|
|
|
|
How about getting count of columns on dataview as datasource?
|
|
|
|
|
there is a table property...
dim iColCount as int16
iColCount = oView.Table.columns.count
|
|
|
|
|
Can I do this with a Bind?
|
|
|
|
|
Hey
I have two big problems with my project.
I will post the whole code down under my question
What you will need to reproduce this code is a UserControl, on this usercontrol has to be a PictureBox and a Label
The problems are:
1) The mouseLeave Event is fired, even if I don't leave the usercontrol
2) After finishing the Animation, the picture box pops up to full size.
Maybe somone can help me? Here ist the code (VB2005)
<code>
Imports System.ComponentModel
Imports System.Reflection
Imports System.Threading
Public Class ISHilfe
#Region "Properties des Eigenschaftsfensters"
Dim _Bild As Image
< _
Description("Bild für Animation"), _
Category("Misc")> _
Public Property Bild() As Image
Get
Return (_Bild)
End Get
Set(ByVal value As Image)
Try
_Bild = value
pctBox.Image = value
pctBox.SizeMode = PictureBoxSizeMode.StretchImage
Catch
End Try
End Set
End Property
Dim _Labeltext As String
< _
Description("Text des Hilfelabels mit Mini Markup"), _
Category("Misc")> _
Public Property LabelText() As String
Get
Return _Labeltext
End Get
Set(ByVal value As String)
_Labeltext = value
End Set
End Property
#End Region
Dim pctAusblenden As New ThreadStart(AddressOf pctBoxVerkleinern)
Dim pctEinblenden As New ThreadStart(AddressOf pctBoxVergrößern)
Dim lblAusblenden As New ThreadStart(AddressOf lblVerkleinern)
Dim lblEinblenden As New ThreadStart(AddressOf lblVergrößern)
Dim pctFadeOut As New Thread(pctAusblenden)
Dim pctFadeIn As New Thread(pctEinblenden)
Dim lblFadeOut As New Thread(lblAusblenden)
Dim lblFadeIn As New Thread(lblEinblenden)
Private Sub ISHilfe_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
_ControlLabel = Me.lblInfo
_ControlPctBox = Me.pctBox
End Sub
Private Sub ISHilfe_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseEnter
lblOriginalSchrift = lblInfo.ForeColor
If pctFadeIn.ThreadState = ThreadState.Running Then
pctFadeIn.Abort()
End If
If lblFadeOut.ThreadState = ThreadState.Running Then
lblFadeOut.Abort()
End If
pctFadeOut.Start()
lblFadeIn.Start()
End Sub
Private Sub ISHilfe_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseLeave
If pctFadeOut.ThreadState = ThreadState.Running Then
pctFadeOut.Abort()
End If
If lblFadeIn.ThreadState = ThreadState.Running Then
lblFadeIn.Abort()
End If
pctFadeIn.Start()
lblFadeOut.Start()
End Sub
#Region "Sub pctBoxVerkleinern"
Private Sub pctBoxVerkleinern()
Dim picGröße As Integer = Me.pctBox.Width
PicGrößeOriginalX = pctBox.Size.Width
PicLocationOriginalX = pctBox.Location.X
For i As Integer = pctBox.Location.X To 0 Step -1
Monitor.Enter(Me)
PctBoxNeueLocation(New Point(i, pctBox.Location.Y))
Monitor.Exit(Me)
System.Threading.Thread.Sleep(10) : ctrlPctBoxRefesh()
System.Windows.Forms.Application.DoEvents()
Next
Dim picEndGröße As Integer = Me.Width / 5
For i As Integer = picGröße To picEndGröße Step -1
Monitor.Enter(Me)
PctBoxNeueGröße(New Size(i, i))
PctBoxNeueLocation(New Point(pctBox.Location.X, (Me.Height - pctBox.Height) / 2))
Monitor.Exit(Me)
System.Threading.Thread.Sleep(10) : ctrlPctBoxRefesh()
System.Windows.Forms.Application.DoEvents()
Next
End Sub
#End Region
#Region "Sub pctBoxVergrößern"
Private Sub pctBoxVergrößern()
Dim picGröße As Integer = Me.pctBox.Width
For i As Integer = picGröße To PicGrößeOriginalX Step 1
Monitor.Enter(Me)
PctBoxNeueGröße(New Size(i, i))
PctBoxNeueLocation(New Point(pctBox.Location.X, (Me.Height - pctBox.Height) / 2))
Monitor.Exit(Me)
System.Threading.Thread.Sleep(10) : ctrlPctBoxRefesh()
System.Windows.Forms.Application.DoEvents()
Next
For i As Integer = 0 To PicLocationOriginalX Step 1
Monitor.Enter(Me)
PctBoxNeueLocation(New Point(i, pctBox.Location.Y))
Monitor.Exit(Me)
System.Threading.Thread.Sleep(10) : ctrlPctBoxRefesh()
System.Windows.Forms.Application.DoEvents()
Next
End Sub
#End Region
#Region "Sub lblVergrößern"
Private Sub lblVergrößern()
Dim Schriftfarbe As Color = lblOriginalSchrift
Dim Rot, Grün, Blau As Byte
Rot = Schriftfarbe.R
Grün = Schriftfarbe.G
Blau = Schriftfarbe.B
lblNeueGröße(Me.Width / 2)
For c As Integer = 0 To 255
Monitor.Enter(Me)
lblNeueFarbe(Color.FromArgb(c, Rot, Grün, Blau))
Monitor.Exit(Me)
System.Threading.Thread.Sleep(1)
System.Windows.Forms.Application.DoEvents()
Next
End Sub
#End Region
#Region "Sub lblVerkleinern"
Private Sub lblVerkleinern()
Dim Schriftfarbe As Color = lblOriginalSchrift
Dim Rot, Grün, Blau As Byte
Rot = Schriftfarbe.R
Grün = Schriftfarbe.G
Blau = Schriftfarbe.B
For c As Integer = 255 To 0 Step -1
Monitor.Enter(Me)
lblNeueFarbe(Color.FromArgb(c, Rot, Grün, Blau))
Monitor.Exit(Me)
System.Threading.Thread.Sleep(1)
System.Windows.Forms.Application.DoEvents()
Next
lblNeueGröße(0) : ctrlLabelRefresh()
End Sub
#End Region
Private Sub ISHilfe_SizeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.SizeChanged
If Me.Width <> Me.Height Then
Me.Size = New Size(Me.Width, Me.Width)
End If
Me.Refresh()
Me.pctBox.Size = New Size(Me.Width / 2, Me.Height / 2)
Me.pctBox.Location = New Point((Me.Width - Me.pctBox.Width) / 2, _
(Me.Height - Me.pctBox.Height) / 2)
Me.pctBox.Refresh()
PicGrößeOriginalX = pctBox.Size.Width
PicLocationOriginalX = pctBox.Location.X
End Sub
#Region "Private Properties"
Private _ControlLabel As Control
Private _ControlPctBox As Control
Private ReadOnly Property ControlPctBox() As Control
Get
Return _ControlPctBox
End Get
End Property
Private ReadOnly Property ControlLabel() As Control
Get
Return _ControlLabel
End Get
End Property
' Speichert den hinzuzufügenden Text.
Private _lblNeueGröße As Integer
Private Sub lblNeueGröße(ByVal NeueGröße As Integer)
SyncLock Me
Me._lblNeueGröße = NeueGröße
ControlLabel.Invoke(New MethodInvoker(AddressOf ThreadSafeNeueGröße))
End SyncLock
End Sub
Private Sub ThreadSafeNeueGröße()
Me.ControlLabel.Width = _lblNeueGröße
End Sub
Dim _lblNeueFarbe As Color
Private Sub lblNeueFarbe(ByVal NeueFarbe As Color)
SyncLock Me
Me._lblNeueFarbe = NeueFarbe
ControlLabel.Invoke(New MethodInvoker(AddressOf ThreadSafeNeueFarbe))
End SyncLock
End Sub
Private Sub ThreadSafeNeueFarbe()
Me.ControlLabel.ForeColor = _lblNeueFarbe
End Sub
Dim _lblOriginalSchrift As Color
Private Property lblOriginalSchrift() As Color
Get
Return _lblOriginalSchrift
End Get
Set(ByVal value As Color)
_lblOriginalSchrift = value
End Set
End Property
Private Sub ctrlLabelRefresh()
SyncLock Me
ControlLabel.Invoke(New MethodInvoker(AddressOf ThreadSafeLabelRefresh))
End SyncLock
End Sub
Private Sub ThreadSafeLabelRefresh()
Me.ControlLabel.Refresh()
End Sub
Private Sub ctrlPctBoxRefesh()
SyncLock Me
ControlPctBox.Invoke(New MethodInvoker(AddressOf ThreadsafePctBoxRefresh))
End SyncLock
End Sub
Private Sub ThreadsafePctBoxRefresh()
Me.ControlPctBox.Refresh()
End Sub
Private _PctBoxNeueLocation As Point
Private Sub PctBoxNeueLocation(ByVal NeueLocation As Point)
SyncLock Me
Me._PctBoxNeueLocation = NeueLocation
ControlPctBox.Invoke(New MethodInvoker(AddressOf ThreadSafePctBoxNeueLocation))
End SyncLock
End Sub
Private Sub ThreadSafePctBoxNeueLocation()
Me.ControlPctBox.Location = _PctBoxNeueLocation
End Sub
Private _PctBoxNeueGröße As Size
Private Sub PctBoxNeueGröße(ByVal NeueGröße As Size)
SyncLock Me
Me._PctBoxNeueGröße = NeueGröße
ControlPctBox.Invoke(New MethodInvoker(AddressOf ThreadSafePctBoxNeueGröße))
End SyncLock
End Sub
Private Sub ThreadSafePctBoxNeueGröße()
Me.ControlPctBox.Size = Size
End Sub
Dim _PicGrößeOriginalX As Integer
Private Property PicGrößeOriginalX() As Integer
Get
Return _PicGrößeOriginalX
End Get
Set(ByVal value As Integer)
_PicGrößeOriginalX = value
End Set
End Property
Dim _PicLocationOriginalX As Integer
Private Property PicLocationOriginalX() As Integer
Get
Return _PicLocationOriginalX
End Get
Set(ByVal value As Integer)
_PicLocationOriginalX = value
End Set
End Property
#End Region
Private Sub lblInfo_ForeColorChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles lblInfo.ForeColorChanged
lblOriginalSchrift = lblInfo.ForeColor
End Sub
End Class
</code>
|
|
|
|
|
Zero-G. wrote: I will post the whole code down under my question
Just the relevant parts will do. I don't think most people actually have the time to read it all.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
Ready to Give up - Your help will be much appreciated.
My website
|
|
|
|