|
You can, but I don't see a reason to.
I'd suggest using a Dictionary or something.
Or this[^].
|
|
|
|
|
I want to paint a selection image on top of the existing image of a PictureBox (just changing the BorderStyle looks ugly if you select more than one).
So far I have this:
g = Graphics.FromImage(((PictureBox)sender).Image);
g.DrawImageUnscaled(new Bitmap(filepath), 0, 0); where g is a Graphics object and filepath is the absolute path of the selection image.
Is there a way to use a relative path, I tried just using the filename and "Images\Selection\Selection Image" but these wouldn't work.
Anyway, how do I make the PictureBox re-pait itself the moment you select it?
I tried adding something like this
this.InvokePaint(((PictureBox)sender),new PaintEventArgs(this.CreateGraphics(), ((PictureBox)sender).ClientRectangle)); but it didn't make a difference, with or without the PictureBox only gets re-painted when the whole form gets re-painting, but not immediately.
Thanks.
|
|
|
|
|
Call it's Invalidate method
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Hmmm if i understand you correctly then try...
PictrueBox1.Invalidate();
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Thanks, this works.
I wonder why I didn't think of this...
|
|
|
|
|
Hi,
In the custom control Paint event i want to save all activities in every Paint event firing. So when i draw anything in that custom control i can record, so i can play the recorded file later.
How can i record the paint event in the custom control?
Thankyou
YPKI
|
|
|
|
|
|
Do you need the actual steps, or just the result?
You could get a bmp grab of the control at the end of your Paint event easily enough.
|
|
|
|
|
i want to save each event to a file and need to play those events when ever i requried.
|
|
|
|
|
Dear sir,
i have two list view, i want to drag one item from one list view to another list view. how can i do this??
yogesh
|
|
|
|
|
There's an excellent article on CodeProject describing how you build that kind of functionality.
Good luck
I are troll
|
|
|
|
|
plz give me that link sir,
yogesh
|
|
|
|
|
|
You only posted this problem 3 hours ago. Please don't attempt to bump your post to the top - be patient. Bumping posts is considered to be bad forum etiquette and is likely to end up in you being ignored.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Give in an hour then post again... third time lucky as they say...
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
how to use C# draw two curve(noCloseCurve) on window.
|
|
|
|
|
Look at the members of the Graphics class, i think DrawArc() is what you will want.
Then handle or override the OnPaint event for the control you want to draw on. That will expose a Graphics instane within the event args that you can draw to. Remember that OnPaint is called when the control needs repainting so you may want to use the Invalidate() method of the control to force a redraw as and when you need to
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Hello
I want to export my grid to a excel file what I can do. But what I need to do is each time I export my grid it will create a new sheet in the same excel file.
Now How can I do that..??
Any help would be appreciated ....
Thanking in Advance
Johnny
|
|
|
|
|
There is a section on this page specifically for exporting to .xls files with other configurable settings...
http://msdn.microsoft.com/en-us/library/ms227794.aspx
|
|
|
|
|
|
Hello experts.
Want to create an installer from binaries.
But want to disallow any re-installation of the software.
How to achieve this?
Thanks in advance.
Regards,
// By Bhavik Shah
|
|
|
|
|
That's not supported by most installers, so you're probably going to have to build this yourself. That may be hard or easy, depending on the software that you're using to create the installation routine.
First you'd have to check for any sign whether your software has been installed previously. You can leave a marker in the registry, but there is no guarantee that the user doesn't wipe your marker and reinstalls anyway.
On install, you'd have to check whether the marker is present on the system. If it is, abort the installation and give a nice message detailing what happened, and why you're refusing the reinstall.
Out of curiousity, why don't you want them to reinstall your product?
I are troll
|
|
|
|
|
hi all, am developing a shared addin(to excel) using visual studio in c#.net, an addin. However, my addin acts like an automation addin too and the udfs i defined in MyAddin.Connect.cs are working fine in my m/c.But, the problem is, when I installed my project by running the MyAddinSetup.exe in another machine, though all the registry entries(HKCR, HKLM) are being made, the addin is not listed in the 'Tools-->Addins-->Automation'list! and am not able to use my udfs defined in MyAddin.Connect.cs.
Kindly help me in this regard. I should be able to use my udfs in the test machine. Is there a problem with the installation or am I missing any registry entries?!
Regards.
|
|
|
|
|
Make right entries exist in registry key below
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Addins\"
Check examples of other add-ins installed on the PC.
Regards,
// By Bhavik Shah
|
|
|
|
|
hey,
the entries are made perfectly fine.. my project is an excel addin(thus, entries are made in hklm\software\microsoft\office\excel\addins\) not a visual studio addin. Basically, my Connect.cs also defines some UDFs and also adds a command bar to the excel. The commandbar is being displayed properly in the test machine but the automation part i.e., the UDFs are not being recognized. What could be the reason for the automation part of my addin not to work when the com part is working fine?!
Regards
|
|
|
|