Question: I have two classes(Data\_Reader And Display\_Data) and a GUI\_Form.  

What i want is to Display the Read data of Data\_Reader Class on Textbox which exists on GUI\_Form so to wrap it i wrote Display\_Data class .  

But i got the folowing exception:

> 
> Cross-thread operation not valid: Control 'textBox1' accessed from a thread other than the thread it was created on
> 
> 
> 

Can anyone knows how to solve this ? 
I just Want to update Read Data values on GUI Form.

```
//    Gui Form
//    ============
public partial class GUI_Form: Form
{
}
//    ==============
//    Display Data Class
//    ===========
public static class Display_Data
{
    public delegate void MyDelegate(Label myControl, string myArg2);
    public static void DelegateMethod(Label myControl, string myCaption)
        {
            myControl.Text = myCaption;
        } 
}

//=========================
//  Reader Class
//=========================
public void Data_Reader
{
    string Data_Received_text="Test";
    private System.ComponentModel.ISynchronizeInvoke _syn;
    Meter_Data_Class.packets_received_counter_status_display++;
    //it will call the display_Data class delegate method to update textbox on gui
    syn.BeginInvoke(new
                  Display_Data.MyDelegate(Display_Data.DelegateMethod),Data_Received_text);

}

```

Answer: 
In Emacs:

With point on the function whose definition you want to visit, hit `C-x 5 F` (`find-function-other-frame`).

You can also bind `find-function`, `find-function-other-window`, or `find-function-other-frame` to a mouse button action.

You mention *Strg + (left-mouse-click on function call)*, for instance. Dunno what `Strg` is here, but you can easily bind `[mouse-1]` or `[down-mouse-1]` to a command that checks the symbol at the click position, and if it is a defined function calls `find-function` for it, and if it is not has the usual `[mouse-1]` or `[down-mouse-1]` behavior.

Personally, I wouldn't want such behavior, but it is easy to achieve in Emacs. For example:

```el
(defun my-find-func-mouse (event)
  (interactive "e")
  (let ((fn  (save-excursion
               (goto-char (posn-point (event-end event)))
               (function-called-at-point))))
    (unless (fboundp fn) (error "No function here"))
    (find-function-do-it fn nil 'switch-to-buffer-other-window)))

(global-set-key [C-down-mouse-1] nil)
(global-set-key [C-mouse-1] #'my-find-func-mouse)

```
The usual way is to create a TAGS file using etags:

```
$ find . -type f -iname "*.lisp*" | etags -

```

Then, do `M-x visit-tags-table` and navigate to the TAGS file. After the tags are loaded, you can simply do `M-.` with point on function and it will open in the current buffer.

Also, you can use `M-*` to go back to where you were before.

If you're using projectile, you can simply keep your TAGS file in the project root and you won't need to run `M-x visit-tags-table`. Projectile will load the tags table automatically when you first press `M-.`