Mitja Bonca 557 Nearly a Posting Maven

Hmm, here is much work to be done.
You are really messing things.
This code does not even complie.

To do your simple program, you can do:

class Program
{
    static void Main(string[] args)
    {
        string filePath = @"C:\YourFolder\testFile.txt";
        StreamReader sr = new Streamreader(filePath);
        string line = "";
        for (int i = 0; i < 1; i++)
            line = sr.ReadLine();
        sr.Dispose();
        Console.WriteLine(line);
        Console.ReadLine();            
    }
}
Mitja Bonca 557 Nearly a Posting Maven

For using MonthCalendar control and when you want to go 1 month forward and backward when pressing buttons:

Private Sub button1_Click(sender As Object, e As EventArgs)
    '1 month forward
    Dim [date] As DateTime = monthCalendar1.SelectionStart
    monthCalendar1.SelectionStart = [date].AddMonths(1)
    monthCalendar1.SelectionEnd = monthCalendar1.SelectionStart
End Sub

Private Sub button2_Click(sender As Object, e As EventArgs)
    '1 month backward
    Dim [date] As DateTime = monthCalendar1.SelectionStart
    monthCalendar1.SelectionStart = [date].AddMonths(-1)
    monthCalendar1.SelectionEnd = monthCalendar1.SelectionStart
End Sub

In case if you want use to select only one day, dont forget to set property "monthCalendar1.MaxSelectionCount" to 1 on load time.

Mitja Bonca 557 Nearly a Posting Maven

Try creating DataTable and fill it with data, if there wil be no rows inside of it, return false, if there are rows, return true:

Private Function CheckingData() As Boolean
    Dim con As New System.Data.SqlClient.SqlConnection("Data      Source=CHETS-TOSHIBA\SQLEXPRESS;Initial Catalog=PlanetDiscLibrary;Integrated Security=True")
    Dim sqls As String = "Select * from album where album_id='" + txtAID.Text & "' and quantity_available < 1 "
    Dim cmd As New System.Data.SqlClient.SqlCommand(sqls, con)
    Dim table As New DataTable()
    Dim ds As New System.Data.SqlClient.SqlDataAdapter()
    da.Fill(table)
    If table.Rows.Count > 0 Then
        Return True
    Else
        Return False
    End If
End Function

Not to forget: to show messageBox, but show it in the other method, not here:

Private Sub MyMethod()
    Dim bChecking As Boolean = CheckingData()
    'call method which will check for data existance
    If bChecking Then
        MessageBox.Show("Data exists")
    Else
        MessageBox.Show("Album is out of stock")
    End If
End Sub
Begginnerdev commented: Same method that I use. Good job. +0
Mitja Bonca 557 Nearly a Posting Maven

Exactly, when you rename the form1, you got a messageBox, where is asking you if you want to rename all references connected with project, and if you choose yes, Even Designer will rename!!
Try it out, you will see it works,.
bye

Mitja Bonca 557 Nearly a Posting Maven

It sure does (vote +1)
:)

Mitja Bonca 557 Nearly a Posting Maven

I would change your code completely. I would run login before form1 initialization. If login is successful, then open form1, and pass the argument to it (argument from login form to form1 as parameter):

 static class Program
 {
  [STAThread]
  static void Main()
  {   
    using (Login login = new Login())
    {
     login.StartPosition = FormStartPosition.CenterScreen;
     if (login.ShowDialog() == DialogResult.OK)
     {      
      Application.Run(new Form1(login.strUserName)); //passing the userName to the constructor of form1 (see bellow)
     }
   }
  }
 }

//form1:
 public partial class Form1 : Form
 {  
  string userName;  //class variable!
  public Form1(string _strUser)
  {   
   InitializeComponent();
   userName = _userName; //a local variable of a form1 class has hold user`s name (userName - which u can call it from within the form1 class!
   //you can use this variable in some control:
   label1.Text = "Logged user: " + userName;
  }
 }
