|
I want to paint a particular part of image on the form that is I want to display the picture not its background... I have differentiated between both the background and picture using lock mode and bitmap data. Now how can I display that required portion on the form??? Can any buddy help?????
should I use region if soo then how???????
-- modified at 3:42 Wednesday 21st February, 2007
|
|
|
|
|
The desktop is not intended to support such functionality.
|
|
|
|
|
mike montagne wrote: desktop is not intended
I dont want it on the desktop I want it on the form......
|
|
|
|
|
So reference GDI graphics and/or read articles on this site for your answer. If you have the image, you can assign it to your form's background image. If you need to take a subregion of the source image, clone, copy, or draw that to a new bitmap, and assign that to your background image.
|
|
|
|
|
hi all,
i wanna to ask,
that if i have a line and i want to select it
how can i make it seems to be selected(u know in graphics
shapes have their color changed or selected when clicked)
Generator
|
|
|
|
|
The most simple method is to XOR the color. Off the top of my head I do not know the method to XOR a color. Also you can draw a border around the line. Or you can change the pen to be dashed or some other non-solid pen type.
Pen pen = new Pen(new System.Drawing.Drawing2D.HatchBrush(System.Drawing.Drawing2D.HatchStyle.Cross, Color.Black), 2f);
File Not Found
|
|
|
|
|
Hello,
my question today is, how do I declare a method which accepts the reference pointer on an other method as argument.
here is some pseudo code to demonstrate what I mean.
<br />
void humppa() {...}<br />
<br />
void IwantHumppa(????????){...}<br />
<br />
void Main()<br />
{<br />
IwantHumppa(humppa);<br />
}<br />
The "??????????" is the part I don't know and where hopefully you guys can help me!
Thx!
~HUMPPAAA!
|
|
|
|
|
|
delegate void SampleDelegate(int arg1, int arg2, string abc);
private void SomeOtherMethod(int arg1, int arg2, string abc){}
private void SomeMethod(SampleDelegate sd){
sd(1,2,"test");
}
Then in some method
SampleDelegate sd = new SampleDelegate(SomeOtherMethod);
SomeMethod(sd);
File Not Found
|
|
|
|
|
i want to make an application in wihch the inner part(which is opaque) must show the contents of lower window or applincation etc..... so tht it can make a dynamic copy of lower application...... n display in that inner part...
plz tell me a way out????
how to make it!!!!!!!!!!!!!
sushant kaura
|
|
|
|
|
I've worked with GDI, but haven't done exactly what you ask... so this is just a hypothesis.
What I would try at first is to take a screen shot of the window as in Alt+PrintScreen. You should be able to easily paint the result from the clipboard to a bitmap or the background image of your application window.
|
|
|
|
|
From within a C# application (Visual Studio 2005), I want to programatically iterate the list of GAC Assemblies used by the program, and view the Assembly versions. Can anyone provide me with information, and/or a link, that will help me perform this task?
Thank you...
|
|
|
|
|
Hi,
I am clueless about how to perform a virus scan using my symantec antivirus, i.e. i am developing an email client, I need to scan virus first and then send.
Thank you!
M. Nauman Yousuf
"Mess with the Best, Die like the rest"
|
|
|
|
|
Is there a way to make the Save File Dialog have an uneditable (so they have to stay in that directory) directory path or do I have to create a dialog from scratch to do this?
|
|
|
|
|
AFAIK, you have to create your own dialog to do this.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
I have an issue with the context menu, i.e. when i try opening a single file it works fine, but when i try selecting multiple files and then select my menu options it opens up a window for each of the selected items
If any 1 has any clue about it, please let me know
Thank you!
M. Nauman
"Mess with the Best, Die like the rest"
|
|
|
|
|
What do you mean by "it opens up a window for each of the selected items"?? You didn't give any information as to how you're using this context menu or in what application...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi Dave,
I registered an entry in the registry for .txt files so each time when right-click is pressed in the menu my menu entry is also present.
My appliction is just a test that windows is passing me the file paths of the selected text files.
Application opens up a console window and displays the path passed by windows as argument.
Now when I select multiple files, it opens up multiple console windows displaying path of each file in each console window.
Thank you!
M. Nauman Yousuf
"Mess with the Best, Die like the rest"
|
|
|
|
|
M. Nauman Yousuf wrote: Now when I select multiple files, it opens up multiple console windows displaying path of each file in each console window.
Of course it does! That's how Explorer works when multiple items are selected. Explorer will launch the command line you gave it in the Registry with each and every file you selected, seperatly. Like this:
myapp.exe filename1.txt
myapp.exe filename2.txt
myapp.exe filename3.txt
myapp.exe filename4.txt
It will NOT do this:
myapp.exe filename1.txt filename2.txt filename3.txt filename4.txt
It's up to you to write your application to look for previous instances and pass any data back to the initial instance. Google for "C# Single Instance app" for examples. There's even a few articles about it right here on CodeProject.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
I'm trying to prevent a combo box from displaying the dropdown when the user clicks on it. MFC's ShowDropDown(false) was doing this. Is there a way to accomplish the same result in C#?
thanx
|
|
|
|
|
Hello,
You just have to set the Boolean property "DroppedDown" to "true".
All the best,
Martin
|
|
|
|
|
Martin,
I tried that, but the dropdown flickers. It comes up and it dissapears right away. Is there a way to prevent it from appearing?
thanx
|
|
|
|
|
Hello,
On which eventhandler are you linked to when you set the property?
|
|
|
|
|
I'm doing it on DropDown event:
this.comboBox1.DropDown += new System.EventHandler(this.comboBox1_DropDown_1);
...........
private void comboBox1_DropDown_1(object sender, System.EventArgs e)
{
this.comboBox1.DroppedDown = true;
}
It's pretty weird. The first click won't show it, but the second click will.
|
|
|
|
|
Hmmm,
I don't understand why you are doing that!
You said that you whant it to show when the user clicks the control.
So I would rather use the click or mousedown event of the combobox.
Hope it helps!
All the best,
Martin
|
|
|
|