|
Windows Explorer does have a search facility. It isn't Google, but it knows how to locate a file
by name...
|
|
|
|
|
Tools -> External Tools -> Add
Enter the details for ILDasm. If you include the target path variable in the arguments it'll automatically open with the disassembly of the current project.
Now it will appear on your tools menu.
Simon
|
|
|
|
|
Thanks, did not know that!
Scott P
"Run for your life from any man who tells you that money is evil. That sentence is the leper's bell of an approaching looter." --Ayn Rand
|
|
|
|
|
Simon Stevens wrote: it'll automatically open with the disassembly of the current project.
It dosent do so(open the current project assembly).. although it has been added to my tools list..
|
|
|
|
|
You have to add the target directory to the arguments text box.
Just click on the little arrow next to the box, and click on Target Dir.
Simon
|
|
|
|
|
You can find ILDASM here[^], only it's been improved a little... it's called Reflector
|
|
|
|
|
I have build a custom control,
it allows the user to drag a small circle
over the background of the control.
if the user drags the control i only
invalidate the rectangle containing the "previous circle"
invalidate the rectangle containing the "new circle"
(in that order)
so the program only has to redraw that area of the background
(way faster)
everything works ... until i drag the circle at higher speeds
for example : if i drag it fast to the right, the right edge of the circle is "cut off"
so i think it is not the previous area that gets refreshed after the current
(i would see artifacts on thel left then)
i tried Update(); just after invalidating both areas and i tried it after a single area got invalidated.
(double buffering is enabled)
has anyone a solution for it?
|
|
|
|
|
It shouldn't matter in what order the regions would be updated. The Paint event should draw that part of the control as it currently looks.
What does your code for the Paint event look like?
Despite everything, the person most likely to be fooling you next is yourself.
modified on Wednesday, April 30, 2008 4:50 PM
|
|
|
|
|
this is the code OnPaint eventhandler:
all the painting is in this eventhandler
protected override void OnPaint(PaintEventArgs pe)
{
base.OnPaint(pe);
Graphics g = pe.Graphics;
if (bmp_background == null)
{
RenderBackGround();
}
Rectangle R = pe.ClipRectangle;
g.DrawImage(bmp_background, R.X, R.Y, R, GraphicsUnit.Pixel);
DrawPoint(g,DrawingArea);
}
|
|
|
|
|
When you draw a shape (rectangle, ellipse), the size is measured from the center of the curve. The outer size of the shape will be the specified size plus the width of the pen.
So, if you have a Rectangle with the size 20x20 pixels, and draw an ellipse using a Pen with the width 1 pixel, the outer size of the ellipse will be 21x21 pixels.
To draw the ellipse inside the size specified by the Rectangle, you have to subtract the Pen width from the width and height of the Rectangle.
Despite everything, the person most likely to be fooling you next is yourself.
modified on Wednesday, April 30, 2008 4:50 PM
|
|
|
|
|
It's a filled circle. no pen. i am using a brush
the area is already a bit bigger than the ellipse
i am using antialiasing for the ellipse, so i chose the invalidate rectangle to be a bit larger,
so i certainly wouldn't cut off the part where the ellipse is "smoothend out"
but thanks anyway
|
|
|
|
|
Hi,
there seems to be a flaw in the logic; if you drag a character "O" over the text "ABC"
starting at A and ending on C, how will your approach ever repaint the B, unless you are
moving that slow that it gets broken up in several small drags/invalidates?
You either have to limit the motion as to keep start and end positions adjacent, or you
have to enlarge the invalidation region to be the hull of start and end (and then allow for
some deviation from a straight line).
|
|
|
|
|
Luc Pattyn wrote: if you drag a character "O" over the text "ABC"
starting at A and ending on C, how will your approach ever repaint the B
It doesn't have to. Check this:
Start at A:
OBC
Move from A to C, first repaint A:
ABC
Then repaint C:
ABO
The B never changes, so it doesn't have to be repainted.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
You're right, at least in theory; not sure how precisely GDI+ does what it promises to do though.
I have had some experience with several graphic systems (long before .NET) both on Mac and Windows
where graphic messages got not just executed one by one, instead they got "optimized", i.e. they
either got combined into bigger messages, or skipped alltogether since a later one would
hide the efforts of a previous one still in the queue.
Not sure this applies here, but my message is be on the defensive, hence slow down the drag,
or extend the invalidation region.
|
|
|
|
|
I Invalidate 2 Rectangles:
one where the circle was, and the current position.
My own theory is that when it moves fast, this computer isnt fast enough to do both repaintings.
in one "refresh cycle".
It only repaints the prevous region that overlaps the current.
so when i move to the right the right part is cut off because the previous rectangle
overlaps the previous one on the left.
(and the new rectangle can't be repainted because my computer is to slow)
so the O moving over the ABC thing isnt the problem here I think,
making the regions bigger would make things even worse i think..
(i could be wrong. haven't tried it yet, i will when I have the time)
the idea of combingin both Invalidate messages is rather interesting,
maybe i should implement it myself (or if someone has an idea here )
and combine both rectangles in a bigger one ,invalidate the big one afterwards.
It would be a bit slower probably, but at least i will be sure everthing is repainted in one
"refresh cycle" (or whatever you call it)
is there an easy/fast way to implement this? (i mean combining 2 rectangles )
|
|
|
|
|
Hi,
have a look at the Region class.
A region basically is a collection of 2D parts of a Graphics.
You can create it from simple shapes or paths, and perform logic on it, e.g. with
the Union() method.
And you can feed it to Graphics.Invalidate() and the like.
I am not convinced we are on the right track though. Couldn't the problem just be
the result of a bug in your code? e.g. you modifying one of the drawing parameters
at the wrong time? It could be helpful if you could show a screen shot where it goes
wrong, and the relevant code.
|
|
|
|
|
Are you painting everything in your OnPaint method? or do you also paint some in a mouse
handler? a drag handler?
|
|
|
|
|
yup, all painting in the Onpaint method didnt use the onpaintbackground method.
the mouse events handlers only set some private variables (like the position of the circle),
invalidates both the previous rectangle and the new rectangle
the invalidated areas will be both repainted
(they should be i think thats the problem)
the position of the circle (stored as a private variable) is then used to repaint the circle at the right position
in the OnPaint method (and the part of the background that needs to be repainted)
|
|
|
|
|
I realise something now:
I allways repaint the full ellipse,
I never say "draw ellipse partially"
(I have no idea how it would be done either)
so even when only the previous area is invalidated,
the ellipse/circle would be totally redrawn.
(so the invalidation of the new area doesnt have a purpose I think)
so.. I dont have to combine both rectangles here...
hmmm.
i should try to remove the invalidate(currentarea) statement and see if that
would give an improvement
(but not today, I have to finish a report )
|
|
|
|
|
ok i removed the invalidate(currentarea) statement
(wich was not needed)
but the problem still was there
increasing the size of the area fixed the problem.
but i still believe it hasn't anything to do with the "abc problem"
because i think guffa is right about this:
Start at A:
OBC
Move from A to C, first repaint A:
ABC
Then repaint C:
ABO
The B never changes, so it doesn't have to be repainted.
if i move fast with the mouse, and i go from a to c it never reaches b,
never paints anything on location b...
so it never has to refresh the b area.
PROBLEM FOUND:
I changed the code on the mousedown method to (previously only onmousemove),
and it seems when i only invalidate the
previous area, the ellipse only gets draw partially. (very easy to notice when i click next to the clippingrectangle)
the ellipse clips to the clippingrectangle during the onpainthandler...
so previously, the redrawing was indeed unable to redraw previous and current rectangle in one "refresh cycle"
so there are 2 ways to solve this (i think):
either i have to let the FillEllipse method know it doesnt have to clip to the rectangle
(i have no idea how i could achieve this, unless i change the clippingrectangle after
drawing the background, but i don't give it a big chance)
or ill have to combine rectangles with the region stuff...
|
|
|
|
|
I have created installation setup with InstallShield. Installation works really well. When the program is uninstalling I need set some flag values on database which is located on a remote server. I am using a webservice for that. Installshield allows to execute a method in supplied assembly when uninstalling the program. So I created a class library and written the flag resetting code in a method say "ResetDBFlag() ". I have added necessary entries to installshield wizard. This class library is tested and it communicates perfectly with webservice.
When trying to uninstall, it's showing error Can not find entry point to function - Make sure you have exported the dll . I have googled, and all links says it's an issue with using DLLImport attribute. But I have no DllImport attributes specified. Anyone faced similar kind of issues ? Or do you know any alternative approach to satisfy my requirement ?
|
|
|
|
|
N a v a n e e t h wrote: DLLImport attribute
Can you export the function by using the .def file?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
Wes Aday wrote: .def file?
Cool. Thanks for the reply. I searched for .def files, but all the links are about C++ and talks about exporting C++ dll's. What would be for C# ? My dll is in C#.
|
|
|
|
|
Have you tried dumping the exports with the linker?
|
|
|
|
|
Spacix One wrote: dumping the exports with the linker?
Thanks for replying, but I am not getting your point. Can you explain it ?
|
|
|
|