Mitja Bonca 557 Nearly a Posting Maven

1st of all, why do you pass a RichTextBox referene as argument (into this method)?
If you do this code in the class (form) where contorl is, you can access to it directly.
Otherwise, your method must return this same reference to form where control really is!
So method must have a return type of RichTextBox.

Next, here is example code that does what you asked for:

Dim len As Integer = Me.richTextBox1.TextLength
Dim index As Integer = 0
Dim lastIndex As Integer = Me.richTextBox1.Text.LastIndexOf(Me.textBox1.Text)

While index < lastIndex
    Me.richTextBox1.Find(Me.textBox1.Text, index, len, RichTextBoxFinds.None)
    Me.richTextBox1.SelectionBackColor = Color.Yellow
    index = Me.richTextBox1.Text.IndexOf(Me.textBox1.Text, index) + 1
End While

and you can check here here how it must be done to select (highlight) text.
Hope it helps,
bye

Mitja Bonca 557 Nearly a Posting Maven

Sorry, but we are here to help, nothing else.
If you wont show any effort, we cannot show it too.

And if you are a bit of a programmer, you can easily do something, it seems a easy task (if at least you know something about coding).
So, whats it gonna be?

Mitja Bonca 557 Nearly a Posting Maven

You cannot simply MOVE data from table to table.
You can do it by regular steps:
1. SELECT value1, value2,... FROM tableName (if you want all: SELECT * FROM...)
2. INSERT INTO tableName VALUES (value1, value2,...)

This is how you can do it.

Mitja Bonca 557 Nearly a Posting Maven

You can do it this way:

Call this method:

Private Sub InsertingIntoDB()
    Dim fileName As String = "D:\PPOS\Sales_report\inventory_255503221452_Cake102.csv"
    Using conn As New SqlConnection("connString")
        Dim query As String = "INSERT INTO inventory (Inventory_id, item_id, Amount, AvgCost, CreateDate, CreateUser, Real_Qty, UnitID, BranchID) " & "VALUES(@a, @b, @c, @d, @e, @f, @g, @h, @i)"
        Using cmd As New SqlCommand(query, conn)
            For Each line As String In ReadingFile(fileName)
                Dim data As String() = line.Split(New Char() {","C}, StringSplitOptions.RemoveEmptyEntries)
                cmd.Parameters.AddWithValue("@a", Integer.Parse(data(0)))
                cmd.Parameters.AddWithValue("@b", Integer.Parse(data(1)))
                cmd.Parameters.AddWithValue("@c", Integer.Parse(data(2)))
                cmd.Parameters.AddWithValue("@d", Integer.Parse(data(3)))
                cmd.Parameters.AddWithValue("@e", Integer.Parse(data(4)))
                cmd.Parameters.AddWithValue("@f", data(5))
                cmd.Parameters.AddWithValue("@g", Integer.Parse(data(6)))
                cmd.Parameters.AddWithValue("@h", Integer.Parse(data(7)))
                cmd.Parameters.AddWithValue("@i", data(8))
                Try
                    cmd.ExecuteNonQuery()
                Catch ex As Exception
                    MessageBox.Show(ex.Message)
                    Exit Try
                End Try
            Next
        End Using
    End Using
End Sub

Private Function ReadingFile(path As String) As IEnumerable(Of String)
    Using sr As New StreamReader(path)
        Dim line As String
        While (InlineAssignHelper(line, sr.ReadLine())) IsNot Nothing
            yield Return line
        End While
    End Using
End Function

I dont know exact types of your columns, so check them out.
hope it helps,
bye

Mitja Bonca 557 Nearly a Posting Maven

You can create a custom form (call it when right click).
Search google how to make custom chapes of forms.
Here is an exampe. Put some buttons on it (or some other controls) which will be made for choosing options.

Mitja Bonca 557 Nearly a Posting Maven

