I have made an image viewer, and I would like to right click on an image, an the choose open with "MyImageViewer.exe" It also works - I browse the computer, and finde "MyImageViewer.exe", and click OK. But when I next time right click on an image, the "MyImageViewer.exe" is in the default open with list, byt only the icon is shown, not the program name. Why?
PrebKlok
Posts
-
Program name is missing in the "open with" list -
How to start Internet ExplorerThanks :)
-
How to start Internet ExplorerIs there a way to start an instance of Internet Explorer from a C#-form, so that IE automaticly opens the page http://www.xxxxxxxx.com?
-
Turning of the monitorsI can't find any Win32_xxxxx in root\CIMv2\ Here is a screenshot of what is see: www.klokmose.dk/images/screen1.jpg[^] Anyway the (ushort)6 didn't help anything
-
Turning of the monitorsHmm... changing the line now gives this execption: An unhandled exception of type 'System.Management.ManagementException' occurred in system.management.dll Additional information: Type mismatch I'm not sure if I understood your direction 100%. After having installed the WMI extensions, I opened the Server Explore and browsed to Servers|MyComputerName|Management Clas|Desktop Settings and then I right clicked and chose "Generate Managed Class"
-
Turning of the monitorsOk, would this be the way to go?
object [] arg = {6}; ManagementClass mc = new ManagementClass("Win32_DesktopMonitor"); mc.InvokeMethod("SetPowerState", arg);
problem is that I get the an exception: An unhandled exception of type 'System.Management.ManagementException' occurred in system.management.dll Additional information: This method is not implemented in any class -
Turning of the monitorsAhrghhh.... I just wanted a little help for a something that mattered to me, but I guess I'll have to stick to what what my newbe skills could to come up with:
private void Form1_Load(object sender, System.EventArgs e) { this.Location = new Point(0,0); this.BackColor = Color.Black; this.Size = new Size(1280*2, 1024); }
all through it doesn't turn off the monitors (since my monitors are backlighted), but at least it dims the light. Thank you guys X| -
Turning of the monitorsWow, I thought there would be something easy as just function.TurnOffMonitor(x) ... :sigh:
-
Turning of the monitorsHmm.. sounds quite easy, but sorry, I'm a newbee at C# so how do I do that?
-
Turning of the monitorsWell... I have my reasons, so is there a way or not?
-
Turning of the monitorsIs there a way to make a program that turns of the monitors. In Power Option Properties, you kan set the time from 1 minute to 5 hours, but I would like a program that could turn of my monitors right away, just clicking on an icon - is't for using when i watch films on a projektor, so only monitor 1 an 2 shold be turnd of, not monitor 3 (the projektor).
-
AVI-PlayIs it possible to play an AVI-file (Xvid) from within my C# application? I word prefer to have a panel where the video i played, but mayby it is only possible to start an extern player like Zoom Player. Is so, how do you start an extern player from a C# program? - and yes I am a newbee ;-)
-
Flicker free panelcustom panel? I just drag a panel from the toolbox. The lines a placed in the constructor.
-
Flicker free panelI am using these lines, to avoid flicker in my program:
SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.DoubleBuffer, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); private void timer1_Tick(object sender, System.EventArgs e) { Invalidate(); } private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e) { Graphics g = e.Graphics; ... }
However, it dont work for panels, only for the main window, if i try like this:private void timer1_Tick(object sender, System.EventArgs e) { panel1.Invalidate(); } private void panel1_Paint(object sender, System.Windows.Forms.PaintEventArgs e) { Graphics g = e.Graphics; ... }
It there a simple way to make panels flicker free? -
Upload/download monitoring.Yes, thank you very much :-)
-
Upload/download monitoring.I'm kind of new to C#, but would like to make at simple monitoring tool for my internet connection - upload/download. Is it possible to get acces to the Sent/Received on the "Locale Area Conection Status" - dialog? It would also be nice if I could get a value for the Sending/Receiving speed.
-
How to save a bitmapThanks, I will try that solution. I have just testet the method with memoryStream - it works, but it used 600 MB of memory!!! I only have 256 MB RAM, so my harddisk went totaly crazy, and even after I had shut down the program, Windows has totaly wierd.
-
How to save a bitmapWell - what is big bitmaps? Mine is about 3000px x 2000px, and i'm making the program as mdi, so there could be up to 20 bitmaps loaded into memory, but of cause you only would have to save one bitmap at the time. Anyway, i'm kind of new to c# (only been programming for a few weeks), so i'm not sure about what memoryStream i about yet. Might the be any othe solutions?
-
How to save a bitmapI am trying to save at bitmap that has been loaded with bitmap = (Bitmap) Bitmap.FromFile(FileName); When I try to save it again with bitmap.Save(FileName); I get an error message: An unhandled exception of type 'System.Runtime.InteropServices.ExternalException' occurred in system.drawing.dll Additional information: A generic error occurred in GDI+. If I try to it save with bitmap.Save(FileName2); everyting is fine, but it's not ok to me that you have to give the bitmap a new name. It's like the file is blocked by the system. I have noticed that the Image Processing for Dummies by Christian Graus have the same problem. How to solve that?