SlideShare a Scribd company logo
Ring Documentation, Release 1.10
19.3 Creating and running your first GUI/Mobile Application
To learn how to create GUI applications using Ring check the “Desktop and Mobile development using RingQt”
chapter.
Source Code:
Load "guilib.ring"
New qApp {
new qWidget() {
resize(400,400)
setWindowTitle("Hello, World!")
show()
}
exec()
}
In Ring notepad we have a special button to run GUI applications without displaying the console window.
19.3. Creating and running your first GUI/Mobile Application 208
Ring Documentation, Release 1.10
The next screen shot present the application during the runtime
19.4 Creating and running your first Web Application
To learn how support Ring in your web server and how to create web applications using Ring check the “Web Devel-
opment (CGI Library)” chapter.
Note: You need to support the Ring language in your web server to be able to run the next example.
Source Code:
#!ring -cgi
load "weblib.ring"
Import System.Web
new page {
text("Hello, World!")
}
We can run the application in any web browser or in the browser that are embedded in Ring Notepad.
19.4. Creating and running your first Web Application 209
Ring Documentation, Release 1.10
For Windows users, Ring comes with Apache Web server!
We can run any web application from any folder directly without doing any configuration.
19.5 Creating and running your first Desktop/Mobile Game
To learn about creating 2D Games using Ring check the “Demo Project - Game Engine for 2D Games” chapter.
Source Code:
19.5. Creating and running your first Desktop/Mobile Game 210
Ring Documentation, Release 1.10
Load "gameengine.ring"
func main
oGame = New Game
{
title = "My First Game"
sprite
{
type = GE_TYPE_PLAYER
x=400 y=400 width=100 height=100
file = "images/player.png"
transparent = true
Animate=false
Move=true
Scaled=true
}
}
We can run the application as any GUI application.
19.6 The Main File in the Project
The idea of the Main File ToolBar is to determine the main file in the project When the project contains many source
code files
Using this feature we can run the project (Main File) at any time while opening other files in the project without the
need to switch to the Main File to run the project.
To quickly use this feature
(Open the project main file)
Press Ctrl+Shift+M to set the current source code file as the main file
19.6. The Main File in the Project 211
Ring Documentation, Release 1.10
Open and modify other source code files in the project
To run the project (Main File) at any time press Ctrl+Shift+F5 (GUI) or Ctrl+Shift+D (Console)
Screen Shots:
19.7 The File Menu
From this menu we can create, open and save the source code files.
Another feature in this menu is “Print to PDF”
19.7. The File Menu 212
Ring Documentation, Release 1.10
19.8 The Edit Menu
From the Edit menu we can Cut, Copy and Paste text.
Also we can change the font and the colors.
We can Go to a specific line or use the Find and Replace window to find and replace text.
Also We can set the Tab Width (Number of Spaces)
Starting from Ring 1.8 we have the (Find in Files) option.
19.9 The View Menu
From this menu we can show/hide the dockable windows
Also we can change the Style of the Ring Notepad
Common Styles are (Fusion White and Modern Black)
19.8. The Edit Menu 213
Ring Documentation, Release 1.10
Also we can quickly show/hide group of dockable windows based on the context
19.9. The View Menu 214
Ring Documentation, Release 1.10
19.10 The Program Menu
From this menu we can run the programs
Also we can set the Main file in the project
19.11 The Browser Menu
From this menu we can quickly open common links in the browser
19.10. The Program Menu 215
Ring Documentation, Release 1.10
19.12 The Tools Menu
From this menu we can run the Form Designer in separate window
Also we can run the REPL (Read-Eval-Print-Loop) application
19.13 The Distribute Menu
From this menu we can build an executable file for the application
Also we can prepare the application for distribution
19.12. The Tools Menu 216
Ring Documentation, Release 1.10
19.14 The Help Menu
From this menu we can get the help files (CHM & PDF)
19.14. The Help Menu 217

More Related Content

PDF
The Ring programming language version 1.7 book - Part 20 of 196
PDF
The Ring programming language version 1.5.1 book - Part 16 of 180
PDF
The Ring programming language version 1.5.3 book - Part 17 of 184
PDF
The Ring programming language version 1.9 book - Part 24 of 210
PDF
The Ring programming language version 1.8 book - Part 22 of 202
PDF
The Ring programming language version 1.6 book - Part 19 of 189
PDF
The Ring programming language version 1.5.4 book - Part 17 of 185
PDF
The Ring programming language version 1.2 book - Part 8 of 84
The Ring programming language version 1.7 book - Part 20 of 196
The Ring programming language version 1.5.1 book - Part 16 of 180
The Ring programming language version 1.5.3 book - Part 17 of 184
The Ring programming language version 1.9 book - Part 24 of 210
The Ring programming language version 1.8 book - Part 22 of 202
The Ring programming language version 1.6 book - Part 19 of 189
The Ring programming language version 1.5.4 book - Part 17 of 185
The Ring programming language version 1.2 book - Part 8 of 84