Maybe you dont insert into the right database. If you use this connection string:

"Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\myworkers.mdf;Integrated Security=True;User Instance=True";

And using "|DataDirectory| inside of it, this means you are inserting into database, that is attached into your project.
And you will not see any changes made.

SOLUTION: Specify the full path to the database.

Hope it helps.
bye

Mitja Bonca 557 Nearly a Posting Maven

Ok, I mess around a bit with the code you want to, and this is what came out.
I hope you like it:

public partial class Form1 : Form
{
    DataTable table;
    public Form1()
    {
        InitializeComponent();
        //I will create this code in form`s constructor, so you will see it when form shows up

        //creating and setting dgv:
        DataGridView dataGridView1 = new DataGridView();
        dataGridView1.Location = new Point(20, 20);
        this.Controls.Add(dataGridView1);
        dataGridView1.AutoSize = true;
        dataGridView1.AllowUserToAddRows = false;
        dataGridView1.RowHeadersVisible = false;

        //creating datatable:
        table = new DataTable();
        for (int i = 1; i < 7; i++)
        {
            table.Columns.Add(string.Format("c{0}", i), typeof(int));
            table.Rows.Add();
        }

        //main code for sorting numbers in your way:
        int[] nums = Enumerable.Range(1, 36).ToArray();
        int x = 2, y = 3;
        int[] steps = { 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 5 };
        int number = 1;
        int side = 1;
        //sides: 1 = right, 2 = up, 3 = left, 4 = down

        //lets insert 1st starting number:
        InsertNumber(x, y, nums[0]);
        for (int i = 0; i < steps.Length; i++)
        {
            SettingSteps(steps[i], ref side, ref number, ref x, ref y);
            if (side == 4)
                side = 1;
            else
                ++side;
        }
        //setting datasource to datagridview to show result:           
        dataGridView1.DataSource = table.DefaultView;
        for (int i = 0; i < dataGridView1.Columns.Count; i++)
            dataGridView1.Columns[i].Width = 30;
    }

