|
I am having problems with the Windows Media Player used in an application. I changed to Visual Studio 2005 from Visual Studio.net and my programs will not work. So I made an application from scratch that worked in the old version. Here is a link to the code and instructions, (Playing Digital Media in a Visual Basic .NET Application), that I am using: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwmt/html/playingdigitalmediainavisualbasicnetapplication.asp
At the top of my code when I reference the PIA namespace (Imports Microsoft.MediaPlayer.Interop), I get an error that it doesn't contain any public member or cannot be found.
I am not sure if the PIA registered correctly, because it is not in the default location that the regpiagac utility, (located in the tuneclipper sample of the Windows Media SDK), shows it.
So I reran the regpiagac utility and here’s what happened step by step:
This utility will register the PIA and add it to the GAC.
OK
Please verify the path to the Regasm
C:\Windows\Microsoft.NET\Framework\v1.0.3705\ (default)
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 (actual)
OK
Please verify the path to the Gacutil
C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Bin\ (default)
C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin (actual)
OK
Please type the path to the Wmppia.dll
C:\WMSDK\WMPSDK9\redist\
OK
'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727regasm.exe' is not recognized as a
n internal or external command,
operable program or batch file.
'"C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bingacutil.exe"' is not re
cognized as an internal or external command,
operable program or batch file.
Press any key to continue . . .
Any help will greatly be appreciated,
Glen Conaway
|
|
|
|
|
Ok, I left a slash out of the end of the path and I was able to successfully register the PIA. I no longer get the error for (Imports Microsoft.MediaPlayer.Interop). My old programs still don't work, and I still have issues to deal with, but will try to work it out, and if unsucessfull I will add a post later.
|
|
|
|
|
How can i maintain a printer log?
|
|
|
|
|
If you only require a list of documents printed, have a look in the event viewer.
If you want full details you need to monitor the printer - there is an article in my articles on this site that is called "Monitoring a printer from VB.net" that is a good starting point
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
I am trying to fill a DataTable with data from sql databae by using Background worker but it throws an exeption (calling it from the main thread works fine). I have read that BackgroundWorker can be used for database operations but can't find any examples. Here is the code:
Dim conn As SqlConnection = _
New SqlConnection(connectionString)
Dim command As New SqlCommand(cmd, conn)
Dim adapter As SqlDataAdapter = New SqlDataAdapter()
adapter.SelectCommand = command
Dim table As New System.Data.DataTable
table.Locale = System.Globalization.CultureInfo.InvariantCulture
adapter.Fill(table) ' the exeption is thrown here
What should I do? Please help.
--Nikola--
modified 7-Dec-20 21:01pm.
|
|
|
|
|
Hi 2 all!
I want to develop a project for LINUX, but i want to use VB.NET for this.
Is this posssible?
If not then tell me which tool/language is good for development in LINUX plateform?
Regards,
Arfan Qadir
|
|
|
|
|
I have heard of some experimental ports of the .NET platform to Linux, but I suspect that they won't cut the mustard. .NET is really designed for Windows and not a cross-platform framework. Have a search on the web in the Linux newsgroups etc. and see what you can turn up.
As far as development languages are concerned, I think you'll find that C++ is almost universally used. Good compilers are available from GNU and any Linux development web site should have more links than you can poke a stick at.
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
Actually, ROTOR & MONO (the Linux .Net runtime) has come a long way. You can write .Net for Linux, though I believe C# is your only option. IDEs are somewhat limited though, SharpDevelop has a Linux port, and I've seen ads on CodeProject about Grasshopper for Linux .Net though I haven't checked it out yet.
ROTOR[^]
MONO[^]
SharpDevelop[^]
|
|
|
|
|
Thanks for the references. I'll check them out.
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
It is posssible. I don't know if there is a tool for making it under Linux. But I know that MONO is something like for .NET framework for Linux. You can use VB.NET or C#, Managed C++ programs do not work with MONO.
While programming try to avoid Windows specific operations (such as reading/writing the registry etc.)
--Nikola--
modified 7-Dec-20 21:01pm.
|
|
|
|
|
Hello!
I have written a little subrutin to clone and mirror a panel into another form.
I would like to grow the size of clone. (zoom)
I tried ScaleTransform but it's not work.
Here is my code:
Private Sub CloneMirrorZoom()
Dim b1 As Bitmap
Dim g1 As Graphics
b1 = New Bitmap(Me.Width, Me.Height)
g1 = Graphics.FromImage(b1)
g1.CopyFromScreen(Me.Location + Panel1.Location, Panel1.Location, Panel1.Size)
g1.ScaleTransform(2.3F, 4.5F)
b1.RotateFlip(RotateFlipType.RotateNoneFlipY)
Form2.CreateGraphics.DrawImage(b1, 0, 0)
End Sub
Please help me, what is wrong?
thx.LD
-- modified at 4:11 Friday 19th May, 2006
|
|
|
|
|
If you applay ScaleTransform to a graphics object it doesn't mean that the current contents gets transformed but that all coming drawing operations gets resized. In this scenario you won't need ScaleTransform at all:
b1 = New Bitmap(Me.Width, Me.Height)
g1 = Graphics.FromImage(b1)
g1.CopyFromScreen(Me.Location + Panel1.Location, Panel1.Location, Panel1.Size)
'g1.ScaleTransform(2.3F, 4.5F)
b1.RotateFlip(RotateFlipType.RotateNoneFlipY)
Form2.CreateGraphics.DrawImage(b1, 0, 0, b1.Width * 2.3F, b1.Height * 4.5F)
Also think about painting the image in the form via its Paint event instead of drawing it here directly. You could do this by setting some field to the generated bitmap and calling invalidate on the form. After that the Paint event will be thrown and you can draw your image there.
Also never forget to dispose created Graphics instances.
|
|
|
|
|
What a fast answer!
Very thank You!
|
|
|
|
|
I have a text file (Japanese) with encoding like this:
annon = \u30a2\u30ca\u30a6\u30f3\u30b9
send_annon_each = \u305d\u308c\u305e\u308c\u306e\u901a\u77e5\u3092\u500b\u5225\u306b\u9001\u308b
I don't know it's encoding and how to create it. Please help me. Thanks.
|
|
|
|
|
i have a view which from employee table which has two coloums empid and empname. i make a dataset from it and give it to the datagrid, i want to know edit data in datagrid
plz help me.
|
|
|
|
|
Hi ITstud,
Go through this link it will be helpful
http://samples.gotdotnet.com/quickstart/aspplus/samples/webforms/ctrlref/webctrl/datagrid/doc_datagrid.aspx
Best Regards,
Apurva Kaushal
|
|
|
|
|
hi,
i want design a windows application where i'll give a word document as input. from that document i have to separate only the email ids and store it in a separate file. how to start? anybody give me a clue or a skeleton of this task
David Boon
|
|
|
|
|
Hi,
You will have to create temporary Word document object in your project. Then on some event like button click write code to attach the word document to this temporary object and use the object to send commands to word document. Now for the email addresses part, you can use the regular expression class Regex for that. just search for it in msdn.
Anant Y. Kulkarni
|
|
|
|
|
We are using the MSScriptControl in VB.NET using interop. (VS.net 2005)
I have set the "Make assembly COM visible " in the assembly information of project.
This will allow me to pass " Me" to the AddObject method of scriptcontrol
I have a form with 3 labels. Label1,label2,label3
I am writing the following code in the Form Load event
Dim sc As New MSScriptControl.ScriptControl
Dim sParser As String
Dim sParser1 As String
Dim sParser2 As String
sc.Language = "VBScript"
sc.AddObject("Form1", Me)
sParser = " Form1(""label1.text"") = ""This is Label1"""
sParser1 = " Form1(""label2.text"") = ""This is Label2"""
sParser2 = " Form1(""label3.text"") = ""This is Label3"""
sc.ExecuteStatement(sParser)
sc.ExecuteStatement(sParser1)
sc.ExecuteStatement(sParser2)
Functionality i need to achieve is after the execution of the executeStatement methods
Label1.text should contain the value This is Label1
Label2.text should contain the value This is Label2
Label3.text should contain the value This is Label3
Right now the compiler throws the exception " Wrong number of arguments to Form1"
I think i am not creating the parser statement in the proper way .
Any insight on the right procedure would be a great help
Thanks
Deva (dpideva@gmail.com)
Deva
|
|
|
|
|
Dear sir,
I am in big problem ,please understand my problem,now i am going to describe my problem,
I am capturing live image using webcam, on clicking on picture box images is save on harddrive and display on another picture box,this is not my problem.
My problem is that how to transfer this image to another machine at the same time and show the image on that machine with same software running on that machine.
I hope you understand my problem,please help me
Thanks
prabhakar dwivedi
-- modified at 1:28 Friday 19th May, 2006
|
|
|
|
|
There are several ways on how to do this. I recommend either reading some Remoting[^] or Sockets[^] articles.
|
|
|
|
|
you will probly have to send if over the network using the winsock. just look up some winsock tut's its pretty simple. btw do you have any tips or tuts on how to capture from webcam?
|
|
|
|
|
I have create a project, and some guids is in register.
How can I drop the project completely with register?
|
|
|
|
|
I have a two part question here...
Question #1
When i have a virtual listview control, and try to set the "ShowCheckboxes" property i get an error saying that it can't use checkboxes when in virtual mode... so other using some tricks with images, and over complicating things by doing an owner drawn listview as well is there anyway i can get these checkboxes to show up?
Question #2
I was wondering if there is any possible way to make a virtual treeview control, there doesn't to be any "virtual*" properties on treeview controls like there are for Listview controls...
|
|
|
|
|
Hi all:
I’m having a problem connecting to a secure database using Microsoft ActiveX Data Object 2.8.
I have a database I password protected and I want to make a connection to this database using the connection string. When I include the User ID and Password in the connection string I get the following error: Error#: -2147217843 Error in Microsoft JET Database Engine à cannot start your application. The Workgroup information file is missing or opened exclusively by another user.
I’m testing this on my laptop. The database is being accessed solely by my VB6 application.
When I try to connect to the database without providing the User ID or Password I get this error: Error#: -2147217843. Error in Microsoft JET Database Engine à Not a valid password. Note: The error number are the same, but the problem is different.
I can open this database without any problems from Microsoft Access. Can anyone shed some light on how to fix this?
Here is the function I’m using to connect to the Access database:
Public Function Jet_Connection(strProv as string, strDB as string, strUser as string , strPasswd as string) As Integer
On Error GoTo Jet_Connection_Err
Dim strConn As String
strConn = "Provider=" & strProv & ";Data Source=" & strDB & ";User ID=" & strUser & ";Password=" & strPasswd & ";"
Set cnnMainDb = New ADODB.Connection
With cnnMainDb
.ConnectionString = strConn
.Open
If .State = adStateOpen Then
Set cat.ActiveConnection = cnnMainDb
Jet_Connection = adStateOpen
End If
End With
Jet_Connection_Exit:
Exit Function
Jet_Connection_Err:
Set cat = Nothing
If Not cnnMainDb Is Nothing Then
If cnnMainDb.State = adStateOpen Then cnnMainDb.Close
End If
Set cnnMainDb = Nothing
Jet_Connection = adStateClosed
If Err <> 0 Then
MsgBox "Error#: " & Err.Number & vbCr & "Error in " & Err.Source & " --> " & _
Err.Description, , "Error Jet_Connection"
End If
Resume Jet_Connection_Exit
End Function
Quecumber256
|
|
|
|