---
title: "Processes"
canonical: "https://docs.cuesystem.com/space/CVCHELP/509149448/Processes"
format: markdown
---
---

A process operates in parallel to the function/process that started it. The process can have parameters. A process can be declared only within a module or a class. 

The process does not return any value. The process cannot be called in the same way as a function. The process must be started by an operator StartProcess. 

If a Link to an event has been used then the process will start when the corresponding event occurs. The link is mostly used for graphics objects and device drivers. 

#### Syntax 

```visualbasic
[Accessibility] Process Name([Parameters]) [Link Event] [WithAtributes {}]
  [Return] 
End Process
```

### Optional part WithAttributes

This part can contain the following attributes

#### Attribute: Info 

|  |  |  |
| --- | --- | --- |
| Value type | Meaning | Example |
| Text | Text which will be visible in a tooltip window for this process. | Info := "Any text " |

#### Example 

```visualbasic
Private Process Autoexec() 
  StartProcess ReadData() 
End Process 

Process ReadData() 
  // ... 
End Process
```

#### Example of the process with parameters 

```visualbasic
Private Process Autoexec() 
  StartProcess ReadData(100, 200) 
End Process 

Process ReadData(MinValid As Long, MaxValid As Long) 
  // ... 
End Process
```

#### Example of linked process 

```visualbasic
Process Page1_PushButton1_OnPush() Link Page1.PushButton1.OnPush 
  // ... 
End Process
```

#### MyLink 

It is a reference to the object that generates a link. 

#### Example 

```visualbasic
Process FullScreenWindow1_Button1_OnPush() Link FullScreenWindow1.Button1.OnPush() 
  // instead of: 
  // Do While FullScreenWindow1.Button1.IsPressed() 
  // with using MyLink: 
  Do While MyLink.IsPressed() 
    // ... 
  End Do 
End Process
```