Similar to The Ring programming language version 1.10 book - Part 25 of 212 (20)

PDF
The Ring programming language version 1.5.2 book - Part 17 of 181
PDF
The Ring programming language version 1.9 book - Part 23 of 210
PDF
wxFormBuilder - Tutorial on “A GUI for making GUIs” for Python
PDF
The Ring programming language version 1.8 book - Part 21 of 202
PDF
The Ring programming language version 1.3 book - Part 10 of 88
PDF
The Ring programming language version 1.10 book - Part 24 of 212
PPT
Getting started with android studio
PDF
The Ring programming language version 1.8 book - Part 85 of 202
PDF
The Ring programming language version 1.4.1 book - Part 4 of 31
PDF
The Ring programming language version 1.5.2 book - Part 16 of 181
PDF
The Ring programming language version 1.7 book - Part 82 of 196
PDF
The Ring programming language version 1.4 book - Part 4 of 30
PDF
The Ring programming language version 1.6 book - Part 4 of 189
PDF
The Ring programming language version 1.8 book - Part 20 of 202
PDF
Introduction to the iconipy Package - Create Icons from Python Code.pdf
PPT
Introduction to programming using Visual Basic 6
PDF
The Ring programming language version 1.6 book - Part 7 of 189
PPT
intro unix/linux 12
DOCX
DOCX
Containers Lab
The Ring programming language version 1.5.2 book - Part 17 of 181
The Ring programming language version 1.9 book - Part 23 of 210
wxFormBuilder - Tutorial on “A GUI for making GUIs” for Python
The Ring programming language version 1.8 book - Part 21 of 202
The Ring programming language version 1.3 book - Part 10 of 88
The Ring programming language version 1.10 book - Part 24 of 212
Getting started with android studio
The Ring programming language version 1.8 book - Part 85 of 202
The Ring programming language version 1.4.1 book - Part 4 of 31
The Ring programming language version 1.5.2 book - Part 16 of 181
The Ring programming language version 1.7 book - Part 82 of 196
The Ring programming language version 1.4 book - Part 4 of 30
The Ring programming language version 1.6 book - Part 4 of 189
The Ring programming language version 1.8 book - Part 20 of 202
Introduction to the iconipy Package - Create Icons from Python Code.pdf
Introduction to programming using Visual Basic 6
The Ring programming language version 1.6 book - Part 7 of 189
intro unix/linux 12
Containers Lab
Ad

More from Mahmoud Samir Fayed (20)

PDF
The Ring programming language version 1.10 book - Part 212 of 212
PDF
The Ring programming language version 1.10 book - Part 211 of 212
PDF
The Ring programming language version 1.10 book - Part 210 of 212
PDF
The Ring programming language version 1.10 book - Part 208 of 212
PDF
The Ring programming language version 1.10 book - Part 207 of 212
PDF
The Ring programming language version 1.10 book - Part 205 of 212
PDF
The Ring programming language version 1.10 book - Part 206 of 212
PDF
The Ring programming language version 1.10 book - Part 204 of 212
PDF
The Ring programming language version 1.10 book - Part 203 of 212
PDF
The Ring programming language version 1.10 book - Part 202 of 212
PDF
The Ring programming language version 1.10 book - Part 201 of 212
PDF
The Ring programming language version 1.10 book - Part 200 of 212
PDF
The Ring programming language version 1.10 book - Part 199 of 212
PDF
The Ring programming language version 1.10 book - Part 198 of 212
PDF
The Ring programming language version 1.10 book - Part 197 of 212
PDF
The Ring programming language version 1.10 book - Part 196 of 212
PDF
The Ring programming language version 1.10 book - Part 195 of 212
PDF
The Ring programming language version 1.10 book - Part 194 of 212
PDF
The Ring programming language version 1.10 book - Part 193 of 212
PDF
The Ring programming language version 1.10 book - Part 192 of 212
The Ring programming language version 1.10 book - Part 212 of 212
The Ring programming language version 1.10 book - Part 211 of 212
The Ring programming language version 1.10 book - Part 210 of 212
The Ring programming language version 1.10 book - Part 208 of 212
The Ring programming language version 1.10 book - Part 207 of 212
The Ring programming language version 1.10 book - Part 205 of 212
The Ring programming language version 1.10 book - Part 206 of 212
The Ring programming language version 1.10 book - Part 204 of 212
The Ring programming language version 1.10 book - Part 203 of 212
The Ring programming language version 1.10 book - Part 202 of 212
The Ring programming language version 1.10 book - Part 201 of 212
The Ring programming language version 1.10 book - Part 200 of 212
The Ring programming language version 1.10 book - Part 199 of 212
The Ring programming language version 1.10 book - Part 198 of 212
The Ring programming language version 1.10 book - Part 197 of 212
The Ring programming language version 1.10 book - Part 196 of 212
The Ring programming language version 1.10 book - Part 195 of 212
The Ring programming language version 1.10 book - Part 194 of 212
The Ring programming language version 1.10 book - Part 193 of 212
The Ring programming language version 1.10 book - Part 192 of 212
Ad

