Posts
 
Reputation
Joined
Last Seen
Ranked #4K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
64% Quality Score
Upvotes Received
5
Posts with Upvotes
5
Upvoting Members
4
Downvotes Received
3
Posts with Downvotes
2
Downvoting Members
3
1 Commented Post
2 Endorsements
Ranked #621
Ranked #1K
~31.5K People Reached
Favorite Tags

47 Posted Topics

Member Avatar for beginnerinneed

// make sure colomn headers are set to number of strings in listview // the first string will be the item while the second third and fourth are the sub items. // use the for statement will add new listview item with 3 more subitems [CODE]ListViewItem lvi = new ListViewItem(new …

Member Avatar for hreylorbe
0
8K
Member Avatar for Momerath

if (the value being passed == to code within the application) { this.methodGreat; } else { this.methodSucketh; } private double d; public double d2 {get{return d;}} What if the value being entered in a textbox has to be an double value? try { d = double.Parse(textBox1.text); this.DialgogResult = DialogResult.Ok; } …

Member Avatar for Mickey_1
0
563
Member Avatar for abelLazm

I have used this code in the past i have the complete source which i found on either codeproject or vckicks. I have used this method to create my own image format. here is how to load and save as image using this method. here is how to load the …

Member Avatar for skatamatic
0
872
Member Avatar for FELIGO

[CODE] string[][] lines = new string[4][]; lines[0] = new string[] { "1", "a", "d" }; lines[1] = new string[] { "2", "b", "c" }; lines[2] = new string[] { "3", "c", "b" }; lines[3] = new string[] { "4", "d", "a" }; MakeDescending(lines[0]); foreach (string s in lines[0]) { MessageBox.Show(s); …

Member Avatar for thines01
0
2K
Member Avatar for pseudorandom21

[QUOTE=skatamatic;1597203]I wrote a trojan not that long ago that wasn't detected by my antivirus. It did incredibly suspicous stuff too, like sending a list of running procs over TCP or UDP to a listener, running procs, accepting commands to run in the command-line, remote shutdown/restart, send clipboard data back and …

Member Avatar for skatamatic
0
363
Member Avatar for ToniSoft

[CODE]static void main() { LoginForm login= new LoginForm(); if(login.ShowDialog() == DialogResult.OK) { Application.Run(new Form1(login.User, login.Pass)); } } public partial class Form1:Form { string _User,_Pass; public Form1(string user, string pass) { _User = user; _Pass = pass; } }[/CODE]

Member Avatar for ToniSoft
0
116
Member Avatar for apanimesh061

DoubleClick On Properties in SolutionExplorer and change Target Framework. If there are any features that are not supported in 3.5 that's supported in 4.0 the the IDE will let you know

Member Avatar for CsharpChico
0
184
Member Avatar for goldenpete

To Store To ClipBoard read jmurph333's solution to retrieve clipboard text us Clipboard.GetText();

Member Avatar for goldenpete
0
115
Member Avatar for kapojian

A quick suggestion? It's not a good idea to make controls public as it makes these controls accessible outside of the program if you insist on having a Control be accessible out side of that Form i would suggest using Internal over public as internal makes the controls accessible outside …

Member Avatar for CsharpChico
0
157
Member Avatar for KushMishra

[COLOR="Red"][B]LOL[U] Not going to happen[/U][/B][/COLOR] Programming takes time and practice. It's not something that you can read a book and be an expert on. Even the greatest of programmers still learn something new from time to time. I would suggest getting a good book and reading it. checking out tutorials …

Member Avatar for CsharpChico
1
163
Member Avatar for scrivomcdivo

[QUOTE=CDeansy;1589757]I'm old school. For the planning i prefer just to use pen and paper.[/QUOTE] At least the paper can't be deleted :)

Member Avatar for CsharpChico
0
114
Member Avatar for CsharpChico
Member Avatar for jaskiratj

[QUOTE=jaskiratj;1589325]hello everyone.. 1)is there a way to print the data present in the griedview? 2)for the same, do we need to export the gridview data to excel for print purpose in web application? if yes, how to export that data... thank you[/QUOTE] Are you trying to print WebPage or GridView?

