I'm currently in the middle of making a VB.NET project. I want to have the VB.NET project control the actions of the Flash projector. (Stop, play, change text of text control in the Flash projector, etc.) This is a one way control however, nothing about the SWF projector will interact back with the VB.NET project.
The image below shows an idea of what I want to have done.
EDIT: Okay I managed to get a SWF object available to be put in the project. So now, my question is how do I get the two (Visual Studio and the SWF object that is being included in another form windows) to interact. That is, if I push a button on VisualBasic, I can call a function in AS3/SWF to do something and receive a variable from the Visual Basic form.
The AS3 code contains the following
function fl_ClickToGoToWebPage(event:MouseEvent):void
{
lblText.text = "Congrats! It Works!";
}
btnChange.addEventListener(MouseEvent.MOUSE_UP, fl_ClickToGoToWebPage);
Here is a photo of the actual SWF.
What I would like to do is invoke this function (or some similar function) passing info to the SWF projector (being run as an ActiveX Flash object in Visual Studio) from the VB form. (Ignore the button on the actual SWF, that button won't be there on the final run) I'm running into two problems:
1) How do I modify addEventListener
so that it can take more than one parameter or is there another event or function I could use?
2) How do I invoke this function from within Visual Studio as a part of a sub or function from within VS/VB.NET?
I don't need it to reciprocate, as in Visual Studio getting information from the SWF.
VB is part of the open-source wave at Microsoft, so as Wischik observes, the VB compiler will be open source as part of the project codenamed Roslyn.
Visual Studio is an Integrated Development Environment(IDE) developed by Microsoft to develop GUI(Graphical User Interface), console, Web applications, web apps, mobile apps, cloud, and web services, etc. With the help of this IDE, you can create managed code as well as native code.
Writing VB.Net Programs on Linux or Mac OS Mono is an open-source version of the . NET Framework which includes a Visual Basic compiler and runs on several operating systems, including various flavors of Linux and Mac OS.
Though C# and VB.NET are syntactically very different, that is where the differences mostly end. Microsoft developed both of these languages to be part of the same . NET Framework development platform. They are both developed, managed, and supported by the same language development team at Microsoft.
I just ran a quick test using sendkeys and it worked ok; at the heart of it was:
setting the flashplayer as the foreground window ...
Friend Declare Function SetForegroundWindow Lib "user32" (ByVal hWnd As IntPtr) As Integer
and then using the sendkeyes command
System.Windows.Forms.SendKeys.SendWait
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With