how do i add background music to auto play in the background of my vb project - vb.net

I have a project in vb 2010 that im working on. I want to know if i publish this and make it downloadable when it is done will my background music be heard by others?
Im pretty sure it's only playing on mine because the song is on my computer right?
Is there a code to make it so it stays even if i make this program downloadable?

You need to have the background music distributed with the program. It should be possible to include the music file as a resource in your project, and then to pass that resource to what you use to play the audio.
Alternatively, you could simply package the music file with your executable (whether you're using a zip or an installer), and then find the file in the same directory as your application, and play it that way.

Related

Is there any way to create and display music notation inside of a codenameone app?

Is there any way to create and display music notation inside of a codenameone app?
For Java generally there are some libraries like for example JFugue that let you write music inside a program. Maybe also display it, i didn't try that out.
There is lilypond, which would work in a desktop environment if you were able to run it to make the pdf after generating the file itself.
I wrote a small app in Android Studio and had to write my own music notation logic and drew it with the help of png files on a Canvas. That worked okay for small musical examples of a clef and around 2-7 notes.
Now i want to do something similar in Codenameone and display at least a clef and some notes inside the app (maybe as an image) - they have to be generated with some random element while the program runs.
It would also be great to be able to write and show more than a few notes, displaying it somehow and maybe also with the ability to have it as a pdf file later.
Is it possible to use something that already exists?
Thanks a lot!

Playing movie files without the URL in Visual Basic 2010

Right now in my project I have the windows media player object, and I can get that to play movies on it by inputting the movie URL into the URL property. How do I get it to play a movie that is currently in my resources? Because when I transfer the executable file to my other laptop to test it it doesn't work.
Thanks.
If i remember correctly, when you embed a video file into the application you only embed the data of it, and the extension gets stripped.
So in order to view it, you would need to copy it to a temporary directory and add the extension yourself, then play it from that location.
I haven't found a need to do such a thing since 2005, so visual studio may have made some changes.
Easiest way would be to have the video file you want played stored in the same location as your programs executable and simply refer to it using its name.

How to show document preview in iCloud conflicts sheet in Mac App using NSDocument

I am creating a Mac App, using NSDocument, that stores a custom class of documents to iCloud.
I was able to get the program to store documents to iCloud quite easily by just Code Signing it, Sandboxing it, and adding iCloud entitlements; however, I'm still encountering a problem where when I trigger an iCloud conflict and the program drops down the sheet allowing the user to resolve the conflict the rows in the sheet do not show the small image of the document (like Preview and TextEdit do).
Additionally, when I click on the area where the image should be (it's blank) it opens up a Quick Look window that just displays an image of the Document Icon together with some other information as opposed to a snap shot of the actual file like Preview and TextEdit do.
I have not found any information in Apple's documentation that explains what I need to do to implement the same behaviour as Preview and TextEdit.
So far I've been surprised by how easily I've been able to get all of the functionability of not only the Auto Saves and the Versions browser, but also saving to the Cloud. NSDocument seems to do all of this for the developer (resolving iCloud Conflicts, etc.), as Apple's documents says it does, but again I'm not getting this other behaviour and I don't want to reinvent the wheel by writing code that is not needed.
I'm thinking that the answer might lie somewhere with implementing a Quick Look thumbnail (for the small image in the table in the sheet) and a Quick Look preview for the larger preview of the document when that in the sheet is clicked on, but this seems like a lot of work and I'm afraid of losing some of the other build-in functions of NSDocument if I start "trapping" NSDocument routines up the food chain so to speak.
Has anyone else encountered this problem and found the easiest solution?
Update: Dec. 25/12
I've finally figured out that the problem is I need a QuickLook generator to display both a QL Thumbnail (which shows up in the table in the conflicts sheet) and a QL Preview (which is displayed when a user clicks on the Thumbnail)
I ended up creating the QL generator project, and afterwards creating a workspace which I added my main project and the QL generator project to. After that I added a Copy Files Build Phase to the main project to copy the QL generator into the main Application bundle.

Changing OS file icons using AIR app

I am building an AIR app which will be kind of like Dropbox. It will allow users to sync their files between various OSs. What I would like to know is that how can i change the default file system's file icons (add an overlay for eg) for states like - Synced and Syncing, the way Dropbox does it ??
On Windows i found out that Dropbox edits the registry files to insert the overlay icons..not yet sure how they do it in MAC OS X though.
I saw some threads here asking similar questions about AIR, but none referencing how to change file's icons. Hoping to get a solution for this from the various experts .. Please suggest any ideas if you know how it can be accomplished. Much thanks.
A simple yet effective solution would be to use icons that are only internal to your application : just embed in your application files some transparent pictures representing the various states of your files (with only the small part telling in which state it is, with the rest totally transparent), that you will add at runtime above the displayed icons.
Since you can get the actual icon of your files, just draw them into a BitmapData (if needed) & add an overlay with theses custom images, using the one related to your file's state in your application.
And one step further could be to store in your AIR application folder any resulting icons for future use (check what types of files you already have, and if your new file type isn't in thoses, export the various icons with your custom overlays to PNG files directly on the user device, for re-loading them the next time the application is opened).

Is that possible to play pdf files in flash player VB? [duplicate]

I try to open PDFs or folders (in finder/explorer) triggered by a mouse click in a swf application running in flash player.
Opening a PDF via urlRequest and navigateToUrl() always opens the browser.
I read about this solution with fscommand and it seems that we have to write shell scripts for mac and PC. Doesn't sound perfect.
The swf is executed on cd ROM. So I think we can't use an air application and the classes of the air framework (File... etc.).
Is there a better way?
As far as I know, you unfortunately cannot open a PDF into flash natively. It sounds like these *PDF*s are static assets on your CD ROM so I would take a look at a PDF -> SWF conversion tool. Maybe something like swftools. All of this in efforts to replace your current *PDF*s with *SWF*s which you can then load via the flash.display.Loader class.
we go now with zinc. it seems to be very powerful. you can create a exe from any swf. zinc let´s you implement many functions in actionscript, that give you access to the system. open pdf or something it the smallest task then :) cheers, florian