Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Ad control
  • Overview of Ad control
  • Creating an Ad control
  • To create an Ad control:
  • Size of ads
  • Operating mode of Ad controls
  • Test mode
  • Loading and refreshing the ads
  • Click on an ad
  • Modifying the permissions
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Overview of Ad control
The Ad control is used to monetize an Android application by displaying an ad banner. This banner will generate incomes according to the number of clicks performed by the application users.
The "AdMob" protocol (Google) is used to display the ads.
Caution: The use of the Ad control is subject to specific terms and conditions. For more details, see Conditions for using the Ad control.
Creating an Ad control

To create an Ad control:

  1. On the "Creation" tab, in the "Graphic controls" group, click "Ad".
  2. Click at the desired location to create the control.
To view the control characteristics, select "Description" in the context menu of the control.

Size of ads

The popup menu found on the right of the icon for control creation proposes four possible sizes:
  • 320 x 50, for the phones and tablets.
  • 300 x 250, for the tablets only.
  • 468 x 60, for the tablets only.
  • 768 x 90, for the tablets only.
  • The selected size will be the minimum control size. The control can be enlarged in edit or at runtime. In this case, the banner will remain centered in the control.
  • No ad will be display if the size of the Ad control is not sufficient.
Operating mode of Ad controls

Test mode

AdMob does not allow application providers to click their own ads or increase the number of ads displayed.
The test mode of Ad control is used to display "fake ads" on which the click triggers no income.
The test mode is automatically:
  • enabled when the application is started on the emulator.
  • disabled at run time on the phone or on the tablet.
  • At run time in the simulator, the Ad control will display a fixed image whose size is identical to the size of the ad banner.
  • The TestMode property determines if the test mode is enabled or disabled.

Loading and refreshing the ads

An ad is automatically loaded in the Ad control when the window is opened.
Then, new ads can be regularly loaded in the control according to the refresh rate defined in the application setting on the AdMob site.
The ads are loaded in background task from Internet. Therefore, the device must be connected in order for the ads to be displayed. A timeout (few seconds to several minutes) may be required between the opening of the window and the actual display of the first ad. This timeout depends on the connection quality and on the ad size.
We recommend that you use the events "Loading an ad" and "Error while loading an ad" to check the display of ads in the control. For more details, see Events associated with the Ad control.
Remark: To know if an ad is displayed in the control, use the AdLoaded property.

Click on an ad

The consequences of a click performed on an ad displayed in the Ad control depend on the type of ad. The most common actions are :
  • Opening the market to download the application corresponding to the ad.
  • Opening the browser on the site corresponding to the ad.
Modifying the permissions
Using an Ad control automatically adds the following permissions to the list of permissions required by the application:
Minimum version required
  • Version 17
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help