|
Hi
I need some help in getting a video played in the back ground of my win form where I will add some controls that would display some text and other stuff.
What I did until know is.
Using interop and Com I am able to play the video inside a panel, but here is the problem if I add a control inside the panel ex.
This.controls.add(panel1)
This.panel1.Controls.Add(textcontrol)
When the video loads it is hiding everything in the same control (panel1) but not all the form unless I set the size of panel1 to be as the same size as the form.(I don’t want every thing to be hidden I want the controls to show over the video with an alpha transparency level )
What I did is instead of adding the textcontrol to the panel1 I am adding it to the main form so I am being able to put the text over the video, but I am losing the benefit of having an alpha (transparency) for my text.
I would weolcme any suggestion to solve this and any alternative solution
Simply what I am trying to achieve now is to have a news bar like the one that you can see on CNN by adding text over the video
Thanks for reading this.
Best regards
|
|
|
|
|
I'm not sure about the solution to your exact problem (I'll take a look at this later tonight possibly...it might have to do with how overlays in general work), but I'm curious why you're using interop and COM to use DirectShow functionality?
Have you considered looking at the Managed DirectX stuff and the Microsoft.DirectX.AudioVideoPlayback namespace in particular? It seems like it'd be a lot easier in general than doing COM interop.
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
I'm building a custom control and I want it to change borders when a MouseEnter events happens.
a) Can I simply paint the border in the MouseEvent method?
OR
b) Must I set a flag and call Invalidate(), and wire OnPaint to draw the new/old border appropriately?
If a) is ok, then how do I get a graphics instance in the MouseEnter event.
Or, is b) the preferred method to do this?
Thanks,
-Luther
|
|
|
|
|
Because there are several things that can happen while your mouse is moving or resting comfortably in the bounds of your control, it'd probably be best to set a flag (ex: set to true ) and call Invalidate() in the handler for MouseEnter event, and to clear the flag (ex: set to false ) in the handler for the MouseLeave event. Of course, your override for OnPaint (note, this is an override, not an event handler, which are typically wired for other controls - use overrides when possible to override functionality from the base class) should draw the border appropriately depending on the flag.
The first method is possible (see Control.CreateGraphics ) but is too problematic since MouseEnter only fires once. Your border would get painted, sure, but then any successive painting required won't repaint the border.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
The flag method works cleanly - I typically try to avoid saving and polling state like that ... but practically speaking, I assume it makes sense in this stateful, event driven world.
I also appreciate your comment regarding overrides vs handlers. It wasn't concretely clear to me when to use which.
I see that for every child control I add to a parent, I could add a handler. Self-documenting and a bit easier to organize. Whereas, the control's own painting naturally belongs in the override.
Thanks!
-Luther
|
|
|
|
|
How can I run a c# application without .net framework ?
|
|
|
|
|
No. There's a reason .NET applications are said to be managed code: it's managed by the CLR, just like Java is by the JVM, Visual Basic is by the VB runtime, etc.
The .NET Framework MUST be installed to run ANY .NET application (regardless of what language the source code is in, since all compilers produce IL, except the MC++ which - in mixed mode - can embed native code into assemblies).
See the following article for a pretty good view on the subject: http://radio.weblogs.com/0105852/stories/2002/04/21/itsTheRuntimeStupid.html[^].
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Time to bookmark that link .
I think his comment about C# possibly being the new VB is dead on. It's not TOTALLY the consumer's fault in my opinion. MS does a good job at hyping how easy this stuff is, and as a result people jump in head first . That said, there's never a magic bullet that makes programming as easy as writing a Word document.
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
Hmmm...I saw your reply to my reply, and responded. Now your reply is gone (did you move/delete it?) and my response got lost in some weird void. In any event, check this out if you get bored.
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
|
They claim that this will do it.
Remotesoft
Thank You
Bo Hunter
|
|
|
|
|
You Can Use MONO
Works with Linux =)
----
hxxbin
|
|
|
|
|
|
Hi! does anyone know how to insert a progressbar within a listview control? the purpose of the progressbar is to show a graphical representation of a percentage. thanks!
|
|
|
|
|
This has been covered countless times in this forum, including just recently. Please click the "Search Comments" link at the top of this messages box to find relevent messages and to see the complete threads.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I found a nice piece of code from the MSDN that does it. However this note was attached to it:
// PERFORMANCE NOTE:
// For ease of implementation, SecureClientChannelSink can take out some pretty big locks.
// Not a problem for demo purposes, but if this will be used as the basis for any kind of
// production level code, synchronization needs to reviewed and possibly greatly revamped.
Can anyone point me to an optimized piece of code?
|
|
|
|
|
I found a good example of a Secure Remoting Channel on Ingo Rammer's book. www.ingorammer.com[^]
Free your mind...
|
|
|
|
|
Thanks for the link. Many usefull examples in the code download for the book.
|
|
|
|
|
Big newbie here, I hope I can explain my problem. I have two classes, Entities and Executants. I’ve added a reference (Entities) to Executants. The path is correct and when adding the using it did work at one time. Now for some reason my references aren’t working. I’ve tried to remove and add it again, but still not having any luck. Any suggestions as to how to begin figuring this problem out?
Judy
|
|
|
|
|
If the two Types are in a project in your solution (or if you can add it to your solution), right-click on the project that depends on these Types and add a reference, only click on the Projects tab and add a project reference. VS.NET will automatically keep track of changes and build dependencies when needed, as well as use the appropriate build (Debug, Release, etc.) so that everything is in sync.
If these were simply file references to some pre-built assembly, make sure you don't change the locations of those assemblies, even if they're in the GAC. VS.NET references file locations in other directories on your system - the assemblies in the GAC are used at runtime if the assembly names are the same as those referenced in your assembly manifest, or if you have change the runtime configuration in your app.config file.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Thanks for your response Heath. I believe what you suggested is what I've done. In the reference files within that one project displays the class I've added, but when I add the using SolutionName.ClassName, it's not available. At one time it was, but now it's gone. I have a twilight zone thing happening on my computer lol.
The path is correct, any other suggestions?
Judy
|
|
|
|
|
Namespaces can span multiple assemblies. If you're trying to access a class the assembly in which it's contained must be referenced by the assembly that needs to use that Type. The namespace may exist in the current assembly or another dependency, but the class exists in the one assembly. Make sure that assembly (not class) is referenced.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
AH.... ya lost me lol. Did I mention I was a huge, HUGE NEWBIE and blonde to boot. What is an assembly? what does this structure look like? And how can I reference an assembly, verses the class?
Judy
|
|
|
|
|
You should read Inside the .NET Framework / Assemblies[^] on MSDN, as well as the rest of the overviews of .NET under .NET Framework[^]. It's important to understand the basic concepts before getting started.
Assemblies contain not only the stuff I mentioned earlier, but all the Types defined in that assembly. A Type is a class, struct, enum, or delegate that is contained in a simple assembly. If you want to reference a Type from one assembly in a different assembly, you must reference that assembly in Visual Studio .NET (or using the /r param for the command-line compiler for the language in which you're developing).
For example, if you want to develop a Windows Forms application, you project must reference the System.Windows.Forms.dll assembly, as well as a few others like System.dll and System.Drawing.dll. If your application references another project (that compiles to an assembly), right-click on References and click Add Reference. Select the Projects tab and add your project (if it's in the same solution, otherwise use the .NET tab for .NET assemblies or the COM tab to add an interop assembly).
The using keyword used to "import" namespaces is only to save you from having to type the full namespace and class name, similar to the import keyword in Java. If you try using using with a namespace that is defined in another assembly (and remember, a namespace can span multiple assemblies so just because the namespace is available doesn't mean the class is available), then you must reference that assembly.
Remember, be sure to read about the .NET Framework and understand the concepts, such as .NET isn't limited to C# and - once compiled - the fact that the source was written in C# makes little to no difference (different languages compilers that target the Common Language Runtime, or the CLR, all produce Intermediate Language, or IL, with only a few differences depending on compiler optimizations and what the compilers supports).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Hello,
I am trying to find away to change a DataGrid column value to an image.
Example:
If I have a column called Test and the value of that columns cell is "Y" I want to change "Y" to an image instead of displaying the "Y" value.
Hope someone can help.
Thanks.
Jarrad D.
|
|
|
|