Recently uploaded (20)

PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Digital Strategies for Manufacturing Companies
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
medical staffing services at VALiNTRY
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
Transform Your Business with a Software ERP System
PPTX
history of c programming in notes for students .pptx
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Wondershare Filmora 15 Crack With Activation Key [2025
Digital Strategies for Manufacturing Companies
How Creative Agencies Leverage Project Management Software.pdf
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Odoo Companies in India – Driving Business Transformation.pdf
medical staffing services at VALiNTRY
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Transform Your Business with a Software ERP System
history of c programming in notes for students .pptx
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Reimagine Home Health with the Power of Agentic AI​
How to Choose the Right IT Partner for Your Business in Malaysia
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PTS Company Brochure 2025 (1).pdf.......
Design an Analysis of Algorithms I-SECS-1021-03
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Operating system designcfffgfgggggggvggggggggg
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...

The Ring programming language version 1.10 book - Part 25 of 212

  • 1. Ring Documentation, Release 1.10 19.3 Creating and running your first GUI/Mobile Application To learn how to create GUI applications using Ring check the “Desktop and Mobile development using RingQt” chapter. Source Code: Load "guilib.ring" New qApp { new qWidget() { resize(400,400) setWindowTitle("Hello, World!") show() } exec() } In Ring notepad we have a special button to run GUI applications without displaying the console window. 19.3. Creating and running your first GUI/Mobile Application 208
  • 2. Ring Documentation, Release 1.10 The next screen shot present the application during the runtime 19.4 Creating and running your first Web Application To learn how support Ring in your web server and how to create web applications using Ring check the “Web Devel- opment (CGI Library)” chapter. Note: You need to support the Ring language in your web server to be able to run the next example. Source Code: #!ring -cgi load "weblib.ring" Import System.Web new page { text("Hello, World!") } We can run the application in any web browser or in the browser that are embedded in Ring Notepad. 19.4. Creating and running your first Web Application 209
  • 3. Ring Documentation, Release 1.10 For Windows users, Ring comes with Apache Web server! We can run any web application from any folder directly without doing any configuration. 19.5 Creating and running your first Desktop/Mobile Game To learn about creating 2D Games using Ring check the “Demo Project - Game Engine for 2D Games” chapter. Source Code: 19.5. Creating and running your first Desktop/Mobile Game 210
  • 4. Ring Documentation, Release 1.10 Load "gameengine.ring" func main oGame = New Game { title = "My First Game" sprite { type = GE_TYPE_PLAYER x=400 y=400 width=100 height=100 file = "images/player.png" transparent = true Animate=false Move=true Scaled=true } } We can run the application as any GUI application. 19.6 The Main File in the Project The idea of the Main File ToolBar is to determine the main file in the project When the project contains many source code files Using this feature we can run the project (Main File) at any time while opening other files in the project without the need to switch to the Main File to run the project. To quickly use this feature (Open the project main file) Press Ctrl+Shift+M to set the current source code file as the main file 19.6. The Main File in the Project 211
  • 5. Ring Documentation, Release 1.10 Open and modify other source code files in the project To run the project (Main File) at any time press Ctrl+Shift+F5 (GUI) or Ctrl+Shift+D (Console) Screen Shots: 19.7 The File Menu From this menu we can create, open and save the source code files. Another feature in this menu is “Print to PDF” 19.7. The File Menu 212
  • 6. Ring Documentation, Release 1.10 19.8 The Edit Menu From the Edit menu we can Cut, Copy and Paste text. Also we can change the font and the colors. We can Go to a specific line or use the Find and Replace window to find and replace text. Also We can set the Tab Width (Number of Spaces) Starting from Ring 1.8 we have the (Find in Files) option. 19.9 The View Menu From this menu we can show/hide the dockable windows Also we can change the Style of the Ring Notepad Common Styles are (Fusion White and Modern Black) 19.8. The Edit Menu 213
  • 7. Ring Documentation, Release 1.10 Also we can quickly show/hide group of dockable windows based on the context 19.9. The View Menu 214
  • 8. Ring Documentation, Release 1.10 19.10 The Program Menu From this menu we can run the programs Also we can set the Main file in the project 19.11 The Browser Menu From this menu we can quickly open common links in the browser 19.10. The Program Menu 215
  • 9. Ring Documentation, Release 1.10 19.12 The Tools Menu From this menu we can run the Form Designer in separate window Also we can run the REPL (Read-Eval-Print-Loop) application 19.13 The Distribute Menu From this menu we can build an executable file for the application Also we can prepare the application for distribution 19.12. The Tools Menu 216
  • 10. Ring Documentation, Release 1.10 19.14 The Help Menu From this menu we can get the help files (CHM & PDF) 19.14. The Help Menu 217