0

Place a panel in your form, set the position and size of the panel which you want to set as limit, and in that panel use a picture box control add an arrow in it. Now place your labels outside the panel and add the x and y values as text in that ...... now when user press N the add one point to y at each press unless the limit reaches that is the upper limit of your panel, and when user press S minu one point from y of picture box at each change also check the values of x and y and update you labels..... same as with E and W..... on pressing W subtract one point and on pressing E add one point to the x value of picturebox

0

You are Welcome :)
[B]Answer number one:[/B] [CODE]this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(dataGridView1_CellClick);[/CODE] is the event generated when you click on any cell of Datagrid like you were using cellcontentclick

[B]Answer number two:[/B] I used .Value.ToString().ToUpper() == "FALSE" because i was not sure about, is it False or false when converted to string.

0

[QUOTE=JuliusRyan;1570840]can u pass me some
of your Sales and Inventory System?
I need to study it thoroughly :D
imma IT Student TY
by the way heres my email
SNIP[/QUOTE]

If you want to learn then you should try out yourself read books and tutorials for help but implement yourself you cannot understand others logic easily so better to try it on your own as far as help is concern this website has forums for widely used languages where you can find solutions of your problem but there also no one can give you the whole thing

0

try this code
[CODE]
{
//your code
this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(dataGridView1_CellClick);
}
void dataGridView1_CellClick(object sender, System.Windows.Forms.DataGridViewCellEventArgs e)
{
// MessageBox.Show(dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString());
try
{
if (dataGridView1.Rows[e.RowIndex].Cells["checkbox"].Value == null || dataGridView1.Rows[e.RowIndex].Cells["checkbox"].Value.ToString().ToUpper() == "FALSE")
dataGridView1.Rows[e.RowIndex].Cells["checkbox"].Value = true;
else
dataGridView1.Rows[e.RowIndex].Cells["checkbox"].Value = false;

           }
           catch (Exception str)
           {
               MessageBox.Show(str.Message);
           }

       }[/CODE]
0

try this code [CODE] StreamReader reader = new StreamReader("Answers.txt");
string strAllFile = reader.ReadToEnd().Replace("\r\n", "\n").Replace("\n\r",
"\n");
string[] arrLines = strAllFile.Split('\n');
rand = r.Next(0, arrLines.Length - 1); //rand is a predefined variable
Console.WriteLine(rand + "---");
answer = reader.ReadLine();
answer = arrLines[rand];
Console.WriteLine(answer + "**");
reader.Close();[/CODE]

2

if 12oz of soda killed 2 lbs of mouse than it means 6 oz soda is enough for 1 lb.... If it is true than if the weight of you friend is also in lbs then just multiply the weight with 6oz
[CODE]//declare variables
int AMOUNT_SODA;
int MOUSE_WEIGHT;
int START_WEIGHT;
int DESIRED_WEIGHT;
double SWEETNER_PERCENT_SODA;
double sweetnerKillMouse_2lb; // amount of sweetner that will kill mouae
double sweetnerKillMouse_1lb;
double sweetnerKillHuman;//amount of soda that will kill a human
double newAmountSoda;

    //assigne variables
    AMOUNT_SODA = 12;//espressed in oz
    MOUSE_WEIGHT = 2;//expressed in lbs
    START_WEIGHT = 150;
    DESIRED_WEIGHT = 140;
    SWEETNER_PERCENT_SODA = (0.1/100) *AMOUNT_SODA

    //find out how much sweet ner killed te mouse
   // sweetnerKillMouse = SWEETNER_PERCENT_SODA * AMOUNT_SODA;
    sweetnerKillMouse_2lb = SWEETNER_PERCENT_SODA;
    sweetnerKillMouse_1lb=sweetnerKillMouse_2lb/2;
    //find out how much sweetner human drinks till he dies 
    //(amount of sweetner that kills human / human weight) = (amount that kills mouse / mouse weight)
  //  sweetnerKillHuman = DESIRED_WEIGHT * sweetnerKillMouse / MOUSE_WEIGHT;
      sweetnerKillHuman = DESIRED_WEIGHT * sweetnerKillMouse_1lb;
    //find out the total amount of sida which has the amount of sweetner that kills a human
    //(amount of sweetner that kills the mouse / amount of soda ) = (amount of sweetner that kills human / new amount of soda)
    newAmountSoda = (AMOUNT_SODA * sweetnerKillHuman) / sweetnerKillMouse;

    //display
    System.out.println(newAmountSoda);//MY RESULT IS 840.00[/CODE]
Votes + Comments
very good
Helped me realize something simple.
0

Try adding this event in you code
[CODE]

//if you are working in asp
<asp:GridView ID="GridView1" runat="server" OnRowDataBound="GridView1_RowDataBound" >
...
</asp:GridView>
//if you are working in c#
this.GridView1.OnRowDataBound+=new GridViewRowEventHnadler(GridView1_RowDataBound);
[/CODE]

[CODE]protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
// searching through the rows
if (e.Row.RowType == DataControlRowType.DataRow)
{
String status = DataBinder.Eval(e.Row.DataItem, "status").ToString();

    if (status.ToUpper()=="OPEN" ) 
   e.Row.BackColor = Color.Red; 
}

}[/CODE]