|
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.
|
|
|
|
|
If you are just wanting to view the xml file in a webBrowser then why are you loading it into a xmlDoc class in the first place? I guess you are doing something more than just viewing it right?
Jason
Sometimes simply is better than fancy. The developer stated after typing code line 10 billion!!!
|
|
|
|
|
Have you tried setting the webBrowser's Url property?
|
|
|
|
|
yes I am doing little bit extra. I have loaded xml file into DOM "XmlDocument" class and modified its in memory. As DOM class loads xml file into memory in tree form. Now i want to display that modified file into browser control in form.
is that possible???????????????
Thanks
|
|
|
|
|
Open it, change it, save it, then open it in web browser. You might want to output it to a stream instead of saving it.
|
|
|
|
|
Have you seen XML Notepad 2007.
It creates XML file in treeView and when we click "XSL Output" tabpage it displays browser output of XML.
|
|
|
|
|
Yes. Why not just download their sourcecode from codeplex and see how they did it?
|
|
|
|
|
Hi
I have a MdiForm with some child forms.
In MdiForm i have a StatusStrip control with toolStrips as items.
From ChildForms i cant change visible property of StatusStrip items.
I created a function in MdiForm to call it from ChildForms and wrote code in it to change visible property, but it faild too.
In MdiForm i have no problem, problem occurs when i try to change from childForms.
What should i do?
Regards
|
|
|
|
|
Posting the text of the error messages abd some code snippets wouldbe very helpful.
Regards
|
|
|
|
|
Ok
Can you describe it more for me please?
Tanx.
|
|
|
|
|
Describe what??!! I'm telling you to post the errors are you getting, and the code you are using that is giving you these errors!!
Regards
|
|
|
|