|
With difficulty
Your best bet would be to embed a media player like the Windows Media Player control thingy in your application (just drop the control on the form) and use that, otherwise you'll have to deal with decompressing the video, converting it to a displayable format, drawing it on the form, as well as dealing with trying to optimize it so that the video displays in it's realtime.
At least with an embedded control then the majority of stuff is native code and will be faster and also the drawing will be done by Win32 rather than GDI+ so will be faster as well.
You could do what you want if you know how to decode the video but it probably won't be displayed in realtime.
Sorry to burst your bubble
Ed
|
|
|
|
|
Having issues find solution in for Remote Registry editing.
Yeah i got the remote viewing under control...
With remote editing, I can do it with VBscript easy:
Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")<br />
objReg.SetStringValue HKEY_LOCAL_MACHINE,strPointerKey,strPointerEntry,strPointerValue<br />
objReg.CreateKey HKEY_LOCAL_MACHINE,strMyKey
surely .NET can do it. this is what i tried:
RegistryKey LM = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine,WSID);<br />
RegistryKey inventoryKeys = LM.OpenSubKey("SOFTWARE\\CompanyName\\AppName");<br />
inventoryKeys.SetValue("ValueName","Value");
and the error message is:
Get REG values: System.UnauthorizedAccessException: Cannot write to the registry key.
at Microsoft.Win32.RegistryKey.ValidateState(Boolean needWrite)
at Microsoft.Win32.RegistryKey.SetValue(String name, Object value)
at testReg.Class1.update() in c:\projects\testreg\class1.cs:line 48: 03/24/20
06 02:41:01 PM
|
|
|
|
|
I thought the error was pretty clear. The account your code in running under (probably yours) doesn't have write permissions to the key you opened.
Are you running in a domain environment?
Does the account you're using have Administrator rights to the remote machine?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote: Are you running in a domain environment?
Does the account you're using have Administrator rights to the remote machine?
Yes.
Yes.
|
|
|
|
|
Then the only other possibilities that I can think of (in my currently grogy state) is that either the key path doesn't exist or the ACL permissions on that key are restricting access to it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How to off window in console application?
|
|
|
|
|
If you mean how to hide the console window, compile the application as a Windows Forms application. If you compile as a console it'll always be there.
Ed
|
|
|
|
|
Application.Exit();
miss cocowp
|
|
|
|
|
i have a question about strings, for example if i have line like that:
Dialogue: 0,0:00:33.36,0:00:36.61,Default,,0000,0000,0000,,{\k63}hora {\k54}omou {\k51}ijou {\k34}ni {\k48}tondemo {\k75}nai
and i want to get all values near the "\k", in other words, it's will return me 63, 54, 51, 34, etc.
thanks for help.
|
|
|
|
|
string test = @"Dialogue: 0,0:00:33.36,0:00:36.61,Default,,0000,0000,0000,,{\k63}hora {\k54}omou {\k51}ijou {\k34}ni {\k48}tondemo {\k75}nai";
string regex = @"\{\\k(\d+)\}";
foreach (Match match in Regex.Matches(test, regex))
{
Console.WriteLine(match.Groups[1].Value);
}
[modification]You'll need to import System.Text.RegularExpressions in your source file (or type the full name for RegularExpression classes)[/modification]
Ed
|
|
|
|
|
Please excuse me if this is an 'obvious' or 'trivial' question . . . I'm a C# newbie . . . familiar with VB5 (learning VB.NET and C#.NET), but this .NET arena is quite different
I would like to write a C# applet which hides in the background and watches for the common Windows "File Open" (or "File SaveAs") dialog to open-up (from any application running on the system), and then attach a couple of icons to the title-bar which would do actions that I'm going to code-up.
Specifically, there's an old, unsupported piece of software called "PowerDesk Dialog Helper" (which worked great pre-XP, but is mostly-broken with modern apps) which would put a "Recent Files" and "Recent Folders" icon on the title-bar (the lists being unique to the application which launched the dialog) so that you could easily navigate to places where you'd been with that application. I'd like to recreate this behavior, and embellish upon it.
Any suggestions on how to make my applet (probably hide in the 'tray') take-notice of a newly-opened "File SaveAs" or "File Open" dialog box, and then attach a pair of icons to it's title-bar??
Thanx (in advance).
Saber Of Borg
|
|
|
|
|
Please excuse me if this is an 'obvious' or 'trivial' question . . . I'm a C# newbie . . . familiar with VB5 (learning VB.NET and C#.NET), but this .NET arena is quite different
I would like to trigger an event when a window or dialog opens-up anywhere in the Windows environment. I wish my C# applet to take some action (specifically, to pop that window/dialog to the foreground of all other open windows) when it senses that a window/dialog has just appeared-on-the-scene; I don't want to trigger when a user merely "Restore"s (i.e. un-minimizes) an already-open application. I'm trying to write a 'tray' applet which watches for the Outlook2003 "Reminder" dialog (which often pops-up BEHIND open applications, thus not waking-me-up for my appointments ;-O ) and forcing it to the foregound . . . and possibly playing a 'sound' to get my attention.
Any pointers on how to do that, or which keywords I should be using in searches? I've tried "trigger window open" (and similar words), but haven't stumbled upon anything useful yet.
Thanx (in advance).
Saber Of Borg
|
|
|
|
|
How about using Form.Activate() method.
|
|
|
|
|
This might possibly help me raise a form to the front once I know that a particular form needs to be brought to the front, but, I don't see now this will wake-up my application when some other application window has just opened. Please elaborate . . .
Thanx.
Saber Of Borg
|
|
|
|
|
In Outlook, Tools - Options - Other tab - Adcanved Options button, Reminder Options button...
If there was any example of a convoluted and misleading Options dialog, where you couldn't find anything you wanted, Outlook is it!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yes, I know . . . and the dialogs change with each version of Outlook . . . the old Outlook 2000 on Win2k seemed to work fine . . . always seemed to pop-up when it should . . . at home my Outlook 2002 on WinXPhome seems to work fine . . . always seems to pop-up when it should . . . the problem I'm having is with Outlook 2003 on WinXPpro . . . about half the time it pops-up behind the other open windows. And, YES, I have the option set that is supposed to force it to the front . . . but it still doesn't. I've tried un-setting the option, saving, then resetting the option, saving . . . thinking perhaps the registry entry where that is stored just needed a swift kick in the rump . . . no help.
So, since their stupid s/w can't seem to get-the-hint I thought I'd write a background task that would take charge and do it for Mr Gate's Banta fodder. Plus, I use a math analysis tool called Mathcad which, when you launch it, is too dumb to pop to the front despite the fact that it opens "Maximized" . . . so, if figured I'd flush 2 turds with one stone
So, that being the case . . . any ideas how my VC# program can wake-up when a window or dialog (from another app) has just appeared??
TIA
Saber Of Borg
|
|
|
|
|
Hi!
You either poll the current windows (P/invoking EnumWindows ) for a file dialog window (you can use Spy++ to find out the correct window class names), but that's not very elegant.
Or you create a system-wide hook to inform you application that a special window has appeared - I think CTBHOOKs can monitor the creation of windows.
The problem is that hook procedures in C# will not work in every case (injecting managed code into an unmanaged application can become a little tricky ), but since the hook procedure only has to inform you that a special window has appeared and perhaps transmit the HWND of this window, it should be possible to put together the proc in C++ by adapting one of the samples flowing around the net.
HTH,
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Saber Of Borg wrote: So, since their stupid s/w can't seem to get-the-hint I thought I'd write a background task that would take charge and do it for Mr Gate's Banta fodder.
I've never had a problem with it not popping up. My fiancee has also never had a problem with that stupid reminder thing never popping up in front.
Saber Of Borg wrote: Plus, I use a math analysis tool called Mathcad which, when you launch it, is too dumb to pop to the front despite the fact that it opens "Maximized"
It sounds more like you've got a problem with the system, or some other "tool", than these two applications. Perhaps something installed with the video driver?? I know ATI and NVidia has packaged some new toys in their driver packages. Or possibly some other tool that screws with Windows.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Do you and your fiancee use Outlook 2003 on WinXPpro? The Outlook reminders worked fine in Outlook 2000 on Win2k . . . and it works fine on my home system (Outlook 2002 on WinXPhome). I suspect that they changed (broke) something in Outlook 2003.
Mathcad never popped to the front at work . . . Win2k or WinXPpro . . . but it does at home on WinXPhome. Perhaps there's something going-on with NOT being an Admin (aka SuperUser) at work?
Regardless, it still sounds like an interesting learning experience to be able to do what I want to do
Saber Of Borg
|
|
|
|
|
Hi,
I have a toolbar on a windows client form. The toolbar contains a mix of icons and icons + text styled buttons. However, the toolbar seems to resize all buttons to the widest button.
How can I make the toolbar buttons different widths?
I guess I'm trying to get something similar to the IE toolbar where you have buttons like the Home (icon only) and the Search (icon + text).
Any help/advice is much appreciated
Thanks
Peter
|
|
|
|
|
You should be able to disable the AutoSize property of each button. At least you can in a ToolStrip . See this[^] screenshot for example.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
Thanks, but no luck there. The AutSize property is only for the Toolbar control only and not available for each button.
|
|
|
|
|
|
Hi,
I'm using WinXP SP2. Now, I want to use C# to control (turn on/off) the services (ex: Telnet, Telephony, Themes....) in WinXP!
Thanks much,
Hung.
Hung
|
|
|
|
|
|