Member Avatar for shiva07
0
93
Member Avatar for samueal

[CODE] using System.IO; using System; namespace folder_information { public partial class folder { protected DirectoryInfo _Directory; public folder(string directory) { _Directory = new DirectoryInfo(directory); } //Function to get all the folders present in that particular location,Use public DirectoryInfo[] Directories { get { return _Directory.GetDirectories(); } } //Function to get all …

Member Avatar for CsharpChico
-1
490
Member Avatar for ctsmith84

[code]public void Save_File() { //creating an SaveFileDialog object, to save Excel File. SaveFileDialog dialog = new SaveFileDialog(); dialog.InitialDirectory = "c:/desktop"; dialog.Title = "Select Where To Save File"; dialog.Filter = "Excel Files (*.xls;*.xlsx)|*.xls;*.xlsx|All files (*.*)|*.*"; if (dialog.ShowDialog() == DialogResult.Cancel) return; // now you have to save the the file which you …

Member Avatar for CsharpChico
0
608
Member Avatar for sandeepparekh9

[QUOTE=sandeepparekh9;1568904]public Image byteArrayToImage(byte[] byteArrayIn) { MemoryStream ms = new MemoryStream(byteArrayIn); Image returnImage = Image.FromStream(ms); return returnImage; }[/QUOTE] Great code but when passing back to image you can save one line of code like this [CODE]public Image byteArrayToImage(byte[] byteArrayIn) { MemoryStream ms = new MemoryStream(byteArrayIn); return Image.FromStream(ms); }[/CODE]

Member Avatar for CsharpChico
0
277
Member Avatar for IDC_Sharp

the url should be something like videoplayback? blah blah blah but youtube has changed their api again which i havent figured out the new api just yet

Member Avatar for IDC_Sharp
0
78
Member Avatar for Romil797

This project works ive used it in the past and is very well worth looking into [URL="http://www.codeproject.com/KB/audio-video/MP3Compressor.aspx"]MP3Compressor By Idael Cardoso[/URL]

Member Avatar for CsharpChico
0
385
Member Avatar for khocmedemmua

[QUOTE=khocmedemmua;1581992]At present, my source code project is in disk E, this is its path : [COLOR="Red"]E:\WindowsApplication1[/COLOR] In this folder has a folder Files, with path : [COLOR="Red"]E:\WindowsApplication1\WindowsApplication1\bin\Debug\Files[/COLOR] I have a form with a browse button to choose file, after choose file, it will save into folder Files automatically. My chosen …

Member Avatar for crishlay
0
363
Member Avatar for bleedi

Haven't worked much with Server but when getting an image from a web url or byte[] the memstream will work good I prefer to use Bitmap so that I can set the size of the image. Heres a simple method to get image from a url. [CODE]Bitmap MyImage(string url, Size …

Member Avatar for CsharpChico
0
737
Member Avatar for Razer_90

[CODE]public class TripleDES_EncryptionDecryption { public static string EncryptTripleDES(string Data, string Password) { byte[] clearBytes = System.Text.Encoding.Unicode.GetBytes(Data); PasswordDeriveBytes pdb = new PasswordDeriveBytes(Password, new byte[] { 0x00, 0x01, 0x02, 0x1C, 0x1D, 0x1E, 0x03, 0x04, 0x05, 0x0F, 0x20, 0x21, 0xAD, 0xAF, 0xA4 }); MemoryStream ms = new MemoryStream(); TripleDES tsp = TripleDESCryptoServiceProvider.Create(); tsp.Key …

Member Avatar for hirenpatel53
0
171
Member Avatar for zinnqu

[B]Alternative[/B]: This Alternative will allow you to set the fade effect with the [B][COLOR="red"]System.Windows.Forms.Timer.Interval[/COLOR][/B] value rather than using the Thread.Sleep method for a slightly better performance. On the [B][COLOR="red"]System.Windows.Forms.FormClosingEvent[/COLOR][/B], it cancels the close and redirects the close event thru the [B][COLOR="red"]System.Windows.Forms.Timer.TickEvent[/COLOR][/B]. There is also a built in ImageHandler that uses …

Member Avatar for CsharpChico
1
2K
Member Avatar for lxXTaCoXxl

Nice code, haven't checked but sure will work...but one question? if you want the panel to resize based on the forms size why make x,y int values public? The code is within the same form so there is no need to make the values public by doing so it allows …

Member Avatar for lxXTaCoXxl
0
226
Member Avatar for niths

[QUOTE=niths;1560752]i already enabled multiline to true.. let me explain u clearly.. dnotes = XXXX; ndate = 1234; now in description Textbox my value is XXXX 1234 it is ok if i had only one value in dnotes and ndate if had another row like dnotes = YYYY; ndate = 9876; …

Member Avatar for CsharpChico
0
184
Member Avatar for shyla

Environment.NewLine will do the trick but to much headache. Instead of [CODE]writer.Write("this"+Environment.NewLine+"will" + Environment.NewLine + "make"+Environment.NewLine +"each" + Environment.NewLine + "word" + Environment.NewLine + "appear" + Environment.NewLine + "on" + Environment.NewLine + "a" + Environment.NewLine + "new" + Environment.NewLine+"line");[/CODE] Instead try using \r\n like this [CODE]writer.Write("this\r\nwill\r\nmake\r\neach\r\nword\r\nappear\r\non\r\na\r\nnew\r\nline");[/CODE]

Member Avatar for CsharpChico
0
218
Member Avatar for computerbear

[CODE]private void button1_Click(object sender, EventArgs e) { Form form = new Form(); Label lbl = new Label(); form.Controls.Add(lbl); lbl.Location = textBox1.Location; form.Size = this.Size; lbl.Text = textBox1.Text; form.ShowDialog(); }[/CODE]

Member Avatar for computerbear
0
2K
Member Avatar for Lizbeth
Member Avatar for CsharpChico
0
272
Member Avatar for Suzie999

[CODE]using System; using System.Drawing; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial class Form1 : Form { private Panel panel1 = new Panel(); private PictureBox box = new PictureBox(); private Panel closeButton = new Panel(); private bool moveable; private Point currentPosition; private Image img; public Form1() { InitializeComponent(); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; …

Member Avatar for Suzie999
0
120
Member Avatar for CsharpChico

[CODE]using System; using System.Drawing; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial class Form1 : Form { private Panel panel1 = new Panel(); private PictureBox box = new PictureBox(); private Panel closeButton = new Panel(); private bool moveable; private Point currentPosition; private Image img; public Form1() { InitializeComponent(); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; …

-2
660
Member Avatar for yousafc#

First of all, I would suggest using double instead of float because double can easily accept decimal point and when getting and Average it's not likely that the average will not have a decimal. Here is what I have I think it should work pretty well, I don't really know …

Member Avatar for CsharpChico
0
100
Member Avatar for eoop.org

[CODE]Form2 frm2 = new Form2(); this.Hide(); if (frm2.ShowDialog() == DialogResult.Cancel) return; /* here you can return values from form2 back to form1 if Form2 DialogResult is DialogResult.Ok but make sure that your accept button's Dialog Result is set to DialogResult.Ok or force dialogresult.OK if certain conditions are meet by this.DialogResult …

Member Avatar for Momerath
0
124
Member Avatar for mohana88

[CODE]private string fn { get { string outstr = ""; string[] commands = Environment.GetCommandLineArgs(); if (commands.Length == 2) { outstr = commands[1]; } return outstr; } }[/CODE] to call the method just call like this [CODE]string s = fn;[/CODE] now do whatever you need with string s;

Member Avatar for mohana88
0
585
Member Avatar for MagicBytes

[CODE] private Image ImageFromClipboardText { get { WebRequest req = WebRequest.Create(Clipboard.GetText()); WebResponse resp = req.GetResponse(); return Image.FromStream(resp.GetResponseStream()); } }[/CODE]

Member Avatar for CsharpChico
0
240
Member Avatar for ddanbe

What would be the point? Couldn't you just as easily on label click event do textbox1.text = label1.text? how about something that is not on the form that is being dragged into the control like a web image being dragged into a picturebox?

Member Avatar for CsharpChico
1
1K
Member Avatar for ashley11

[CODE] string str = "1 2 : 3"; string[] s = NewString(str).Split(','); foreach (string strings in s) { if (!String.IsNullOrWhiteSpace(strings)) { MessageBox.Show(strings); } }[/CODE] now the newstring method [CODE]private string NewString(string str) { string s = str.Replace(" ",","); return s.Replace(":", ","); }[/CODE]

Member Avatar for CsharpChico
0
576
Member Avatar for TechSupportGeek
Member Avatar for CsharpChico
0
5K
Member Avatar for Nevillelajru

[CODE]private class EncryptionClass { public string Encrypt256(string Data, string Password) { byte[] clearBytes = System.Text.Encoding.Unicode.GetBytes(Data); PasswordDeriveBytes pdb = new PasswordDeriveBytes(Password, new byte[] { 0x00, 0x01, 0x02, 0x1C, 0x1D, 0x1E, 0x03, 0x04, 0x05, 0x0F, 0x20, 0x21, 0xAD, 0xAF, 0xA4 }); MemoryStream ms = new MemoryStream(); Rijndael alg = Rijndael.Create(); alg.Key = …

Member Avatar for Nevillelajru
0
331
Member Avatar for Jessurider
Member Avatar for gunnerone

Why not just save the information in xml format rather than txt?? Much easier to read as System.Xml.XmlTextWriter(this would be the write method) and System.Xml.XmlDocument(this would be the read method) Would Save You Alot of unnecessary coding.

Member Avatar for neoic91
0
256
Member Avatar for MichaelQ

I have been trying to do the same thing I found source to connect via com port but have not understood how to access the comport. Here is the code that I came across I will post as attachment[ATTACH]20083[/ATTACH]

Member Avatar for CsharpChico
0
98
Member Avatar for Momerath

Awesome Code Here is a slight touch up you might like [CODE]using System; using System.Threading; using System.Windows.Forms; namespace Chico { public class SingleApp { private static Boolean IsSingleAppMode; private static Mutex singleApp; private const Single waitTime = 3000; public static Boolean Initialize(Boolean value, Form form) { try { if (value) …

Member Avatar for CsharpChico
5
557
Member Avatar for arunair

Keep in mind that the system protects some files so you have to pay close attention to any errors. try using as try catch block so that you know what errors are being thrown. here is a simple method that i use to clear the internet cache in vista [CODE]using …

Member Avatar for arunair
0
184
Member Avatar for hopefree
Re: Help

Check the namespace in form and designer.cs make sure they match

Member Avatar for CsharpChico
0
83
Member Avatar for simagen
Member Avatar for Farhad.idrees

// set xml structure as such <Semester><Value Name="Semester1"/><Value Name="Semester2"/></Semester>etc.etc. System.Xml.XmlDocument doc = new Sytem.Xml.XmlDocument(); doc.Load("Path to Xml File"); foreach (XmlNode node in doc.SelectNodes("/Semester/Value")) { combox1.Items.Add(node.Attributes["Name"].innerText); }

Member Avatar for CsharpChico
0
139
Member Avatar for zachattack05

Code Snip, Also Know as a Code Snippet. Is A small Piece of Code That Can be used in Different Applications To Get A result. There is No Way to Know what the snippet was intentionnaly ment for it could be used for many things as to extract certain data …

Member Avatar for CsharpChico
0
797
Member Avatar for chris7197

Your Webrowser is null because it is being called as a new webbrowser put your initial webbrowser outside of initial void like this: WebBrowser wb = new WebBrowser(); public void Form1_Load(object sender, EventArgs e) { wb.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(wb_DocumentCompleted); } wb_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { // web browser is being …

Member Avatar for CsharpChico
0
346

The End.