Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
C

cemlouis

@cemlouis
About
Posts
46
Topics
29
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • I couldn't find an exact subject for this thread...
    C cemlouis

    Hi, I am planning to write a software which reads proxy servers from a txt file and connecting a site through a proxy server and clicking a link on the site. Can somebody draw a roadway to this software. I have C# experience but I don't know which subjects handled with this project??? Thank you, Cem

    C# csharp sysadmin question

  • A good place for brainstorming...
    C cemlouis

    This site is a good place for brainstorming... http://www.questionstogo.com[^]

    The Lounge com

  • A timer func problem???
    C cemlouis

    Hi, I have the below code which runs after choosing an item from the listbox (choose the first one). Goes to the below item after 5 seconds and then goes to another after 5 sec again... So here is my question: I have a func which I named as process() I want to run this func only once when each item is selected in the listbox? So how can I do that??? Thank you, Cem Louis using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.Timers; using System.Threading; namespace WindowsApplication14 { /// /// Summary description for Form1. /// public class Form1 : System.Windows.Forms.Form { private System.Windows.Forms.ListBox listBox1; private System.Windows.Forms.Button button1; private System.Timers.Timer timerClock = new System.Timers.Timer(); /// /// Required designer variable. /// private System.ComponentModel.Container components = null; public Form1() { // // Required for Windows Form Designer support // InitializeComponent(); InitializeTimer(); // // TODO: Add any constructor code after InitializeComponent call // } public void InitializeTimer() { this.timerClock.Elapsed += new ElapsedEventHandler(OnTimer); this.timerClock.Interval = 5000; } /// /// Clean up any resources being used. /// protected override void Dispose( bool disposing ) { if( disposing ) { if (components != null) { components.Dispose(); } } base.Dispose( disposing ); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.listBox1 = new System.Windows.Forms.ListBox(); this.button1 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // listBox1 // this.listBox1.Location = new System.Drawing.Point(8, 8); this.listBox1.Name = "listBox1"; this.listBox1.Size = new System.Drawing.Size(120, 95); this.listBox1.TabIndex = 0; // // button1 // this.button1.Location = new System.Drawing.Point(8, 112); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(120, 23); this.button1.TabIndex = 1; this.button1.Text = "Run"; this.button1.Click += new System.EventHandler(this.button1_Click); // // For

    C# question graphics docker help

  • best regex mail pattern ?
    C cemlouis

    Hi, I am searching for the best regex mail pattern with C#. Thank you, Cem Louis

    C# regex csharp algorithms question

  • A timer problem?
    C cemlouis

    Hi Smith, Not working :(

    C# graphics docker help question

  • A timer problem?
    C cemlouis

    Hi, I have a listbox with three values on it and a button on my form. When I pressed the button the listbox have to select the next item after 2 seconds. Then select the next one after 2 seconds... And so on... Here is my unworking below code: Anyhelp would be greatly appreciated... Thank you indeed... Cem Louis using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.Timers; using System.Threading; namespace WindowsApplication14 { /// /// Summary description for Form1. /// public class Form1 : System.Windows.Forms.Form { private System.Windows.Forms.ListBox listBox1; private System.Windows.Forms.Button button1; private System.Timers.Timer timerClock = new System.Timers.Timer(); /// /// Required designer variable. /// private System.ComponentModel.Container components = null; public Form1() { // // Required for Windows Form Designer support // InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // } public void InitializeTimer() { this.timerClock.Elapsed += new ElapsedEventHandler(OnTimer); this.timerClock.Interval = 2000; this.timerClock.Enabled = true; } /// /// Clean up any resources being used. /// protected override void Dispose( bool disposing ) { if( disposing ) { if (components != null) { components.Dispose(); } } base.Dispose( disposing ); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.listBox1 = new System.Windows.Forms.ListBox(); this.button1 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // listBox1 // this.listBox1.Location = new System.Drawing.Point(8, 8); this.listBox1.Name = "listBox1"; this.listBox1.Size = new System.Drawing.Size(120, 95); this.listBox1.TabIndex = 0; // // button1 // this.button1.Location = new System.Drawing.Point(8, 112); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(120, 23); this.button1.TabIndex = 1; this.button1.Text = "Run"; this.button1.Click += new System.EventHandler(this.butto

    C# graphics docker help question

  • A C# / SQL Query Problem
    C cemlouis

    Anyway I did it like below: "SELECT TOP 100 name FROM people ORDER BY NEWID()" Cem

    C# database help csharp sql-server sysadmin

  • A C# / SQL Query Problem
    C cemlouis

    Hi, I want to send to SQL server a query I want to get randomly generated 100 rows where they are no generated before. I made my query like below: mySqlCommand.CommandText = "SELECT name,rand(name) FROM people LIMIT 100 WHERE generated_before IS NULL"; Gives system error??? Thank you, Cem Louis

    C# database help csharp sql-server sysadmin

  • Transfer an SQL database?
    C cemlouis

    Hi, Q1: How can I transfer an SQL database manually? I have a database which is named mydb, I looked at the harddrive and found it on "C:\Program Files\Microsoft SQL Server\MSSQL\Data" there is 2 file one of them is mydb.mdf and the lof file of that. I copied these on another machine on the same path but couldn't make it to work??? Q2: I used the below code to EMPTY a table which is named people but it is not working???: SqlConnection mySqlConnection4 = new SqlConnection("Initial Catalog=mydb;Data Source=" + comboBox1.SelectedItem.ToString() + ";Integrated Security=SSPI;"); mySqlConnection4.Open(); SqlCommand mySqlCommand4 = mySqlConnection4.CreateCommand(); SqlTransaction myTrans; myTrans = mySqlConnection4.BeginTransaction(IsolationLevel.ReadCommitted,"SampleTransaction"); mySqlCommand4.Connection = mySqlConnection4; mySqlCommand4.Transaction = myTrans; mySqlCommand4.CommandText = "EMPTY people" ; //mySqlCommand4.ExecuteNonQuery(); myTrans.Commit(); mySqlConnection4.Close(); Anyway What is the problem??? Any help would be greatly appreciated... Cem Louis

    C# question database sql-server help sysadmin

  • A C# SQL question
    C cemlouis

    Hi, I used the below code to EMPTY a table which is named people but it is not working???: SqlConnection mySqlConnection4 = new SqlConnection("Initial Catalog=mydb;Data Source=" + comboBox1.SelectedItem.ToString() + ";Integrated Security=SSPI;"); mySqlConnection4.Open(); SqlCommand mySqlCommand4 = mySqlConnection4.CreateCommand(); SqlTransaction myTrans; myTrans = mySqlConnection4.BeginTransaction(IsolationLevel.ReadCommitted,"SampleTransaction"); mySqlCommand4.Connection = mySqlConnection4; mySqlCommand4.Transaction = myTrans; mySqlCommand4.CommandText = "EMPTY people" ; //mySqlCommand4.ExecuteNonQuery(); myTrans.Commit(); mySqlConnection4.Close(); Anyway What is the problem??? Thank you by the way... Cem Louis

    C# question database csharp

  • A C# SQL question
    C cemlouis

    Thank you much...

    C# question database csharp

  • A C# SQL question
    C cemlouis

    Hi, When I want to specify an SQL query I am using the below code: mySqlCommand.CommandText = "SELECT name, surname FROM people WHERE name = 'James' AND surname = 'Brown'"; But how can I do this if I don't want to write down the surname(use a variable instead of that)? I used below code but couldn't get a result: string buffer_surname = textBox1.Text; mySqlCommand.CommandText = "SELECT name, surname FROM people WHERE name = 'James' AND surname = '@buffer_surname'"; ??? Thank you, Cem Louis

    C# question database csharp

  • C# SQL data check like in PHP???
    C cemlouis

    hmm HasRows... Thank you...

    C# database csharp php security help

  • C# SQL data check like in PHP???
    C cemlouis

    :) And my question is: How can I know that the SQL query returns a result? Is the cell filled with data??? The C# code that I wrote above is not doing this with variable k++ increment... Thanks...

    C# database csharp php security help

  • C# SQL data check like in PHP???
    C cemlouis

    Hi, I have a problem, I want to check a data is entered to SQL database or not. I am making this in PHP like below: $sql_name_check = mysql_query("SELECT name FROM names WHERE name='$buffer_name'"); if(!mysql_num_rows($sql_name_check)){ //Do this do that... } So I want to do that in C# so I made a code block which is below: int k=0; string buffer_name = "Cem Louis"; SqlConnection mySqlConnection = new SqlConnection("Initial Catalog=names;Data Source=localhost;Integrated Security=SSPI;"); SqlCommand mySqlCommand = mySqlConnection.CreateCommand(); mySqlCommand.CommandText = "SELECT name, tel FROM names WHERE tel = '1' AND name = name"; mySqlConnection.Open(); SqlDataReader mySqlDataReader3 = mySqlCommand.ExecuteReader(); while(mySqlDataReader3.Read()) { k++; } if(k > 0) //Do this do that... return false; else return true; mySqlDataReader3.Close(); mySqlConnection.Close(); Thank you; Cem Louis...

    C# database csharp php security help

  • fill web form using a windows form written in c#
    C cemlouis

    Hi, Thank you for your interest, anyway here is the link: http://www.stratejiparki.com/name.php[^] When you wrote and submit something it displays what you had written... I made a form and put a textbox, button, label on it. Then I made the button's click function like below: private void button1_Click(object sender, System.EventArgs e) { // Download the data to a buffer. WebClient client = new WebClient(); // Upload some form post values. NameValueCollection form = new NameValueCollection(); form.Add("email", textBox_email.Text.ToString()); Byte[] responseData = client.UploadValues("http://www.stratejiparki.com/name.php"); HttpWebRequest webRequest = (HttpWebRequest) WebRequest.Create("http://www.stratejiparki.com/name.php"); // ask the web request for a webResponse encapsulating // that page HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse( ); // get the streamReader from the response StreamReader streamReader = new StreamReader(webResponse.GetResponseStream( ), Encoding.ASCII); string outputString; outputString = streamReader.ReadToEnd( ); streamReader.Close( ); label1.Text = outputString; } The thing that I want is to write a string to the textbox on windows form than press the button. The textbox's text must go the form on www.stratejiparki.com/name.php then the windows form takes the data on showname.php and write to the label on windows form... Thank you, Cem Louis

    C# csharp question

  • fill web form using a windows form written in c#
    C cemlouis

    Do you need the query? I didn't want to post the url to a high known forum...

    C# csharp question

  • fill web form using a windows form written in c#
    C cemlouis

    Hi, As I mentioned in the subject the question is simple... I have a web form in my site and I have to periodically send data to this form by using a windows form application written in C# Thank you, Cem Louis

    C# csharp question

  • A text read and write question???
    C cemlouis

    Hi, I have a file which contains 13726 names on a text file (my school's students' names). Every line contains one name. And I have a textbox on a form which gets the name of the file and when I press the button it has to make seperate files which has 300 names in it. I mean I have to seperate these 13726 names on different files which has must contain 300 names and the last one must have 276 names in it. I made my button's function like below: private void button1_Click(object sender, System.EventArgs e) { int a=1; int b=1; int k; StreamReader re = File.OpenText(textBox1.Text.ToString()+".txt"); string input = null; ArrayList arrText = new ArrayList(); while ((input = re.ReadLine()) != null) { arrText.Add(input); if(a%300 == 0) { FileInfo t = new FileInfo(textBox1.Text.ToString()+"_"+ b + ".txt"); StreamWriter Tex = t.CreateText(); for(k=(b-1)*300;k<(300*b)+1;k++) { if(k==0) { Tex.WriteLine(arrText[k+1]); } else { Tex.WriteLine(arrText[k]); } } Tex.Write(Tex.NewLine); Tex.Close(); } a++; } re.Close(); } but I couldn't get a result so any help would be greatly appreciated... Thank you, Cem Louis

    C# question help

  • About DirectX9 and C#
    C cemlouis

    Hi, I am developing C# programs nowadays, I want to enter game programming with DirectX9 and C#. Can somebody give a good starting point (book, web source or some other source)? Thank you all. Cem Louis

    C# csharp game-dev question learning
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups