Importing reference to Windows Media Player - vb.net

After several hours I once managed to import the Windows Media Player.
Now I need to do it again, and I'm desperate because I don't see which file I need to import.
The reference in my old project looks like that:
The files I get offered while trying to refence them looks like this:
Does anybody perhaps know right away how to import the Windows Media Player?
I thought this was a valid question for stackoverflow because I'm stumbling over this issue for the second time now.

I got it:
Right-Click the toolbox, add "Windows Media Player" (COM component tab) and drag it onto a form.

Related

Trying to play sounds in console application VB.NET

I want to play a sound file to play in my console application but the following doesn't work:
My.Computer.Audio.Play("[file path string]", AudioPlayMode.Background)
When hovering over "my computer" it brings brings up the error 'Computer' is not a member of 'JapaneseHelper.My'. And when hovering over Audio.PlayMode it says 'AudioPlayMode' is not declared. It may be inaccessible due to its protection level.
I have searched everywhere for this and can't find anything that shows me how to do it, I've only seen instructions for forms applications (When I try to copy what is done in the form app, it doesn't work either). I've tried a couple of "Imports" such as Import System.IO but they didn't fix the issue. I don't want to open a music player, I want it to be played in the background like My.Computer.Audio.Play should do. Is it because you can't do it for a console application maybe? However I don't understand why a console apps wouldn't be able to do it.
Did you make sure that your audio file is a .wav? From the Microsoft documentation it looks like you can only play .wav files. According to the documentation it should be possible to play audio files even in a console app.

How to load a video permanently into a project

If you add a picture into a project, then remove the picture from it's original source, the picture is still in the project even though it doesn't exist in its original location.
I want to do the same thing with a video.
How can I add a video to a project in such a way that it can be deleted from its original location and it will still exist in the project?
I guess what you are looking for is dynamic ressources and not static(local) ones. You can input them by drag&drop into your solution explorer or if you double click on your project in the solution explorer the project properties open - there you have a tab called ressources where you can input any kind of ressources.
If you dont know how to play a movie within a VB Form - here is a tutorial on YouTube.

Add more one button on Attach menu of Whatsapp

I've an idea to develop a modification to WhatsApp, for example now when I click attachment symbol it shows only 6 I want to add one more option to it. If it's possible let me know. I want to add more one button on Attach menu.
It is not clear what exactly you are asking.
You have an option to launch other applications from your app.
If you want to change the way a certain app looks, or behaves you have to write something similar to it for people to use, but you cannot change the original app (no one will let you)
Here you go! it's possible, as #Jef said in comments.
using documentation interaction controller.
https://www.whatsapp.com/faq/iphone/23559013
you need to work on how to hook into attachment menu.
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDocumentInteractionController_class/
There is an assumption in your question that these other apps are put there by the whatsApp developers, or by a third party who was somehow able to modify their code. I suspect that what is happening is that they (whatsApp) simply export a document/file of a certain type (UTI) If your application supports that same UTI it should appear here. So there is six buttons for you, on your phone, but another user might see a different number, it depends entirely what they have installed on their device.
CONCEPTUAL.. if you double click on a file on your computer then the file browser (OS) opens that file with some application or other. Perhaps it is a .doc file and the OS pushes that file to word or pages. Or it may be a .psd file and it gets pushed to photoshop. How does this happen? The OS has a registry (database) of applications for each file type, applications sign up on this when they install/update. If you right click on a file you see an 'open in..' option that lists all your applications which can handle that file type, this is the menu that you are wanting to get onto (for whatsApp's file type) imho.
So you need to
1 ascertain what file type (UTI) WhatsApp is exporting
2 declare support for that file type in your application (this is the bit which will be platform specific solution) (iOS docs https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/RegisteringtheFileTypesYourAppSupports.html#//apple_ref/doc/uid/TP40010411-SW1 )
**edit/addition
3. add the code to actually handle the file when your app receives it. On iOs this is in the appDelegate in
-(void) application: openURL: sourceApplication:annotation:
If the Whatsapp people have published an API then thats where you want to look. Good luck

Mimic Explorer.exe So I can Customize It's Toolbars

I am trying to make a form of explorer.exe so I can customize the toolbars to do more things that I want, such as create a list of what is in the current directory I'm looking at.
I'm currently trying to put a pannel onto the windows form and am using the code:
panel1.display("C:\")
I've also tried:
panel1.url("C:\")
And:
panel1.navigate("C:\")
When I used Java in class I could construct something similar to this with panels, so can someone please tell my why I can't get the panel to display the contents of the C: drive?
You are extremely close, on the right track. What you should do instead is use a simple web browser. It can do more than just browse internet pages. If you use the following code it should work:
webbrowser1.navigate("C:\")

How can I include Flash in VB.NET?

I would like to create a .exe wrapper for a Flash Player using VB.NET. I am having a few problems.
1.I seem to remember being able to import Flash Player as a control into Visual Studio (2008 Pro). For some reason, I can't seem to VS to import it anymore. (I tried using the OCX from Visual Studio) Perhaps I'm looking for the wrong file. What file am I looking for?
2.Is including Flash inside of a VB program legal?
3.When a control is included in a VB.NET program (such as Flash) does the control need to be distributed in a separate file, or will the compiled application contain it in the ".exe"?
Thanks.
edit:
I was able to import the control as the Flash10b.ocx from c:\Windows\System32\Macromed directory as a COM component. Question 2 and 3 still remain.
Edit 2:
Is there documentation on the ActiveX control? I am trying top figure out the API for ExternalInterface. Any tips on that?
Using flash inside a VB program is perfectly legal, it is just an activeX control.
You will need to distribute the interop library with your application (it will be in your output directory) and the ActiveX object (flash10b.ocx) will need to be installed on the system, it wont package it all up for you.