|
Mine are about the same ranging from 7 to 11 MB. Debug versions seem to require about a little than this. You can see why seasoned hardcare programmers are reluctant to switch over to the .net languages. I've always believed that if the workload can go on the programmer to spare the end user of bloated software, slow response etc.. then it should. On the other side of the coin if you don't get with the program you will be left behind (eventually).
Art
|
|
|
|
|
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
peace
|
|
|
|
|
Anonymous wrote:
I heat America
I thought oil heated America?
Paul Watson Bluegrass Cape Town, South Africa
Macbeth muttered:
I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er
DavidW wrote:
You are totally mad. Nice.
|
|
|
|
|
lol
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
aaawww... arent u the nice lil hippy.
don't worry, America heats u too!
and proofread your anti-american comments from now on please. now you dont just look ignorant, but stupid as well. a deadly combination, even for un-informed peace junkies.
-613 "Code Poet"
"Real programmers don't work from 9 to 5. If any real programmers are around at 9am it's because they were up all night."
|
|
|
|
|
I have got an unhandled exception ,Who can tell me what's meaning of
it ,thanks
Here is something about the exception :
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at PersonalLib.Form1.Main() in f:\c#\windowsapi\api\windowsapplication7\form1.cs:line 120Application“[964] WindowsApplication7.exe”has exited with code 0 (0x0).
|
|
|
|
|
Hi, another quick question. I've only just started playing around with threads and the documentation with VS doesn't tell me much. So here's the problem (actually it's more a minor niggle):
I have a program which has to make thumbnails from a bunch of images, the thumbnails work fine, but they take a while when there are a lot of images, so I decided the solution was to run the thumbnail making in the background using a thread. My problem is that it is possible to switch to another directory and another bunch of images before the first thread is finished. The program doesn't actually seem to mind, but it does slow down while it is presumably executing several threads at once. So I thought the right thing to do is check if a thumbnail producing thread is running and stop it before starting a new one (since the user has lost interest in the current set of thumbnails by selecting a different directory, it doesn't matter if it doesn't ever get finished). So I tried this:
<br />
if (thd_thumbs.IsAlive)<br />
{<br />
thd_thumbs.Abort();<br />
}<br />
thd_thumbs = new Thread(new ThreadStart(this.run_thumbs));<br />
thd_thumbs.Start();<br />
But that doesn't work and the program crashes with a 'System.OutOfMemoryException' and 'Error creating window handle'. Without the if clause it works, but slows down as before. So what's the right way to do this?
|
|
|
|
|
Wjousts wrote:
if (thd_thumbs.IsAlive)
{
thd_thumbs.Abort();
}
thd_thumbs = new Thread(new ThreadStart(this.run_thumbs));
thd_thumbs.Start();
thd_thumbs.Abort() simply forces a ThreadAbortException into your thread, you then have to wait until that Exception is completely handled before you can dispose of the thread safely.
I would suggest you put a try, catch (ThreadAbortException) structure in run_thumbs and when you catch the exception, simply start the thread over again (thd_thumbs.Start()).
Paul
We all will feed the worms and trees So don't be shy - Queens of the Stone Age, Mosquito Song
|
|
|
|
|
In a windows form, I'm developing a file backup app with a Treeview/Listview pair that behaves like Windows Explorer, listing drives and folders in the treeview, and folders and files in the listview... each entry has a checkbox so I can keep track of what's been selected...
The listview only has an ItemCheck event, whereas the treeview contains BeforeCheck and AfterCheck events, and also the ability to determine whether the event was fired by a mouse or not. This really limits me because I need to differentiate between mouse-induced checks and code-induced checks, just like in the treeview.
Is there some way to obtain this functionality in the listview?
thanks.
|
|
|
|
|
Check Control.MouseButtons
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
I'm trying to make an image list of thumbnails and I can take an image an convert it into a thumbnail using Image.GetThumbnailImage. Before getting the thumbnail I calculate what the dimensions should be so as to not distort the image (i.e. make the largest dimension equal to the corresponding dimension of the thumbnail and then scale the other dimension by the same amount), this works fine. The problem is that when I put an image like this into an ImageList control the ImageList takes it upon itself to stretch the image to completely fill it's image size and therefore screws up my careful scaling. There doesn't seem to be any way to turn off this behaviour so my only option seems to be to pad my thumbnails with white space so that they are the right size, but I don't know how to do this. Can anybody help?
Thanks
|
|
|
|
|
You will first need to take a look at the Bitmap class and also the Graphics class.
First you need to create a new bitmap and make it white:
Bitmap bmp = new Bitmap(w,h);<br />
<br />
using(Graphics g = Graphics.FromImage(bmp))<br />
{<br />
<br />
g.FillRectangle(Brushes.White,0,0,bmp.Width,bmp.Height);<br />
<br />
int x = (w - bmp.Width) / 2;<br />
int y = (h - bmp.Height) / 2;<br />
<br />
g.DrawImage(original_bmp,x,y);<br />
}<br />
<br />
<br />
I have not tested this, but it should give you an idea.
Hope this helps,
Nathan
---------------------------
Hmmm... what's a signature?
|
|
|
|
|
Thanks, that seems to work. The only odd thing was that I had to use DrawImage(img,x,y,width,height) otherwise it did strange things to the image, sometimes it appeared tiny, other time blown up. Very strange.
|
|
|
|
|
Wjousts wrote:
Thanks, that seems to work.
Glad, I could be of help.
-Nathan
---------------------------
Hmmm... what's a signature?
|
|
|
|
|
|
Hi!
I'm searching a method to create my own form design environment.
Anybody know how to in C#??
Tnh a lot!
|
|
|
|
|
Sharp Develop is a free IDE written in C#. Check out its source code. http://www.icsharpcode.net/OpenSource/SD/Default.aspx[^]
"De most compwehensive image seawch on de web." - Google in Elmer Fudd Language "But a fresh install - it's like having clean sheets" - Chris Maunder Lounge 3 Mar '03
Jonathan 'nonny' Newman Web Designer, Programmer, Lover, Visionary Leader...
Homepage [www.nonny.com] [^]
|
|
|
|
|
Hi all,
I have to write a selection control like you have in Paint for my program (you know, to select parts of the image you're working on in Paint). I've searched all over the web to find such a control, but it looks like it doesn't exist yet, so I have to write it myself. I already have some ideas how to get it working, but I know almost for sure that they will be way too slow. Does anybody have an idea how to make such a control?
Thanks in advance,
Joost Huizinga
|
|
|
|
|
Please take a look at the ControlPaint.DrawReversibleFrame method. That will help you
Smitha
The future belongs to those who believe in the beauty of their dreams.
--Eleanor Roosevelt
|
|
|
|
|
Hi,
This is one useful snippet I used.
private void DrawReversibleRect( Point p1, Point p2 )
{
Rectangle rc = new Rectangle();
if( p1.X < p2.X )
{
rc.X = p1.X;
rc.Width = p2.X - p1.X;
}
else
{
rc.X = p2.X;
rc.Width = p1.X - p2.X;
}
if( p1.Y < p2.Y )
{
rc.Y = p1.Y;
rc.Height = p2.Y - p1.Y;
}
else
{
rc.Y = p2.Y;
rc.Height = p1.Y - p2.Y;
}
Rectangle r = pictureBox1.RectangleToScreen(rc);
ControlPaint.DrawReversibleFrame(r,this.BackColor,FrameStyle.Dashed);
}
You can draw the reversiblerectangle in the MouseMove event.
HTH
Smitha
The future belongs to those who believe in the beauty of their dreams.
--Eleanor Roosevelt
|
|
|
|
|
Hi Smitha,
Thanks for your reply. I already found something like that, by setting some Pen properties and drawing a rectangle with the Graphics.DrawRectangle method I got the same. But thanks nevertheless, this way is much easier.
But drawing the selectioncontrol isn't my main problem. My main problem is the resizing of the control and setting the cursors depending on where they are. For example, when the cursor is within the control, the cursor has to be set to the SizeAll cursor. But if the cursor is in the middle dotted line of the rectangle (on the little square), the cursor has to be set to SizeNS if the cursor is on the upper or the bottom line, and to SizeWE if the cursor is on the right or the left line. And the corners also have their own cursors. Setting the cursor every time when the MouseMove event is fired depending on where the mouse is requires a lot of if's and it will be way too slow. So do you have an idea how to get that working without making the program very slow?
By the way, I'm not a very experienced programmer. So it could be I ask dumb questions .
Thanks in advance,
Joost
|
|
|
|
|
My MyDUMeter article mite be of some help. I use painting for range selection on the report graph. I think you are having the same performance problems I had.
http://www.codeproject.com/useritems/MyDUMeter.asp[^]
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
Hi leppie,
Thanks for your reply, I think I know enough about the drawing stuff. The only thing left is assigning the right cursors, but I'll try some things myself first. Still, any comments on assigning the cursors are welcome!
Thanks in advance,
Joost
|
|
|
|
|
Hi Joost,
I have not tried it that way. But do post about it, if you succeed assigning cursors to the selection. Good luck!
Smitha
The future belongs to those who believe in the beauty of their dreams.
--Eleanor Roosevelt
|
|
|
|
|
Hello,
does anyone know how to align the Pen-Object correctly when drawing lines with the DrawLine() - Methode of the Graphics-Namespace?
The problem is, that when i draw a line with a width of e.g. 7 pixels from Point (0,10) to Point (100,10) the topmost/leftmost painted pixel is at (0,7) instead of (0,10). That is because the Pen-Object is positioned at the center of the line that should be drawn. But this behavior is bad when drawing borders of e.g. controls.
The PenAlignment-Property of the Pen-Object doesn't seem to work here, though it works with the DrawRectangle()-Methode. If i paint a rectangle with the startcorner at (0,10) and i set the PenAlignment to "Inset", the topmost/leftmost paintet pixel is at the "correct" location of (0,10).
Does anyone here know how to solve this problem?
Greetings
Armin
|
|
|
|