Using F-IN-BOX you are able to create applications based on transparent flash movies. You can create applications with translucency non-rectangle forms. Use Flash to make applications with modern user interface, make a business logic using .NET.
Use f_in_box__form component to work with transparency.
Please note that form transparency is supported only under Win2k (or higher), 16 / 32 bpp display mode. To check if the transparency is supported use the function IsTransparentModeAvailable:
[ C# ]
-
- if (!f_in_box__lib.Global.IsTransparentModeAvailable)
- {
- System.Windows.Forms.MessageBox.Show("Transparent mode is not available");
- return;
- }
-
-
-
- MyTranslucencyForm FlashPlayerForm = new MyTranslucencyForm();
-
-
- System.IO.Stream MovieStream =
- System.Reflection.Assembly.GetExecutingAssembly().
- GetManifestResourceStream("Sample4_Translucency.Embedded_Movies.movie.swf");
- FlashPlayerForm.PutMovieFromStream(MovieStream);
-
-
- FlashPlayerForm.Width = 400;
- FlashPlayerForm.Height = 400;
- FlashPlayerForm.Left =
- System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width / 2 -
- FlashPlayerForm.Width / 2;
- FlashPlayerForm.Top =
- System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height / 2 -
- FlashPlayerForm.Height / 2;
-
-
- FlashPlayerForm.FlashMethod_Play();
-
- FlashPlayerForm.Show();
-
- Application.Run(FlashPlayerForm);
// Check transparent mode
if (!f_in_box__lib.Global.IsTransparentModeAvailable)
{
System.Windows.Forms.MessageBox.Show("Transparent mode is not available");
return;
}
// MyTranslucencyForm is inherited from f_in_box__lib.f_in_box__form
// Creating translucency form
MyTranslucencyForm FlashPlayerForm = new MyTranslucencyForm();
// Loading movie from stream
System.IO.Stream MovieStream =
System.Reflection.Assembly.GetExecutingAssembly().
GetManifestResourceStream("Sample4_Translucency.Embedded_Movies.movie.swf");
FlashPlayerForm.PutMovieFromStream(MovieStream);
// Positions
FlashPlayerForm.Width = 400;
FlashPlayerForm.Height = 400;
FlashPlayerForm.Left =
System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width / 2 -
FlashPlayerForm.Width / 2;
FlashPlayerForm.Top =
System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height / 2 -
FlashPlayerForm.Height / 2;
// Play and...
FlashPlayerForm.FlashMethod_Play();
// ...show
FlashPlayerForm.Show();
Application.Run(FlashPlayerForm);
[ VB.Net ]
-
- If Not f_in_box__lib.Global.IsTransparentModeAvailable Then
- MessageBox.Show("Transparent mode is not available", _
- Application.ProductName)
- Return
- End If
-
-
-
- Dim FlashPlayerForm As New MyTranslucencyForm
-
-
- Dim MovieStream As System.IO.Stream = _
- System.Reflection.Assembly.GetExecutingAssembly._
- GetManifestResourceStream("Sample4_Translucency.movie.swf")
- FlashPlayerForm.PutMovieFromStream(MovieStream)
-
-
- FlashPlayerForm.Width = 400
- FlashPlayerForm.Height = 400
- FlashPlayerForm.Left = _
- Screen.PrimaryScreen.WorkingArea.Width() / 2 - _
- FlashPlayerForm.Width / 2
- FlashPlayerForm.Top = _
- Screen.PrimaryScreen.WorkingArea.Height() / 2 - _
- FlashPlayerForm.Height / 2
-
-
- FlashPlayerForm.FlashMethod_Play()
-
- FlashPlayerForm.Show()
-
- Application.Run(FlashPlayerForm)
' Check transparent mode
If Not f_in_box__lib.Global.IsTransparentModeAvailable Then
MessageBox.Show("Transparent mode is not available", _
Application.ProductName)
Return
End If
' MyTranslucencyForm is inherited from f_in_box__lib.f_in_box__form;
' Creating translucency form
Dim FlashPlayerForm As New MyTranslucencyForm
' Loading movie from stream
Dim MovieStream As System.IO.Stream = _
System.Reflection.Assembly.GetExecutingAssembly._
GetManifestResourceStream("Sample4_Translucency.movie.swf")
FlashPlayerForm.PutMovieFromStream(MovieStream)
' Positions
FlashPlayerForm.Width = 400
FlashPlayerForm.Height = 400
FlashPlayerForm.Left = _
Screen.PrimaryScreen.WorkingArea.Width() / 2 - _
FlashPlayerForm.Width / 2
FlashPlayerForm.Top = _
Screen.PrimaryScreen.WorkingArea.Height() / 2 - _
FlashPlayerForm.Height / 2
' Play and...
FlashPlayerForm.FlashMethod_Play()
' ...show
FlashPlayerForm.Show()
Application.Run(FlashPlayerForm)