    private void SettingSteps(int steps, ref int side, ref int num, ref int x, ref int y)
    {
        for (int i = 0; i < steps; i++)
        {
            switch (side)
            {
                case 1: x++; break; …
Mitja Bonca 557 Nearly a Posting Maven

And how is this sorted? I dont see any sortig there on that image.

Its only somekind of a table with numbers inisde - which start from the middle box and they go out?

If I understand you, you have an array of numbers, from 1 to 36, and you would like to show them in this kind of order?

Mitja Bonca 557 Nearly a Posting Maven

When you open form2, you only have to pass variable to constructor of form, and pas it to some control, which will show the value (ie. username):

    'on form1:
    Public Property YourUserName() As String
        Get
            Return m_YourUserName
        End Get
        Private Set
            m_YourUserName = Value
        End Set
    End Property
    Private m_YourUserName As String
    'this is the variable you pass a value from database when logging in

    Private Sub buttonOpenForm2_click(sender As Object, e As EventArgs)
        Dim f2 As New Form2(YourUserName)
    End Sub


    'on form2:
    Public Sub New()
        'constructor 1
        InitializeComponent()
    End Sub

    Public Sub New(UserName As String)
        Me.New()
        'constructor 1
        'show username in label control:
        Me.label1.Text = UserName
    End Sub
Mitja Bonca 557 Nearly a Posting Maven

really sorry mate, but I dont do web apps :( (yet).
Wait, someone will come to help you out!

Mitja Bonca 557 Nearly a Posting Maven

Use CellContentClick event to detect buttonClicked:

private void DataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
   if(e.ColumnIndex == 3) //code bellow will only work if 4th cell will be clicked (column with index 3 - as you said!)
   { 
      if(textBoxDiscount.Text.Length > 0)
      {
         int quantity = int.Parse(dataGridView1[1, datagridview1.CurrentCell.RowIndex].Value.ToString());
         decimal rate = decimal.Parse(dataGridView1[2, datagridview1.CurrentCell.RowIndex].Value.ToString());
         int discount = int.Parse(textBoxDiscount.Text);
         decimal total = Convert.ToDecimal(quantity) * rate;
         total = (total * (100 - Convert.ToDecimal(discount)) / 100;

         //write to 4th cell the total calculated:
         dataGridView1[3, datagridview1.CurrentCell.RowIndex].Value = total.ToString("c"); //with your currency sign (€ or $,...)
      }
      else
   }     MessageBox.Show("Please enter the dicount to do the calculation!");
}

Hope ut helps mate,
tell me if the formula is the right one.

Mitja Bonca 557 Nearly a Posting Maven

Oxiegen showed how to write an sql query statement. Is that what you are looking for?
Iam asking because you said "tables", they might be dataTables, then we need a different approach, best to use Linq and Lambda Expression (in case if you got all the data from database to dataTable, and query must be done over datatable).

Which is even better if you wanna use data on many places, so you dont need to access to database each time.
Let us know.

Mitja Bonca 557 Nearly a Posting Maven

This is the code you need:

   For Each row As DataGridViewRow In dataGridView1.Rows
    Dim timeOut As Object = dataGridView1("Timeout", row.Index).Value
    Dim timeIn As Object = dataGridView1("Timein", row.Index).Value
    If timeOut Is Nothing Then
        dataGridView1.Rows(row.Index).DefaultCellStyle.BackColor = Color.Red
    ElseIf timeOut IsNot Nothing AndAlso timeIn IsNot Nothing Then
        dataGridView1.Rows(row.Index).DefaultCellStyle.BackColor = Color.Green
    End If
Next

Hope it will do any good.
bye

Mitja Bonca 557 Nearly a Posting Maven

Depends on what he wants. He 1st needs to answer on my questions.

Mitja Bonca 557 Nearly a Posting Maven

Is Discount same for all items (for all the rows in gridview)?
This is an important question so code knows what to update - or a sinlge row or all the rows.

Mitja Bonca 557 Nearly a Posting Maven

Hmm...

What DOES your application? So it can run in the backgorund?

You know, there is no difference if the app is minimized or not, if it has work to do, it will do it. No matter in what kind of visual state it is.

So, what does your application and how we ccan help you?

PLEASE, provide us some decent issue explanation.

Mitja Bonca 557 Nearly a Posting Maven

For registering user, you basicly need his username and password. Username must me unique, that means it can ONLY be one (it must not repeat - its meant like ID).
To answer on your questions:
1. To check is user already registered: you need an sql query to check if this username exists in database:

Private Sub MyMethod()
    Dim IfUserExists As Boolean = CheckUserNameExistance(txtuname.Text)
            'user exists!!
            'notify by message about this user name already exists, and it must be changed
    If IfUserExists Then
            'user does not exist, so can continue
    Else
    End If
End Sub
Private Function CheckUserNameExistance(user As String) As Boolean
    Dim bExisting As Boolean = False
    Using conn As New SqlConnection("connString")
        Dim query As String = "SELECT UserName FROM Users WHERE UserName = @param"
        Using cmd As SqlCommand = New SqlComamnd(query, conn)
            Dim obj As Object = DirectCast(cmd.ExecuteScalar(), String)
            If obj IsNot Nothing Then
                bExisting = True
            End If
        End Using
    End Using
    Return bExisting
End Function
  1. How to verify the password and reennter password?
    QUESTION: What do you mean by verifying? To check its strenght? Or simply equality of both inserted strings?
Mitja Bonca 557 Nearly a Posting Maven

You should use a cellValidating event. It occurs before Leaving the cell. Its strictly meant for validating the cell value.
This event will notify user as soon as he will try to confirm the inserted value into a cell (as said, just before leaving cell).
And do not use a loop through rows, use only selected row!

private void NewBookingDataGridView_CellValidating(object sender, DataGridViewCellValidatingEventArgs e)
{
    //validating only for 2nd column:
    if(e.ColumnIndex == 1)
    {
         DateTime input = Convert.ToDateTime(e.FormatedValue.ToString()); 
         if(input < DateTime.Now.Date)
         {
              e.Cancel = true;
              MessageBox.Show("You are trying to save records of past date.");
         }
    } 
}

So this is in my opinion the best way, no need any loops or any other checking. Best to notify the user as soon as he does something wrong. And this why we have CellValidating event.

Hope it helps,
bye

Mitja Bonca 557 Nearly a Posting Maven

What about this way:

        privat void MyMethod()
        {
            List<string> results = ReadingFiles(@"C:\MyFolder", "*.txt");
        }

        private List<string> ReadingFiles(string dirPath, string exstension)
        {
            List<string> filesContent = new List<string>();
            StringBuilder sb;
            DirectoryInfo di = new DirectoryInfo(dirPath);
            FileInfo[] files = di.GetFiles(exstension, SearchOption.TopDirectoryOnly);
            foreach (FileInfo file in files)
            {
                using (FileStream fs = new FileStream(file.FullName, FileMode.Open, FileAccess.Read))
                {
                    using (StreamReader sr = new StreamReader(fs))
                    {
                        string line;
                        sb = new StringBuilder();
                        while ((line = sr.ReadLine()) != null)
                        {
                            sb.AppendLine(line);
                        }
                        filesContent.Add(sb.ToString());
                    }
                }
            }
            return filesContent;
        }
Mitja Bonca 557 Nearly a Posting Maven

Where can we get foreign keys of Member_id, and Album_id?
And we even have to get primary key of th table (Trnsaction_id), how do we get it? One option is to create a method, that looks for last inserted id, and we only increment it by 1, so we get next new number (id).
But about those two foerign keys? Do you have any data on the form of getting ids based on their names?

Mitja Bonca 557 Nearly a Posting Maven

No top answerers lists anylonger? Its only an information which one you are in the list, but there is no actual list anylonger.
And where are other statistical data?
All gone?

Mitja Bonca 557 Nearly a Posting Maven

your prorgram? How can be your program, if you actually have nothing? :)
Please, tell us a bit more what exactly do you want.

You know, we are here to help, not doing code instead of you guys.
So, if you will not out some effort, at least giving us a decent issue explanation, why would we then waste out free time for you?
Come on...
Btw, do you have any code done yet?

Mitja Bonca 557 Nearly a Posting Maven

so use WHERE clause (not having).

Mitja Bonca 557 Nearly a Posting Maven

Still hard to tell, since he didnt tell us what exactly he expects from the query.

Mitja Bonca 557 Nearly a Posting Maven

do:

Private rtb1 As RichTextBox
Private Sub button1_Click(sender As Object, e As EventArgs)
    rtb1 = New RichTextBox()
    rtb1.Name = "rtb1"
    rtb1.Size = New Size(300, 200)
    'set it
    rtb1.Location = New Point(20, 20)
    'set it
    Me.Controls.Add(rtb1)
End Sub
Mitja Bonca 557 Nearly a Posting Maven

"value" in your case, must be a number.

  1. Or to pass number directly:

    Dim sqls As String = "UPDATE album SET quantity_available= quantity_available - 1 WHERE quantity_available=1"

which is in no good, if your parameter is changing (normally is does)

  1. Or you create a parametrized query:

    Dim sqls As String = "UPDATE album SET quantity_available= quantity_available - 1 WHERE quantity_available=@parameter1"
    Dim conn As New SqlConnection("connString")
    Dim cmd As New SqlCommand(sqls, conn)
    cmd.Parameters.Add("@parameter1", SqlDbType.Int).Value = 1 'declaring parameter
    'or pass some integer variable instead, like:
    'int myValue = 2;
    'cmd.Parameters.Add(@"parameter1", SqlDbType.Int).Value = myValue;

Hope it helps,bye

Mitja Bonca 557 Nearly a Posting Maven

And as said, use an event to let only integers insertion (use keypress event).

Mitja Bonca 557 Nearly a Posting Maven

Use this:

Imports System.Runtime.InteropServices
Imports System.Text

Namespace Ini
    ''' <summary>
    ''' Create a New INI file to store or load data
    ''' </summary>
    Public Class IniFile
        Public path As String

        <DllImport("kernel32")> _
        Private Shared Function WritePrivateProfileString(section As String, key As String, val As String, filePath As String) As Long
        End Function
        <DllImport("kernel32")> _
        Private Shared Function GetPrivateProfileString(section As String, key As String, def As String, retVal As StringBuilder, size As Integer, filePath As String) As Integer
        End Function

        ''' <summary>
        ''' INIFile Constructor.
        ''' </summary>
        ''' <PARAM name="INIPath"></PARAM>
        Public Sub New(INIPath As String)
            path = INIPath
        End Sub
        ''' <summary>
        ''' Write Data to the INI File
        ''' </summary>
        ''' <PARAM name="Section"></PARAM>
        ''' Section name
        ''' <PARAM name="Key"></PARAM>
        ''' Key Name
        ''' <PARAM name="Value"></PARAM>
        ''' Value Name
        Public Sub IniWriteValue(Section As String, Key As String, Value As String)
            WritePrivateProfileString(Section, Key, Value, Me.path)
        End Sub

        ''' <summary>
        ''' Read Data Value From the Ini File
        ''' </summary>
        ''' <PARAM name="Section"></PARAM>
        ''' <PARAM name="Key"></PARAM>
        ''' <PARAM name="Path"></PARAM>
        ''' <returns></returns>
        Public Function IniReadValue(Section As String, Key As String) As String
            Dim temp As New StringBuilder(255)
            Dim i As Integer = GetPrivateProfileString(Section, Key, "", temp, 255, Me.path)
            Return temp.ToString()

        End Function
    End Class
End Namespace
Mitja Bonca 557 Nearly a Posting Maven

try it in this way:

String.Format("hello Mr..." & vbCr & vbLf & "You being booked at {0} on {1}.", dataGridView1.Cells("location").Rows(dataGridView1.Rows.Count - 1).Value.ToString(), dataGridView1.Cells("date").Rows(dataGridView1.Rows.Count - 1).Value.ToString())
Mitja Bonca 557 Nearly a Posting Maven

On which line of code does the error occur exactly?
Put a breakpoint and go line by line through thr code to find it.

Mitja Bonca 557 Nearly a Posting Maven

Hmm, sorry, but I really cant understand what you are saying.

Mitja Bonca 557 Nearly a Posting Maven

error appering by:

.ExecuteNonQuery()
t says this:
ncorrect syntax near the keyword 'unique'.

unique is a column name in your database. maybe he only gave you an example name, you have to change it to your actaul column name!

Mitja Bonca 557 Nearly a Posting Maven

disle4sk said:
What i want to do is the most recent added row in datagridview

this means only last row in dgv?
Is so, you can only do:

Dim mail As New MailMessage()
Dim SmtpServer As New SmtpClient("smtp.gmail.com")

mail.From = New MailAddress("your_email_address@gmail.com")
mail.[To].Add("to_address@mfc.ae")
mail.Subject = "Test Mail"
mail.Body = String.Format("hello Mr..." & vbCr & vbLf & "You being booked at {0} on {1}.", dataGridView1("location")(dataGridView1.Rows.Count - 1).Value.ToString(), dataGridView1("date")(dataGridView1.Rows.Count - 1).Value.ToString())

SmtpServer.Port = 587
SmtpServer.Credentials = New System.Net.NetworkCredential("username", "password")
SmtpServer.EnableSsl = True

SmtpServer.Send(mail)
Mitja Bonca 557 Nearly a Posting Maven

I would advice to use textBoxes, because you (or user) will work with one item (product) at a time.

Can I ask you where do you have stored the information about product, i mean how much is one unit?

Do you have a class like "ProductInfo", where you have properties: priductId, productName, pricePerUnit ?

If not, create one, and you will calculation will be based on these data.
Creare a generic list<T>, where T will be "ProductInfo".

Then bind this list to some control, like listBox, where all the products will be shown (so user can select one for buying).
And based on selection, you can simply calculate the total price, regarding how mnay units choosen.

So:
- listbox to have a list of all products
- a label to show total price
- a textbox to allow user to enter quantity (and dont forget to allow inserting numbers only).

Then pass this data back to main form, and show them in datagrdiview, or where ever.

Mitja Bonca 557 Nearly a Posting Maven

You have a gridview, but you didnt tell us, if you want to send mail of each row, like i showed you in my post above?
This means to create a loop through rows, and using MailMessage class on each row.
If so, you can do:

For Each row As DataGridViewRow In dataGridView1.Rows
    Dim mail As New MailMessage()
    Dim SmtpServer As New SmtpClient("smtp.gmail.com")

    mail.From = New MailAddress("your_email_address@gmail.com")
    mail.[To].Add("to_address@mfc.ae")
    mail.Subject = "Test Mail"
    mail.Body = String.Format("hello Mr..." & vbCr & vbLf & "You being booked at {0} on {1}.", row("location").ToString(), row("date").ToString())

    SmtpServer.Port = 587
    SmtpServer.Credentials = New System.Net.NetworkCredential("username", "password")
    SmtpServer.EnableSsl = True

    SmtpServer.Send(mail)
Next

Hope this helps. you only dont forget to change important data with your own (your_email_address, subject, username and password (of your accout).

Mitja Bonca 557 Nearly a Posting Maven

How your code can know which are "new" data?
Cant know at all.
What you can do, is to insert on the end of some text like END OF DATA",
so when you will insert new data, you will read from "END OF DATA" on.

This is my simple example, but this is how you have to start thinking. text file offers nothing specific to define something like you want, so its up to you how you will do it.

Mitja Bonca 557 Nearly a Posting Maven

I know how to create textbox dynamically but the problem now is that I want it below my previous created textbox

I really dont get what you would like to do.
Please re-define it.
thx

Mitja Bonca 557 Nearly a Posting Maven

Post does not have a Quote button.
Can I only quote some post by copy/paste text into text area, anduse a "Quote" button over this text area?

Mitja Bonca 557 Nearly a Posting Maven

variable "a" seems to be null, or has no value at all.

Begginnerdev commented: Good catch. +0
Mitja Bonca 557 Nearly a Posting Maven

You can put a class into using statement, this way it will Dispose() automatically when exiting the loop.

Mitja Bonca 557 Nearly a Posting Maven

There is no such events like doubleClick or DateSelected, like monthCalendar control has.
So I would suggest you to take MonthCalendar control, and use DateSelected event.
What do you think?

Mitja Bonca 557 Nearly a Posting Maven

You want to hide.... ok!

When do you want to show it up again?

You could createa class boolean flag, and with it determine when to hide it for n clicks (1,2,..n), or when to hide it forever.

Mitja Bonca 557 Nearly a Posting Maven

Code is setting some variable "nurl" based on some matching - which is done by using Regular Expressions.
After that (in 2nd if statement) is checks the "nurl" varialbe and get some string from readPage() method.
Next (and last), is fires ExtractResults() method which obviously does some things (like setting or showing result; based on method`s name) - based on some parametes that were gathered and set previously in the code from above.

Hope it hepls.
bye

Mitja Bonca 557 Nearly a Posting Maven

This looks pretty neat doesn`t it :)

MEMORATH: is this what you were talking about?