locked
swf player RRS feed

  • Question

  • how to open .swf extention in my application by click on .swf file

    ____________________________________________ Everything is possible

    Saturday, August 24, 2013 5:12 AM

Answers

  • how to open .swf extention in my application by click on .swf file

    ____________________________________________ Everything is possible

    You can install your app on your computer using Click Once Deployment which can tell the computer you are installing your app on to register specific file extensions to your application. Then if you click on the file extension your app will open.

    But then your app has to be set up to receive the file path and file name info trying to be passed to it by clicking on the file so it knows what file was clicked on that caused it to open so it can do something with the file. For that your program needs to access My.Application.CommandLineArgs to get the information on the file that opened it I believe.

    If you don't want to use Click Once Deployment to install your app and tell your computer what file extensions to associate to your app then you can edit your registry and do it manually or write a program to change your registry appropriately. Some info from this thread may help with that http://social.msdn.microsoft.com/Forums/en-US/ac50d97c-c776-4025-9419-41aa4d9bc58e/richtextbox-standard-open-file or maybe not.


    Please BEWARE that I have NO EXPERIENCE and NO EXPERTISE and probably onset of DEMENTIA which may affect my answers! Also, I've been told by an expert, that when you post an image it clutters up the thread and mysteriously, over time, the link to the image will somehow become "unstable" or something to that effect. :) I can only surmise that is due to Global Warming of the threads.

    Monday, August 26, 2013 7:17 AM

All replies

  • Hello,

    According to your description, I understood there is an issue regarding how to play SWF file in

    VB.NET.

    I created a sample on my side. The detailed steps is below.

    1. I suggested you to install the latest version of Adobe Flash Player. Because SWF file is based

    on Adobe Flash Player.

    2. Open Visual Studio -> Create a Windows Form Application -> Right-click Toolbox -> Choose

    Items -> COM Components ->Find and add Shockwave Flash Object to the Toolbox

    3. Drag & drop the Shockwave Flash Object ActiveX Control to the form, you will get

    AxShockwaveFlash1 object.

    4. Assign value to the Movie property of Shockwave control. Something looks like.

    Public Class SWFPlayer Private Sub BtnPlay_Click(sender As Object, e As EventArgs) Handles BtnPlay.Click AxShockwaveFlash.Movie = Application.StartupPath + "\\Resources\\sample.swf" End Sub End Class

    I have uploaded sample code to SkyDrive, The download link is below.

    https://skydrive.live.com/redir?resid=F6BFF8BD172F0399!146

    If you need further assistance, please feel free to let me know.

    Regards,


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, August 26, 2013 2:38 AM
  • how to open .swf extention in my application by click on .swf file

    ____________________________________________ Everything is possible

    You can install your app on your computer using Click Once Deployment which can tell the computer you are installing your app on to register specific file extensions to your application. Then if you click on the file extension your app will open.

    But then your app has to be set up to receive the file path and file name info trying to be passed to it by clicking on the file so it knows what file was clicked on that caused it to open so it can do something with the file. For that your program needs to access My.Application.CommandLineArgs to get the information on the file that opened it I believe.

    If you don't want to use Click Once Deployment to install your app and tell your computer what file extensions to associate to your app then you can edit your registry and do it manually or write a program to change your registry appropriately. Some info from this thread may help with that http://social.msdn.microsoft.com/Forums/en-US/ac50d97c-c776-4025-9419-41aa4d9bc58e/richtextbox-standard-open-file or maybe not.


    Please BEWARE that I have NO EXPERIENCE and NO EXPERTISE and probably onset of DEMENTIA which may affect my answers! Also, I've been told by an expert, that when you post an image it clutters up the thread and mysteriously, over time, the link to the image will somehow become "unstable" or something to that effect. :) I can only surmise that is due to Global Warming of the threads.

    Monday, August 26, 2013 7:17 AM