|
No - you will have to create your own dialog (a window-form shown with .ShowDialog )
|
|
|
|
|
Hi,
I think that any customization on MessageBox beyond standard Image and Buttons options is not available.
Create your own messagebox by deriving from System.Windows.Form class
hope that helps
zilo
|
|
|
|
|
You'll have to create your own and open it with the ShowDialog() method. This is best approach since it will allow you more flexibility and control that with MessageBox.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
I have a picturebox (imgViewer) which is displaying an image. Now i want to display another image (a smaller one) on top of this image. This is what i was doing:
private void btn_Path_Click(object sender, EventArgs e)
{
Bitmap path = new Bitmap(@"C:\Engg\Path.JPG");
Graphics graph = this.imgViewer.CreateGraphics();
graph.DrawImage(path, 0, 0);
graph.Dispose();
}
But nothing happens when i push my button (btn_Path). But when i change the code to draw on my form (instead of my picturebox), it works:
Graphics graph = this.CreateGraphics();
it properly paints on the form. What is wrong????? How can I paint on my picturebox which is already displaying an image?
|
|
|
|
|
change to:
<br />
private void btn_Path_Click(object sender, EventArgs e)<br />
{<br />
Bitmap path = new Bitmap(@"C:\Engg\Path.JPG");<br />
Graphics graph = Graphics.FromImage( this.imgViewer.Image );<br />
graph.DrawImage(path, 0, 0);<br />
<br />
graph.Dispose();<br />
}<br />
This should draw the "Path.JPG" on top of the stored image in the PictureViewer.
|
|
|
|
|
hey awsome dude.......... ur brilliant. it worked!!!!!
could u do me a favour and tell me what the difference was. I mean why was it working for the form and not for the picture box. they are both controls isnt it.
Thanks once again!!!!!
|
|
|
|
|
I guess the PictureBox get's an Invalidated message after you painted in it's client-area - so it just did what it should do after it's client-area got invalid - it painted it's internal image in it - and so undid your changes.
Even if your code worked - everytime the picturebox would repaint itself your changes would be gone.
|
|
|
|
|
Hi
I need to render images coming from an IP camera to DLP TV using VMR-9 filter. Is there any knows about it please give me the idea.
Thanks in Advance
Sheeja.
|
|
|
|
|
Hi,
this is the link[^] you can learn more about these things
hope that helps
zilo
|
|
|
|
|
|
Hi,
i have a button on my form.and i want Rounded border at all sides of button.so how can i do that.
amit
|
|
|
|
|
Look for controls that exist on this site, or write your own.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
You can search for an existing one or just create one yourself.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I create a user control that shows some different pictures(it look like just animation ). Here the code :
Bitmap dblbuffer;
g1=Graphics.FromImage(dblbuffer);
g1.Clear(this.BackColor);
g1.DrawImage(bmp1,...);//maybe next time it will draw anothe picture
g.DrawImageUnscaled(dblbuffer,0,0);
When backColor is not transparent,it works well.
But if backColor is transparent,the problem appear.That is,it cannot appropriately draw background when to draw smaller picture after bigger one.
So, how to copy the appropriate portion of the image(or background) of parent control onto my control's own surface.
thanks a lot
|
|
|
|
|
I mean that the code of "g1.Clear(this.BackColor)" dose not work well when BackColor is transparent.
|
|
|
|
|
I want to get the security permissions of a file in C#, Can anybody help to get worked out this ? What are the classes shall We use to get or set the Security Permissions of a file using C# code.
I'm using .Net framework 1.0,
can anybody help?
Thanks in Advance,
SMARTech
|
|
|
|
|
Check out the FileIOPermission Class here[^].
|
|
|
|
|
|
What is the easiest way to delete a read-only file?
I mean, is there a way, or do I have to reset it's read-only flag before I delete it?
Thanks.
|
|
|
|
|
File.Delete doesn't work if it's read only ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: File.Delete doesn't work if it's read only ?
Nope, it throws UnauthorizedAceesException. It came as a surprise to me, too.
|
|
|
|
|
Remove the readonly attribute by using File.SetAttributes:
string file = @"C:\temp\somedir\somefile.txt";<br />
FileAttributes fileAtts = File.GetAttributes(file);<br />
File.SetAttributes(file, fileAtts & ~FileAttributes.ReadOnly);<br />
Directory.Delete(@"C:\temp\somedir",true);
|
|
|
|
|
Hi,
We have a situation where we need to 'move' a file from one location to another. We are using the moveTo method of fileInfo class for this. But the issue with this is that when we execute it, the file, after it has been moved to the destination folder retains the previleges of the source folder whereas it should have gotten the previleges of the destination folder. copyTo method of the same object does not have this problem.
One alternative is to use the copyTo method and then delete method but that becomes a little risky and we do not want to go that route.
Any ideas how we could acheve 'moving' a file in VB.NET without using the fileInfo.moveTo()?
we are using .Net 1.0
Responses will be greatly appreciated.
Thanks in advance
|
|
|
|
|
Hi Rajesh,
I'm looking for the same , please let me know if you find any solution.
Thanks in Advance,
SMARTech
|
|
|
|
|
Hello everyone,
I'm wondering if there's a way to obtain user input without using a Form KeyDown event. I'm specifically looking for a method to get printable characters no matter which keyboard layout.
I'm developing an user interface for a graphical engine and I'm coding a textbox from scratch. I'm currently using GetKeyboardState, MapVirtualKeyEx and ToAsciiEx from user32, but sometimes I get odd repeated characters and I have no means to tell the repeated characters from the actual input.
Is there a managed way to get the same functionality?
Thanks in advance,
Rob
|
|
|
|