|
I have the windows media player in my form already but can't get it to play a specific movie file located on my hard disk. I don't know which command to use to tell my program to play the file. Could someone please explain to me how I can tell my program to (load and play) a small movie clip in my form?
Any help would be greatly appreciated!
-- modified at 16:48 Tuesday 16th May, 2006
|
|
|
|
|
Place Common Dialog Control,command button on form & put following code in command button's click event which is used to load movie file.
code:
CommonDialog1.ShowOpen
MediaPlayer1.FileName = CommonDialog1.FileName
If you want to open movie file directly,without using Common Dialog Control
then put this code in command button's click event which is used to load movie file.
code:
MediaPlayer1.FileName = "Path of movie file located on your hard disk"
e.g.MediaPlayer1.FileName = "D:\Movie.dat"
You have to add Common Dialog Control from Add Components.
Sachin
Think of your goal when you are confused.
|
|
|
|
|
<b>how to send mail in vb.net</b>
|
|
|
|
|
Look into system.net.mail namespace and smtpclient.send() method
Bhaskara
|
|
|
|
|
I am trying to use System.IO.Compression to compress/decompress the buffer. I have the data in byte format in sql server and I need to create an CLR user defined function. I have everything running except that for some of the files, the compressed size is larger than the actual file size. I tried to use both Deflate and GZip compression types. Did anyone face the similar situation. Thanks in advance for your help.
Thanks
Bhaskara
|
|
|
|
|
If you try to compress a file that is already compressed (like zip, jpg, mp3, mpeg, wmv, etc.) you may end up with a file that is larger than the original, as the file can't be compressed further and the compression adds metadata.
-- modified at 18:27 Tuesday 16th May, 2006
Note: GZip uses the same algorithm as Deflate, so you won't see any noteable differences in file size between them.
---
b { font-weight: normal; }
|
|
|
|
|
is it possible to utilize features from micorsoft word in a vb.net application? For example, connecting to the word thesarus in vb.net?
|
|
|
|
|
Folks;
I have looked at the article By David Broooks, "Dynamically adding ActiveX controls in managed code", but I am still uncertain about how I can replace the VB6 'VBcontrolExtender' functional under VB.NET in order to add OCXes to my application at run time.
I have a few years of code in the OCXes that I am trying to host this way. Each OCX represents an interface to data aqcquisition hardware, and in my current VB6 application, is dynamicallty loaded depending on which piece of hardware the user wishes to connect to.
Without going into too much detail, compiling the application with all of the OCXes in it would force me to distribute an awful lot of code - which is why I was using the VBcontrolExtender under VB6 in the first place.
Following the code example by David Broooks, I can add an OCX to a form at run time, but I do not know how to get 'ObjectEvent' messages from the OCX's that I have added to the form.
I have looked high & low for a solution to this, but I am not yet expert enough in VB.NET to figure this out.
A friend of Liberty is a friend of mine!
www.lp.org
|
|
|
|
|
OK I've scoured the WEB for this but can't find a working solution.
I'm trying to create a "fade" effect for a user control without any luck.
Basically I'm trying to get the control to gradually "appear" on a form as part of it's methods, i.e. add the control to a from and then "fade" it in.
As an example, assume I have a user control containing various other controls (text boxes, labels, listviews, etc.). The control should then fade all of these in.
NOte - I can't use a Form and then change the opacity, it has to be a user control, but that's basically the equivalent effect...
Any ideas?
Thanks.
???
Carp
|
|
|
|
|
i am printing information on a form and i send all the items individually to the printer, however i have a textbox that contains a large body of text, and when i print it just goes in one straight line, how do i break it down so it shows all the text
thanx
|
|
|
|
|
|
|
Hii,
I need to set minimumpasswordlength for my system Using Visual Basic .
For this Iam Using IADsDomain interface.
My code is as follows....
Private Declare Function GetComputerName Lib "Kernel32.dll" Alias "GetComputerNameA" (ByVal strString As String, strSize As Long) As Long
Private Sub Command1_Click()
On Error GoTo ErrorHandler
Dim dom As IADsDomain
Dim cls As IADsClass
Dim v
Dim x As Variant
Dim str As String
Set dom = GetObject("WinNT://" & ComputerName & " ")
Iam getting an exception in the above line
Set cls = GetObject(dom.Schema)
For Each x In cls.OptionalProperties
v = dom.ADsPath
If x = "MinPasswordLength" Then
dom.MinPasswordLength = 10
End If
Next
ErrorHandler:
MsgBox Err.Description
End Sub
Function ComputerName() As String
Dim buffer As String * 512, length As Long
length = Len(buffer)
'GetComputerName returns zero on failure
If GetComputerName(buffer, length) Then
ComputerName = Left$(buffer, length)
End If
End Function
'My computer is connected in domain. if I specify the domain name instead of ComputerName in
Set dom = GetObject("WinNT://" & mydomain & " ")
,i could execute the code successfuly.But i need to execute the code on a system which is connected to work group.
Can anyone please provide me the relevant information??
Thanx
|
|
|
|
|
narayanagvs wrote: Can anyone please provide me the relevant information??
Yes, if you do.
What exception do you get?
---
b { font-weight: normal; }
|
|
|
|
|
I have an xslt file main.xsl whose output is XML & uses Main.xml .I use document function in my main.xsl to get data from Submain.xml(Document('Submain.xml')) file and transform some information from submain.xsl.my above main.Xsl transforms perfectly on xmlspy or stylusstudio but when i try to transform using vb.net submain.xml is never read & so i don't see any relevant information from Submain.xml.
can somebody help me
i will paste the vb.net code below
xmldoc.Load("Main.xml")
xsltTransformer.Load("main.xsl")
writerHtmlOutput = New System.IO.StringWriter
xsltTransformer.Transform(xmldoc, Nothing, writerHtmlOutput, Nothing)
Stream = New StringReader(writerHtmlOutput.ToString())
Vijayendra
|
|
|
|
|
.net 2.0 seems to be a little different when saving data back to a database. In the form designer I created a datasource and dragged fields to the textboxes on the form. VB created some objects including a dataadapter an inserted these objects in the form designer tray. When I click on the save button the following code runs but does not update the database. What do I need to do to updata the database? Thanks for anyhelp given!
Me.Validate()
Me.MyTableBindingSource.EndEdit()
Me.MyTableTableAdapter.Update(Me.MyDataSet.MyTable)
Me.MyDataSet.MyTable.AcceptChanges()
|
|
|
|
|
If you are using an access database, check if you have created the primary key You cannot update your database until you create the primary key.
Regards,
Chatura Dilan
|
|
|
|
|
I do have a primary key defined. Any other ideas?
|
|
|
|
|
I have a class that I want to serialise to XML with a date value as one of the members - however I need it to either (a) populate the xml element or (b) not create the element at all. I have implemented it as a nullable(Of Date) e.g.:-
<XmlType("paydates")> _
Public Class IRSPayDates
#Region "Private members"
Private _StartDate As Nullable(Of Date)
'-- 8< ---------------------------------
#End Region
<XmlElement("startdate", datatype:="date")> _
Public Property Startdate() As Nullable(Of System.DateTime)
Get
Return _StartDate
End Get
Set(ByVal value As Nullable(Of System.DateTime))
_StartDate = value
End Set
End Property
End Class
However, serialising this with an empty date comes out as:
<paydates>
<startdate />
</paydates>
How would I make it omit the null date element at all?
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
Hi to everyone.... I need an advice...
I have a folder with some .rpt files and i want to make an application, where with a button_click the user can print all these files!!!
Does anyone knows how can i do that??
The only data from user it will be the folder path!!!And i want to print all the contains .rtp without open them....
Thanks!!!
giotis
|
|
|
|
|
Hello friends,
i am doing a project , in that i have to genarate excell report.
i did it very finelybut problem arises that the excel file is created but even if i close that file and not saved , it remains in memory.
i used .........
Dim xclApp As New Excel.Application
Dim xclWorkbook As Excel.Workbook
Dim xclSheetA As Excel.Worksheet
Dim xclRangeA As Excel.Range.... etc
insert all record to excel object and finaly called...
xclApp.Visible = True
ActiveWindow.Zoom = 50
after this command excel sh*t genarates but even though i close it without saving its remain in memory and ask me to save or not when i shut down the PC.
Thanks in advance
Hoping Best from u!!!
Rahul here
|
|
|
|
|
This would be probably due to the fact that Excel Workbook object or Excel Worksheet is left open. You need to close them after using. There is a property I dont remember exactly that will close the object and do the trick for you.
_mubashir
|
|
|
|
|
'Close the workbook
xclWorkbook.Close
'Quit Excel
xclApp.Quit
Bhaskara
|
|
|
|
|
Thanks frds
Rahul here
|
|
|
|
|
Hi All,
I have a Application which generates XML file and this XML file will be used to generate Crystal Report. Using wizard, i.e. by right clicking and selecting Add/Remove Database on Database Field we can set Data Source into the Report. Now I want to do the same, i.e. setting Data source through code. Can any body tell me how can achieve the same.
Thanks in advance.
Regards,
Krishnaraj
|
|
|
|