|
Playing a video is easy. Titles are more tricky, unless you use WPF ( .NET 3.0 ). In that case, it's quite easy. Otherwise, it's pretty involved, and I don't know exactly how it's done.
|
|
|
|
|
hi
thanks for the reply, but how exactly do I play a video? i was hoping you could show me how to do this.
Im looking for a windows media player embedded form or something along these lines so whilst playing the video the user has the ability to play, fast forward, rewind, pause, stop etc.
|
|
|
|
|
jady84 wrote: i was hoping you could show me how to do this.
OK, I assumed you'd googled to find out how to do that, and wanted to know how to do titles.
You add WMP to your control list, and then you can drag it onto your form. You can specify how much UI it shows, and you can do your own buttons if you prefer.
|
|
|
|
|
Hi,
Sorry about being a pest here, but I am new to this whole thing, how exactly do I go about adding WMP to the control list? (where is the control list?)
|
|
|
|
|
In the toolbox, right click and choose 'choose items'
|
|
|
|
|
when i right click i get to 'add/remove' items, iguessthats what you meant so i try to search to WMP but it's not there. i have windows mediaplayer SDK and windows media encoder already installed on the PC, also i have triedto browse but i cannot seem to add WMP to the control box, is there another way?
|
|
|
|
|
There is no other way. You're not right clicking on the toolbox, or you'd see the option that I told you to select.
|
|
|
|
|
|
I deloped visual Studio application on terminal server running win 2003 server. I want to run the same application on a different machine running win xp. This machine doesn't have Visual studio 2005 or Sql server 2005 installed.
I copied all the files from Terminal server to this local machine and when I tried to run .exe file I get an error saying that SQL server can not be found. I already got .net framework 2.0 installed.
Any help would be appriciated.
thank you in advance.
programmer
|
|
|
|
|
yyyyyy87 wrote: I get an error saying that SQL server can not be found.
Then you need to install it
yyyyyy87 wrote: I already got .net framework 2.0 installed.
That has nothing to do with SQL Server.
|
|
|
|
|
OK. What is the answer then?
thank you in advance.
programmer
|
|
|
|
|
Installing SQL Server, obviously. Or, if it's on the same network, setting up the connection string so it will connect.
|
|
|
|
|
|
Hi yyyyyy87.
The client need have the SQL Native Client Installed.
SINCERELY.
ANTHONY ACUÑA
PREFERED PHRASE:
SOMEBODY TELL ME WHY IS MORE REAL WHEN I DREAM THAT I AM WAKE?
|
|
|
|
|
Hi.
Last week I posted a question regarding reading Excel file and loading it into the DataGrid.
I didn't get any useful response back so please forgive me for posting this second time.
I'm sure someone had the same problem I have.
I have 3 columns in Excel. One of the columns (User Id) has text data (like: User 1) or a number data (like: 12345). My code works and doesn't throw any error but for some reason it only extracts text data. The numbers are missing and I'm not sure why. I've tried to foramt that columnt to TEXT only but it doesn't help. Just to be sure I looped through DataSet to make sure the values are there and of course they weren't.
Here's the code that reads Excel and loads data into DataGrid. Please help.
Thank you.
Try<br />
'Create DataSet and DataAdapter<br />
ds = New System.Data.DataSet<br />
da = New System.Data.OleDb.OleDbDataAdapter<br />
<br />
'Establish connection<br />
con = New System.Data.OleDb.OleDbConnection( _<br />
"provider=Microsoft.Jet.OLEDB.4.0; " & _<br />
"data source=" & Session("ExcelFilePath").ToString() & "; " & _<br />
"Extended Properties=Excel 8.0")<br />
<br />
'Create command<br />
cmdSelectExcel = New System.Data.OleDb.OleDbCommand("SELECT * FROM [Sheet1$] ORDER BY Company", con)<br />
<br />
'Open connection<br />
con.Open()<br />
<br />
'Exectue command through adapter<br />
da.SelectCommand = cmdSelectExcel<br />
da.Fill(ds, "[Sheet1$]")<br />
<br />
'Assign DataSourse of the DataGrid and bind it<br />
dg.DataSource = ds.Tables(0).DefaultView<br />
dg.DataBind()<br />
<br />
'Close Connection<br />
con.Close()<br />
Catch ex As Exception<br />
'Display error message<br />
lblError.Text = "Error: " & ex.ToString()<br />
lblError.Visible = True<br />
End Try
|
|
|
|
|
Hi Alexfromto.
Do you want that the oledb driver extracts all data as Text, correctly?
Then you need add the follow Extended Properties:
1st: IMEX=1;
2nd: MaxScanRows=0
The first property force the OleDb Driver to read any cell of excel for determine the column type.
The second establish the number of cell for every column to scan for determine de column type, the 0 value force to scan all cells.
SINCERELY.
ANTHONY ACUÑA
PREFERED PHRASE:
SOMEBODY TELL ME WHY IS MORE REAL WHEN I DREAM THAT I AM WAKE?
|
|
|
|
|
Thank you very much Anthony. It worked like a charm. You da man.
Alex.
|
|
|
|
|
I am new to "The Code Project".
I was attracted to this site due to an article; "Advanced DataGrid Formating with ItemDataBound".
The article identified how to format ADO.Net Datagrid rows conditionally.
I need to do the same from a VB.Net Datagrid.
My Application provides the user a datagrid that displays equipment calibration related data. I.E. "Equip. Serial #", "Due dates" ETC...
I want to conditionally change the color of rows (records) who's "Due date" columns are greater than the current date; DueDate > Today()
Thus, visually identifing records which need to be prioritized.
Can anyone direct me to an article, or perhaps point me in the right direction?
Regards:
DDscales
DDscales
|
|
|
|
|
Hi DDscales.
Try Using
[c#]
this.dataGridView1.Rows[0].DefaultCellStyle
Or if you are using the a DataSet use DataBindings to set the properties with the correct datamember.
SINCERELY.
ANTHONY ACUÑA
PREFERED PHRASE:
SOMEBODY TELL ME WHY IS MORE REAL WHEN I DREAM THAT I AM WAKE?
|
|
|
|
|
Perhaps I am just to green.
I assume "this." refers to my DataGrid "DataGrid1" ?
Also, I notice in your reply [c#], I am running VB 2003. Or does that matter?
Anyway...I think my problem is I do not know how to set the dataGridView properties. Do I have to create a class Library?
I realize this could get rather complicated. Could you refer me to an article or virtual lab that might help me to get the answers?
Regards:
DDscales
|
|
|
|
|
I have a function that needs to be called anytime the form is re-sized, minimized or maximized. In VB6, I could just set the AutoRefresh and call the function in the resize routine and everything worked fine. It doesn't seem to work that way in VB.NET. Any ideas?
Thanks,
Tim Alvord
|
|
|
|
|
There's an event for the form resizing, and another, I believe, for if the state is changed.
|
|
|
|
|
A user, Craig Gemmill, on another forum solved it this way. It's pretty slick:
Private Sub frmJournal_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
SetStyle(ControlStyles.UserPaint, True)
SetStyle(ControlStyles.OptimizedDoubleBuffer, True)
SetStyle(ControlStyles.AllPaintingInWmPaint, True)
SetStyle(ControlStyles.ResizeRedraw, True)
Me.UpdateStyles()
End Sub
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
Using gradientBrush As New Drawing2D.LinearGradientBrush(Me.ClientRectangle, Color.Black, Color.Blue, Drawing2D.LinearGradientMode.Vertical)
e.Graphics.FillRectangle(gradientBrush, Me.ClientRectangle)
End Using
End Sub
Tim Alvord
|
|
|
|
|
I'm not sure if this is possible....but I was wondering if it is it possible to set properties (like set different font styles/font sizes) to items within a listbox or combobox. Any help woud be greatly appreciated, thank you in advance!
|
|
|
|
|
No, you need to create an owner drawn listbox to do this ( or look for one on the site )
|
|
|
|