Answer Questions
wicked_mk How can I speed up this image processing routine?
This is a small filter to modify an image that is being loaded by some picture boxes. The filter works great except it takes about 20 seconds to run. How can I speed this up public void ThresholdFilter( int intMidValue) { filteredImage = ( Bitmap )originalImage.Clone(); Color pixel; int t; for ( int y = 0; y < filteredImage.Height; y++) { for ( int x = 0; x < filteredImage.Width; x++) { pixel = filte ...Show All
RenaudBXL Number Question
I have kind of a programming question mixed with a math question. But it would be GREATLY appreciated if someone could help me. Ok. Here it goes. Lets say I can have 3 numbers. Each number can be 1 - 10. In a button click event I would like to display in maybe a listview all the different combinations. Can someone help me please BlackMan890 posted all the code that is your requirement, but if you are looking for implementation for mor ...Show All
ks2006 Need help with a example how to use a find or exists predicate in a generic list
Hi, I am getting familiar with predicates and how to use them In what I am doing at the moment I have some many collections where I need to use find,exists predicate.Obviously I need to check at run time whether an item is in the collection or find an item that user specifies in a textbox etc... How was wondering how I can implement this in a generic list. I have found an example on msdn but the string to find it's always hardcoded. can yo ...Show All
hemaral Panel autoscrollposition hell!
Hey howzit I have a Panel that displays 3 different photos as BackGroundImage's. One is 300dpi, 150dpi and 72dpi. Each photo causes the Panel to autosize. I am using this as a zoom mechanism. So when the user clicks zoom, the image changes from 72dpi to 150dpi and 150dpi to 300dpi and that works fine, BUT i want the the scrollpositions of the form to change so that the area where the cursor is located on the imag ...Show All
jeffehrl Compiler bug with using statement
I'm using Visual Studio 2003 and have noticed a bug in the C# compiler. In Debug everything works correctly however in Release the else clause is being optimised away and so the exception is always getting thrown. It appears to be the empty using block that's causing the problem. using System; using System.IO; namespace UsingBug { class Class1 { private static bool the ...Show All
Lightning Lord timer problem
hi, i have a windows service which is checking to the desire URL and check back its httpwebresponse data. and, i save the result in a log file insdie local drive. i use a timer to trigger my service's function that check to my desire URL response. the problem is with that timer. since my timer's data type is double, my friend suggest that if it reach to its maximum value my service will get error or it will stop. he had faced ...Show All
Mongkut Implement "file download" in C#
Hi... I am writing an application where I have a button. When the user clicks the button, data is read from a database and a text report is generated. Additionally, I want to have a file download dialog box appear to allow the user to save the report to his hard disk. I tried using the following: strFileName = Request.QueryString("file"); Response.ContentType = "application/octet-stream"; &nb ...Show All
RichSide AspNetSqlProvider
I have an error when i am try to make web partzone without using sqlexpress I want to use sqlserver2005 entreprise when i am try to create AspNetSqlProvider test failed and i have this error (An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Networ ...Show All
Fahad Habib Deleting a file
Hi, What is the easiest way to delete a text file Thanks, Bruce File.Delete("C:\\MyText.txt"); ...Show All
Chris Antoniak Casting an enumeration that has a defined type..
public enum foo : ushort { foo, bar } ushort test = foo.bar; Cannot convert from 'Test.foo' to 'ushort' Sure, I can make variable of type foo, but I'm encoding the value to a network stream, so I want it as a ushort. The thing is, I specifically told the compiler the enum is of type ushort, so why do I have to typecast it Brian Kramer wrote: Well, it doesn't sound like you need a lecture ...Show All
Keren Program doesn't Terminate
I've made a program that has a thread that continuously receives the bytes from a server via socket. The code is like this: data = new byte[1024]; receiverThread = new Thread(new ThreadStart(Rec)); receiverThread.Start(); public void Rec() { while(true) { try { recv = client.ReceiveFrom(data, ref remoteEP);   ...Show All
Harris Sayed If statement problems
Hi, I'm very new to the C# community I have been working on a program that uses username recongnicition and I have a question. Here is my code if (textBox1.Value == "mittensonfire") { MessageBox.Show("You are very leet"); &nb ...Show All
Cedrickb How to deploy a dotnet win application WITHOUT DotNetFramework 2.0
BIG APPLICATION CANT DOWNLOAD RAPIDLY!!!! Hello.I created a setup and deployment project for my windows application and deployed in another machine which doesn't have the framework 2.0 and it is asking for download of framwork. I tried to include the prerequisites along with my application but it is costing ...Show All
Nikhil Technology Error sending filled form via email
This is the code I use to send my form via email: protected void sendMail(string strFrom, string strBody) { //create the mail message MailMessage mail = new MailMessage(); //set the addresses mail.From = new MailAddress(strFrom); mail.To.Add("myEmail@myDomain.com"); //set the content mail.Subject = txtSubject.Text; mail.Body = strBody; mail.IsBodyHtml = fal ...Show All
Kamlakar How can I access the BackColor property of a control stored in another form?
Hello, I am wondering how can I access the BackColor property of a control stored in another form. Please help. make the form and the control of it public.. then acces it simple just some example: public class From2 { ..... public TextBox TBox; .... } // somewhere in another form Form2 b=new Form2(); b.TBox.BackColor=.... if you are using Visua Studio.. and use the Designer.. check the Form2.Desig ...Show All
