bullred42's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
New Members
Active Posts:
10 (0.01 per day)
Joined:
18-November 12
Profile Views:
204
Last Active:
User is offline Nov 19 2012 12:03 PM
Currently:
Offline

Previous Fields

Country:
Who Cares
OS Preference:
Who Cares
Favorite Browser:
Who Cares
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
0
Icon   bullred42 MY ACCOUNT IS TO BE DELETED ^^

Posts I've Made

  1. In Topic: adding picturebox_mousemove event in running at run time

    Posted 19 Nov 2012

    i found the solution already. thanks and sorry for giving you trouble
  2. In Topic: adding picturebox_mousemove event in running at run time

    Posted 19 Nov 2012

    View PostMomerath, on 19 November 2012 - 10:28 AM, said:

    Right after you create the picture box you would register the mouse move event handler.


    my picture box is not loaded in the form. it will be loaded during run time only. meaning in my design there is no picturebox just only tab control with no tabpages
  3. In Topic: adding picturebox_mousemove event in running at run time

    Posted 19 Nov 2012

    I already removed

    throw new NotImplementedException(); but still having an error

    void PB_MouseMove(object sender, MouseEventArgs e)
            {   
                //if (imageBox1.Image!=null)
                {
                    this.XposTlStrpLbl.Text = " " + e.X.ToString();
                    this.YposTlStrpLbl.Text = " " + e.Y.ToString();
                }
                
                if (gray_in_use)
                {
                     this.XYValTlStrpLbl.Text = " " + GryImg[e.Y, e.X].ToString();
                }
                
                else
                {
                    this.XYValTlStrpLbl.Text = " " + MImg[e.Y, e.X].ToString();
                }
            }
        }
    
    
    


       void PB_MouseMove(object sender, MouseEventArgs e)
            {
               //throw new NotImplementedException(); <- even if i removed this or not. 
                  //if (imageBox1.Image!=null) <- need to declared the picturebox from private void AddtbCtrl1toForm
                {
                    this.XposTlStrpLbl.Text = " " + e.X.ToString();
                    this.YposTlStrpLbl.Text = " " + e.Y.ToString();
                }
                
                if (gray_in_use)
                {
                     this.XYValTlStrpLbl.Text = " " + GryImg[e.Y, e.X].ToString();
                }
                
                else
                {
                    this.XYValTlStrpLbl.Text = " " + MImg[e.Y, e.X].ToString();
                }
            }
        }
    
    
          //Open File Menu Item
            private [u]void[/u] OpenTStrpMItm_Click(object sender, EventArgs e)
            {
               if (this.OpnFleDlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
               {
                   MImg = new [u]Image[/u]<Bgr, byte>(this.OpnFleDlg.FileName);
    
               //    imgbx.Image = MImg.ToBitmap();
                         
                   MImg = MImg.Copy();
                   
                }
                [u]if[/u] (this.OpnFleDlg.FileNames.Length > 0)
                {
            
                    this.Text = System.IO.Path.GetDirectoryName(this.OpnFleDlg.FileNames[0]);
                        foreach (string pb in this.OpnFleDlg.FileNames)
                        {
                            AddtbCtrl1toForm(new [u]System[/u].IO.FileInfo(pb));
                        
                        }         
                }
            }     
    
    
    



    thanks ^^
  4. In Topic: adding picturebox_mousemove event in running at run time

    Posted 19 Nov 2012

    
     //picturebox
                    PB.Location = new Point(25, 25);
                    PB.Size = new Size(520, 535);
                    PB.SizeMode = PictureBoxSizeMode.AutoSize;
                    PB.MouseMove += new MouseEventHandler(PB_MouseMove); <-this one
    
    
    


      void PB_MouseMove(object sender, MouseEventArgs e)
            {
                throw new NotImplementedException();
            }
    
    


    but i am still having a problem. because everytime i am controlling the picturebox it is not working. and i got many errors
  5. In Topic: adding picturebox_mousemove event in running at run time

    Posted 18 Nov 2012

    Is it still possible even the picturebox is not loaded in the form. just during run time to do the operation. sorry i am starting to get confused now.

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

bullred42 hasn't added any friends yet.

Comments

bullred42 has no profile comments yet. Why not say hello?