|
As mentioned below Thread.Sleep(Timeout.Infinite) is what you want.
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
while (1 == 1)
{
}
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thread.Sleep(Infinite);
---
b { font-weight: normal; }
|
|
|
|
|
Of course! I had completely forgotten about that.
Thanks
|
|
|
|
|
When a user Clicks on an area of the listview that is not an item, the listview loses the selecteditem. How would I prevent this. Thanks in advance for assistance.
|
|
|
|
|
You'd have to derive a class from the listview, I would guess.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
You can reselect it in the SelectedIndexChanged event, or the Click /MouseClick /MouseDoubleClick events.
Regards
|
|
|
|
|
Hi,
can any one have a source code for applying curves (curvature ) on image to smooth it?
i work in the implementation of (Interactive Algorithm For Image Smoothing and Segmentation) and i need to smooth the image by curvature as a pre-processing stage befor the segmentation.
thanks,
|
|
|
|
|
fcis2007 wrote: can any one have a source code for applying curves (curvature ) on image to smooth it?
How do you mean ? My image processing articles have a convolution filter for smoothing ( a pretty standard one, I doubt it's what you want ). How do you 'apply curves' to an image ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Are you talking about curves, like photoshop?
|
|
|
|
|
this application will explain what i mean...
on the following link:
www.smalleranimals.com/isource.htm#download
you will find the folder:
ISource40.zip
when openning and running the application ... you will found the function number [5] "Curves" ,So see the effect on the image after check "Apply Curves" checkbox and choose 32 step from the combo box
my aim is obtain the code of this function to control the number of steps and hence control the degree of smoothing of my image.
about the question of Why using this methode exactlly...
I use it because it is a pre_processing stage for smoothing the image in order to implementation of ISS algorithm "Interactive Algorithm For Image Smoothing And Segmentation"
thanks,
|
|
|
|
|
Hi
I want to close sqlserver opened database from my project.
SqlConnection just close the connection, not the database.
more info :
<br />
sqlConnection1.Open(server=computer;database=xdb);<br />
.<br />
.<br />
.<br />
sqlconnection1.Close();<br />
.<br />
.<br />
.<br />
RestoreDatabase(xdb);
Tanx.
|
|
|
|
|
If you are using a datareader you may have to close this as well
i.e
datareader.Close();
HTH
Darren
|
|
|
|
|
You will probably find that the connection is still present because it is pooled.
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
|
???
|
|
|
|
|
|
Please don't cross post. Choose the forum that represents the language you're using, and just ask the once.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
You can convert a bitmap to an pixel[x,y] class.
I write something for you:
[code]
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace CodeProject.Example.Drawing {
public partial class fcmMain : Form {
public fcmMain( ) {
InitializeComponent();
}
private void btAction_Click( object sender, EventArgs e ) {
PixelField bitmap = new PixelField((Bitmap)Bitmap.FromFile(@"C:\Documents and Settings\Marijn\Bureaublad\crap.JPG"));
Color c = bitmap[3, 4]; // get pixel.
bitmap[4, 5] = Color.Red; // assign a red color.
for(int x = 0; x < bitmap.Width; x++)
bitmap[x, 5] = Color.White; // white line.
}
}
public class PixelField {
int width; // used, because using bitmap.Width is slower then you think.
int height;
Bitmap bitmap;
public int Width {
get { return width; }
}
public int Height {
get { return height; }
}
public PixelField( Bitmap bitmap ) {
this.width = bitmap.Width;
this.height = bitmap.Height;
this.bitmap = bitmap;
}
public Bitmap Bitmap {
get { return bitmap; }
set { bitmap = value; }
}
///
/// Get or Set a pixel on the bitmap.
///
/// InvalidOperationException can occur.
///
/// <param name="x" />
/// <param name="y" />
/// <returns>
public Color this[int x, int y] {
get { return bitmap.GetPixel(x, y); }
set { bitmap.SetPixel(x, y, value); }
}
}
}
[/code]
Don't forget, easy class, no unsafe code, so in this case: pritty slow for most actions.
|
|
|
|
|
hi
i use vc# 2005.
i want in form2_load event,the form_login should be hide,but it's not hide,where is the problem ??
when user press btn_enter in form_login,the form_login hide(it is worked),but in form2_load event it's not hide. How to solve problem??
thanks
|
|
|
|
|
hdv212 wrote: hi
i use vc# 2005.
i want in form2_load event,the form_login should be hide,but it's not hide,where is the problem ??
when user press btn_enter in form_login,the form_login hide(it is worked),but in form2_load event it's not hide. How to solve problem??
thanks
Your question is a little vague. How are you passing the reference to the first form into the second form? Is it via the Form2 constructor or another method.
|
|
|
|
|
|
Hi Everyone!
I am unable to view xml document into Browser control. Please help me in this. Here is what I am doing:
<br />
<br />
XmlDocument xDoc = new XmlDocument();<br />
<br />
xDoc.Load("Check.xml");<br />
<br />
<br />
I want to display this xDoc into "Microsoft Web Browser" component that is dropped on Form.
<br />
<br />
private AxSHDocVw.AxWebBrowser axWebBrowser1;<br />
<br />
object obj = null;<br />
<br />
axWebBrowser1.Navigate(??????, ref obj, ref obj, ref obj, ref obj);<br />
<br />
In first parameter if I use URL it works fine for it but tell me how can I display xDoc into that browser component.
Is there any other simple way to perform this task? please plzzz mention code.
please guide thank you.
|
|
|
|
|
private void InitializeComponent()
{
this.webBrowser1 = new System.Windows.Forms.WebBrowser();
this.SuspendLayout();
//
// webBrowser1
//
this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill;
this.webBrowser1.Location = new System.Drawing.Point(0, 0);
this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser1.Name = "webBrowser1";
this.webBrowser1.Size = new System.Drawing.Size(718, 548);
this.webBrowser1.TabIndex = 0;
this.webBrowser1.Url = new System.Uri("C:\\ZJA\\VS2005\\Test.xml", System.UriKind.Absolute);
}
Try this:
I read your post and this is what I did to check myself.
1: Create test.xml file
2: dropped a webbrowser on a from and set the url to my test.xml file
3: run and the webbrowser loaded the file without errors
Jason
Sometimes simply is better than fancy. The developer stated after typing code line 10 billion!!!
|
|
|
|
|
Thanks Jason.
I have XmlDocument class object that has Xml file loaded. I want to display that object contents into browser. I hope I am making clear.
|
|
|
|