viernes, 29 de septiembre de 2017

Cambiar formato fecha en CHANGELOG



En el archivo changelog de nuestra aplicación la fecha tiene este formato:

* Tue Jul 25 2017 postapase <uno.cero@live.com> 0.6.320

* Mon Jul 17 2017 postapase <uno.cero@live.com> 0.6.319

* Fri Jul 07 2017 postapase <uno.cero@live.com> 0.6.318

* Sun Jun 11 2017 postapase <uno.cero@live.com> 0.6.3

* Tue Jun 11 2017 postapase <uno.cero@live.com> 0.6.3

en mi caso en VisorRV1960 muestro el archivo changelog para que la gente vea la historia o evolución de la aplicación, pero la fecha en ingles no pega y quería dejarla en español y con otro formato, específicamente con este
( "dddd dd mmmm yyyy" = jueves 28 mayo 2015)

Para eso cree un formulario que solo ejecuta esa tarea.

El resultado queda así:

* martes 25 julio 2017 postapase <uno.cero@live.com> 0.6.320

* lunes 17 julio 2017 postapase <uno.cero@live.com> 0.6.319

* viernes 07 julio 2017 postapase <uno.cero@live.com> 0.6.318

* domingo 11 junio 2017 postapase <uno.cero@live.com> 0.6.3

* domingo 11 junio 2017 postapase <uno.cero@live.com> 0.6.3

Aquí les dejo el código para que puedan usarlo y modificarlo a gusto teniendo ya el 70% del trabajo hecho jaja:

domingo, 10 de septiembre de 2017

Playground (lo nuevo de Gambas)



Gambas ha implementado un nuevo sistema para hacer pruebas online (Scripter), escribiendo código directamente en la web y poder probarlo, si hay errores nos lo indica como podemos apreciar en las imágenes.

Para usarlo simplemente escribimos el código y cuando este pronto hacemos clic en  Run! , y la salida de consola sale en una ventana a la derecha.

También podremos colocar el código con formato Gambas en nuestro Blog o página web.

Después de tener pronto nuestro código clicleamos en Gist ---> Gist link ---> después hacemos clic en copiar código en Embed.



Un ejemplo tenemos en el post anterior a este:
http://novatocodegambas.blogspot.com.uy/2017/09/paint-clip.html

Para poder acceder a esta nueva utilidad vamos a:

https://gambas-playground.proko.eu/

Más información sobre esta herramienta en ingles :( aquí:
http://gambaswiki.org/wiki/playground?nh


Saludos


Paint Clip


Algo que se esta poniendo de moda son las imágenes recortadas en forma de círculo. Bueno aquí les dejo un código algo crudo para que practiquen.





El ejemplo esta en la granja de gambas.

sábado, 2 de septiembre de 2017

Instalar Gambas fácil en Gnu/Linux Mint


Instala Gambas copiando y pegando en la terminal con un solo comando:

sudo add-apt-repository ppa:gambas-team/gambas3 && sudo apt-get update && sudo apt-get install gambas3 



También puedes crear un script:
crea un archivo txt con este contenido:

------------------------------------------------------------------------ inicio
#!/bin/bash
sudo add-apt-repository ppa:gambas-team/gambas3 && sudo apt-get update && sudo apt-get install gambas3

------------------------------------------------------------------------- fin

Renombralo a por ejemplo instalar_gambas.sh

dale permisos de ejecución: chmod +x instalar_gambas.sh

ejecutalo: bash instalar_gambas.sh

el operador de control && hace que si el primer comando se ejecuto sin errores ejecute el siguiente comando y así sucesivamente.


 Saludos

domingo, 13 de agosto de 2017

Usando JavaScript, Html y Css en Gambas3


Hay mucho código en otros lenguajes que podemos utilizar en Gambas.
Aquí les dejo un ejemplo de como usar la librería chessboard-0.3.0.js JavaScript.
Es interesante puesto que debemos aprender a manejar, un archivo html y como vincular y manipular archivos javascript y css.

Necesario activar el componente gb.qt4.webkit

Archivo Html que incrustaremos en un WebView:

<!doctype html>
<html>

<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>JavaScript, Html y css en Gambas</title>
<base href="http://chessboardjs.com/" />

<link rel="stylesheet" href="css/chessboard.css" />
</head>

<body>

<center><div id="board" style="width: 400px"></div>

<input type="button" id="setRookCheckmateBtn" value="Jake Mate" />
<input type="button" id="setStartBtn" value="Posición inicial" />
<input type="button" id="clearBoardBtn" value="Borrar piezas" />
<input type="button" id="flipOrientationBtn" value="Girar tablero" />

<p><a href="https://novatocodegambas.blogspot.com.uy/">https://novatocodegambas.blogspot.com.uy/</a></p>
<p><a href="http://chessboardjs.com/">http://chessboardjs.com</a></p>
</center>
<h6>by postapase</h6>

<script src="js/json3.min.js"></script>
<script src="js/jquery-1.10.1.min.js"></script>
<script src="js/chessboard.js"></script>
<script>

var init = function() {

//--- start example JS ---
var ruyLopez = 'r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R';
var board = ChessBoard('board', ruyLopez);

$('#setStartBtn').on('click', board.start);

$('#clearBoardBtn').on('click', board.clear);

$('#flipOrientationBtn').on('click', board.flip);

$('#setRookCheckmateBtn').on('click', function() {
board.position({
a4: 'bK',
c4: 'wK',
a7: 'wR'
});
});

}; // end init()
$(document).ready(init);

</script>
</body>
</html>


En el Formulario:

Public Sub Form_Open()

WebView1.Url = "js/Html1.html"

End



El ejemplo esta disponible para su descarga en la Granja de Gambas

Nota: si vos tenes algún proyecto o ejemplo de este tipo me gustaría que lo compartieras, saludos.

sábado, 12 de agosto de 2017

Ejemplo de uso de FromUrl




 Una de las cosas que nos pasa siempre a los novatos es comprender en que situación se puede aplicar un código. Este es el caso de FromUrl que es para decodificar una url, que no es mas ni menos que cambiar el formato de un texto a otro.

 En este ejemplo arrastraremos un sin fin de archivos y el sistema nos da una cadena con caracteres raros y otros innecesarios.

Ejemplo de la info que da el sistema al arrastrar un archivo .mp3 obtenida mediante Drag.Data en el evento Drop:


file:///home/user10/Escritorio/Whitney%20Houston%20-%20I%20Have%20Nothing%20(Official%20Video).mp3

-28:-60:70:70

después del proceso:

/home/user10/Escritorio/Whitney Houston - I Have Nothing (Official Video).mp3

 
http://gambaswiki.org/wiki/lang/fromurl?l=es&nl

Necesario tener tildado componente gb.desktop para poder usar Desktop.Open()


' gambas class file

'by postapase
'https://novatocodegambas.blogspot.com.uy/
'Ejemplo de FromUrl

Public Sub Form_Drop()

Dim divide As New String[]
Dim Ruta As String

TextArea1.Text = Drag.Data

divide = Split(Drag.Data, "\r\n")

Ruta = String.Right(FromUrl$(divide[0]), -7)

TextBox1.Text = Ruta



 If chkAuto.Value Then Desktop.Open(Ruta)

End

Descargar de DropBox: FromUrl-0.0.1.tar.gz


viernes, 11 de agosto de 2017

Granja OffLine By Postapase Agosto 2017




Nuevo paquete con 286 proyectos gamberos, 73 nuevos!!
Tenemos: Nombre proyecto, versión por un lado y entre parentesis,
tenemos: autor, descargas del proyecto y full descargas, que es cuando hay varias versiones de un proyecto, es lo que contabiliza.



286 Proyectos disponibles

101010_Text_editor 0.1.0.bz2           (cogier - 87/87)
15PuzzleGame 0.2.0.bz2                 (cogier - 53/78)
15PuzzleGame 0.3.0.bz2                 (cogier - 25/78)
1945 0.0.7.bz2                         (jsbsan - 902/902)
ActivarDesactivarSonidos 0.1.0.bz2     (postapase - 114/114)
Alarm_Timer 1.0.0.bz2                  (cogier - 46/46)
AnalogLeftTurnWatch 1.0.2.bz2          (Example - 110/110)
AnalogWatch 1.0.0.bz2                  (Example - 437/437)
AnalogWatch1 1.0.2.bz2                 (Example - 255/255)
Arduino-Gambas 1.0.2.bz2               (UZI - 143/143)
Arduino_Uno 1.0.1.bz2                  (RolfDahl-skogStade - 81/81)
AsistenteTM 0.1.8.bz2                  (Postapase - 75/75)
AutoUpdater 1.0.11.bz2                  (cogier - 130/130)
BTC_CALC 1.0.23.bz2                     (Ozymandias - 24/24)
Barcode 3.0.0.bz2                      (Barras_Victor - 191/191)
BarcodeCreator 0.1.0.bz2               (cogier - 342/491)
BarcodeCreator 0.2.0.bz2               (cogier - 149/491)
Base2017 1.1.0.bz2                     (RobertoBormida - 19/19)
Base2017_v1_3 1.3.0.bz2                (RobertoBormida - 9/9)
BeastScroll 1.1.0.bz2                  (Example - 346/346)
Brightness 1.1.1.bz2                   (Genex1000 - 5/5)
CapturarVentanaActiva 0.1.0.bz2        (postapase - 47/47)
ChartExample 0.1.1.bz2                 (cogier - 118/118)
CheckDigitGenerator 1.0.0.bz2          (Devtronics - 25/25)
Christmas 2.0.0.bz2                    (Piga_Software - 59/59)
ClamScan 1.1.3.bz2                     (Ozymandias - 31/31)
Clase_Persona 0.1.0.bz2                (Postapase - 247/247)
Clase_Persona2 0.1.1.bz2               (Postapase - 105/105)
Clase_Respaldo 0.1.0.bz2               (Postapase - 102/102)
ClasesPadre_e_Hijo 0.1.0.bz2           (Postapase - 127/127)
ClientSocket 1.0.0.bz2                 (Example - 537/537)
ClockWf 2.4.7.bz2                      (Naubaddi - 90/90)
ColorButtonSave 0.1.0.bz2              (Postapase - 27/27)
ColorPaletteColorsDefaults 0.1.0.bz2   (postapase - 31/31)
Contactos 0.1.8.bz2                    (Postapase - 121/121)
ControlPersonalizado 0.1.1.bz2         (postapase - 18/18)
DB-diff 0.3.16.bz2                      (smso - 252/252)
DBusExplorer 1.0.0.bz2                 (Example - 260/260)
DamasInglesas 0.1.0.bz2                (jsbsan - 160/160)
DataBaseExample 0.0.1.bz2              (Keywild - 2065/2065)
DemoReport 0.1.0.bz2                   (Gambix - 315/315)
DescargaYoutube 0.0.5.bz2              (jsbsan - 246/246)
DescargaYoutube 0.1.0.bz2              (jspan - 296/296)
DocumentView 1.0.0.bz2                 (Example - 375/375)
Dogmascotas 1.0.3.bz2                  (RositaAlvarez - 81/81)
Dungeon-Mazing 0.1.0.bz2               (HowToPhil - 238/238)
DynamicMatrixExample 0.1.4.bz2         (Gianluigi - 221/221)
Ejemplo_Blob(sqlite3) 0.1.0.bz2        (Postapase - 206/206)
Elianas_Game 0.1.36.bz2                 (CamEra - 108/108)
Escaleta 0.2.8.bz2                     (jsbsan - 90/90)
Expand_Swap 1.0.3.bz2                  (Ozymandias - 13/13)
ExpandingForms 0.1.1.bz2               (cogier - 356/356)
ExplainTextBox 0.1.3.bz2               (Gambas-Buch - 173/173)
FileBackup 0.1.0.bz2                   (postapase - 60/60)
File_Downloader 0.1.1.bz2              (Http_File_Downloader - 117/117)
FindFiles 2.0.22.bz2                    (cogier - 154/154)
FlyerIvasion 0.1.3.bz2                 (MovigaTechnologies - 66/66)
Formel-X 1.1.7.bz2                     (Naubaddi - 53/53)
Fractal 1.0.0.bz2                      (Example - 287/287)
Fruho_Installer 1.0.3.bz2              (Ozymandias - 21/21)
GAlarm 0.1.96.bz2                       (Jussi - 160/307)
GAlarm 0.2.23.bz2                       (Jussi - 147/307)
GBrubik 0.1.8.bz2                      (Martin - 344/344)
GChroot 0.0.53.bz2                      (GPrimeriso1 - 162/162)
GNUBoxWorld 1.0.0.bz2                  (Example - 246/246)
GPI-X11TaskbarExample 0.1.0.bz2        (GambasPI - 180/180)
GWI_Clock 0.1.0.bz2                    (InnovaDesktop - 86/86)
GamBreak 0.1.3.bz2                     (Shane - 123/123)
GamInvadeV2 0.1.1.bz2                  (Shane - 97/97)
GambasGears 3.8.90.bz2                  (Princeton - 346/346)
GambasTester 0.9.49.bz2                 (Jussi - 115/115)
GambasTestercmd 0.9.49.bz2              (Jussi - 79/79)
GameOfLife 1.0.0.bz2                   (Example - 257/257)
GentlemanBrowser 0.1.0.bz2             (FelipeReyes - 22/22)
Governors_GUI 1.0.3.bz2                (Ozymandias - 25/25)
GradientProgressBar 0.1.1.bz2          (Dmitry-Kleeshen - 378/378)
GraphFloodfill 0.2.1.bz2               (Gambas-Buch - 170/170)
Graphviz 0.1.5.bz2                     (Gambas-Buch - 95/95)
GuitarTuner 2.1.1.bz2                  (Henry - 75/75)
HTTPGet 1.0.0.bz2                      (Example - 447/447)
HTTPPost 1.0.0.bz2                     (Example - 366/366)
Hashrat_Gui 0.9.14.bz2                  (Ozymandias - 21/24)
Hashrat_Gui 1.0.6.bz2                  (Ozymandias - 3/24)
HighlightEditor 1.0.0.bz2              (Example - 312/312)
IPTV 0.1.0.bz2                         (WebOss - 234/234)
Imenik 0.1.1.bz2                       (WebOss - 45/45)
InfoDataBaseSQL 0.1.81.bz2              (postapase - 299/299)
InfoDataBaseSQL 0.1.81.bz2              (programa00leo30 - 67/67)
Innova 0.1.3.bz2                       (InnovaDesktop - 494/494)
Innova_Panel 0.1.5.bz2                 (InnovaDesktop - 282/282)
Karvonen 1.0.2.bz2                     (Fhabrike - 40/40)
LCDClock 1.0.0.bz2                     (cogier - 112/112)
LCDLabel 1.0.0.bz2                     (Example - 608/608)
Lanzador 0.8.8.bz2                     (Kerberos - 37/37)
LinuxInfo 1.0.0.bz2                    (WebOSS - 20/20)
LoboMau 1.0.2.bz2                      (Tardis96 - 4/4)
Lupita 0.1.0.bz2                       (jsbsan - 30/30)
MP3Info 0.1.1.bz2                      (AJMSoftware - 6/23)
MP3Info 0.2.0.bz2                      (AJMSoftware - 17/23)
Md2Model 1.0.0.bz2                     (Example - 262/262)
MediaPlayer 1.0.0.bz2                  (Example - 1336/1336)
MenuExample 0.1.1.bz2                  (cogier - 224/224)
Metronome 2.1.1.bz2                    (Tux - 167/167)
MineGame 1.3.6.bz2                     (Torto - 633/633)
MineSweeper 1.0.0.bz2                  (Example - 327/327)
MineSweeper 1.0.0.bz2                  (inievam - 103/103)
Moka-VC 1.0.0.bz2                      (AreaDev - 69/69)
Mp3Player 1.0.3.bz2                    (Shane - 19/19)
NeHeTutorial 3.8.90.bz2                 (Gambas - 121/121)
NewProject 1.0.4.bz2                   (Phil - 79/79)
Novelister 0.1.6.bz2                   (HowToPhil - 42/42)
ObserverExample2 0.1.0.bz2             (postapase - 33/33)
OnOffSwitch 0.1.0.bz2                  (postapase - 12/12)
OpenAL 1.0.1.bz2                       (Eight_Virtues - 375/375)
Othello-2 1.0.0.bz2                    (UZI - 37/37)
PCInfo 0.1.0.bz2                       (InnovaDesktop - 164/1985)
PCInfo 0.2.0.bz2                       (InnovaDesktop - 83/1985)
PCInfo 0.3.0.bz2                       (InnovaDesktop - 366/1985)
PCInfo 0.4.0.bz2                       (InnovaDesktop - 411/1985)
PCInfo 0.5.11.bz2                       (InnovaDesktop - 961/1985)
PCInfo_Web 0.5.9.bz2                   (InnovaDesktop - 106/106)
PCStats 0.3.0.bz2                      (cogier - 147/147)
PDFEncrypt 2.1.0.bz2                   (WG - 23/23)
PManager 1.1.6.bz2                     (Henry - 48/48)
PROYECTOFOTO 1.1.1.bz2                 (JoseRene - 9/9)
PaintRotate 0.1.0.bz2                  (postapase - 9/9)
Painting 1.0.0.bz2                     (Example - 338/338)
PhotoTouch 1.0.0.bz2                   (Example - 570/570)
PhpWeathermapEditor 0.9.0.bz2          (OlivierCruilles - 72/72)
PiCam 0.2.6.bz2                        (cogier - 79/79)
Piano 0.1.1.bz2                        (cogier - 191/191)
PictureDatabase 3.0.90.bz2              (Princeton - 676/676)
Pinger 0.1.0.bz2                       (cogier - 39/39)
Plinx 1.1.2.bz2                        (DmitryKlisheen - 132/132)
Plugins 0.1.0.bz2                      (Gambas-Buch - 90/302)
Plugins 0.3.0.bz2                      (Gambas-Buch - 212/302)
Pong 0.1.0.bz2                         (cogier - 34/34)
PrintSuite2 1.0.0.bz2                  (LollixSoftwareHouse - 56/56)
Printing 1.0.0.bz2                     (Example - 588/588)
ProCookTimer 1.0.0.bz2                 (cogier - 82/82)
Programador_Horario 1.0.1.bz2          (Rolf - 31/31)
Programing_helper_en 0.1.1.bz2         (ilo - 123/123)
ProgressBarText 3.4.2.bz2              (didier18 - 153/153)
ProgressBarTray 2.1.24.bz2              (didier18 - 27/27)
ProgressBarTray 2.1.9.bz2              (ddier18 - 29/29)
QRCreator 1.2.0.bz2                    (cogier - 195/195)
QuasiRegular 1.0.0.bz2                 (Example - 103/103)
Qview 1.0.0.bz2                        (AreaDev - 30/30)
RamDrive 0.9.13.bz2                     (Ozymandias - 17/123)
RamDrive 1.0.0.bz2                     (Ozymandias - 18/123)
RamDrive 1.2.2.bz2                     (Ozymandias - 27/123)
RamDrive 1.3.6.bz2                     (Ozymandias - 32/123)
RamDrive 1.5.0.bz2                     (Ozymandias - 29/123)
RandomColorSort 1.0.0.bz2              (Example - 136/136)
Registro 0.1.1.bz2                     (postapase - 136/136)
ReportExample 3.6.90.bz2                (Example - 739/739)
ReportTextArea 0.1.0.bz2               (Postapase - 310/310)
SDLClicker 0.1.2.bz2                   (Shane - 6/6)
SearchBrowser2 1.3.5.bz2               (smso - 157/157)
ServerSocket 1.0.0.bz2                 (Example - 587/587)
ServerSocket 1.0.0.bz2                 (Exampled - 42/42)
SimpleEval 0.1.1.bz2                   (gambix - 96/296)
SimpleEval 0.2.0.bz2                   (gambix - 200/296)
SliderFont 0.1.2.bz2                   (ShordiSoft - 11/11)
SmallWiki 1.0.1.bz2                    (Example - 505/505)
Speedtest_Gui 0.9.6.bz2                (Ozymandias - 25/42)
Speedtest_Gui 1.0.4.bz2                (Ozymandias - 17/42)
SpiderSecureChat 0.9.20.bz2             (Westwood - 118/118)
SpritesGamberos 0.1.0.bz2              (postapase - 28/28)
Squares 0.1.1.bz2                      (HowToPhil - 140/140)
StockCalculator 1.0.0.bz2              (Mohamed_Hajjaj - 18/18)
TableEdit 0.1.2.bz2                    (Shordi - 129/129)
Tablet 1.0.0.bz2                       (Example - 140/140)
Taller_2015 0.1.8.bz2                  (postapase - 328/985)
Taller_2015 0.3.85.bz2                  (postapase - 657/985)
Tanteador 0.6.54.bz2                    (postapase - 92/92)
TareaCarnaval 1.0.1.bz2                (IrvinSantana - 32/32)
TarzanHorloge 2.8.1.bz2                (RCF - 32/32)
Temp_2_LCD 1.0.0.bz2                   (Ozymandias - 47/47)
Thermometre 0.1.1.bz2                  (didier18 - 348/348)
TunnelSDL 1.0.0.bz2                    (Example - 295/295)
UUCrypt 0.1.2.bz2                      (HowToPhil - 51/51)
Une 0.1.2.bz2                          (postapase - 20/20)
UnitySC_V0.7 0.7.0.bz2                 (JePe - 53/53)
UpdocSystem_V10 10.0.0.bz2             (Goranflo - 13/13)
UsoDeFuncionExterna 0.1.0.bz2          (postapase - 47/47)
Util 1.0.52.bz2                         (Dane - 70/70)
UtilD 1.0.52.bz2                        (Dane - 39/39)
VerticalProgressBar 0.1.1.bz2          (Moviga - 43/133)
VerticalProgressBar 0.2.0.bz2          (Moviga - 90/133)
VerySimpleVideoPlayer 0.1.0.bz2        (Example - 293/293)
VerySimpleVideoPlayer 0.2.1.bz2        (cogier - 162/162)
VideoPlayer 0.1.3.bz2                  (cogier - 237/237)
VirtualDVD 0.1.4.bz2                   (DemosthenesKoptsis - 145/145)
VisorRV1960 0.6.321.bz2                  (postapase - 111/111)
WatchGambasDirectory 3.8.90.bz2         (Gambas-Buch - 143/143)
WebBrowser 1.0.3.bz2                   (Example - 1031/1031)
ZeitSicherungen 1.0.0.bz2              (cd-bahia - 30/30)
api_ruteros 0.1.1.bz2                  (LeandroMorala - 35/35)
avisaMail 0.4.2.bz2                    (shordi - 86/86)
ayudame 0.1.0.bz2                      (Postapase - 124/124)
bilhar 0.1.1.bz2                       (DiogoSantos - 44/44)
bitch 1.1.3.bz2                        (senju - 62/62)
bluedemonvirus 0.1.0.bz2               (aztk - 44/44)
cleanup_Gambas3_recent_list 0.3.3.bz2  (smso - 66/66)
comisat-gc 0.5.32.bz2                   (comisatGamesCollection - 3/3)
dblist 1.1.1.bz2                       (levingtinoco - 80/80)
define 3.9.11.bz2                       (ViSys - 86/86)
dnes-gui 1.0.2.bz2                     (MarcioEsper - 92/92)
doubleeditor 1.0.1.bz2                 (Miao-You - 59/59)
eSpeakGUI 0.1.0.bz2                    (cogier - 330/330)
fbcolor 0.1.4.bz2                      (postapase - 73/73)
findfocus 0.1.0.bz2                    (Deganius - 158/158)
fontname 0.1.2.bz2                     (postapase - 53/53)
gambas-captcha 1.0.17.bz2               (Gambas - 116/116)
gambas-extra-functions 0.1.0.bz2       (belmotek - 41/41)
gardenmanager 0.1.0.bz2                (brichman - 57/57)
gb.PiconZero 1.0.0.bz2                 (MatthewCollins - 7/29)
gb.PiconZero 1.1.0.bz2                 (MatthewCollins - 22/29)
gb.deg.form 3.9.37.bz2                  (gb - 138/138)
gb.deg.unittest 3.9.10.bz2              (gb - 41/41)
gb.pushbutton 0.1.0.bz2                (InnovaDesktop - 48/48)
gb.snmpclient 0.1.13.bz2                (OlivierCruilles - 39/39)
gb.sshFS 0.3.3.bz2                     (smso - 167/167)
gb.sshclient 1.1.5.bz2                 (OlivierCruilles - 121/121)
gbBugTracker3 3.0.38.bz2                (OlivierCruilles - 98/98)
gbCalc 0.1.0.bz2                       (InnovaDesktop - 35/35)
gbCalculator 0.1.0.bz2                 (cogier - 470/470)
gbClock 0.2.0.bz2                      (InnovaDesktop - 432/432)
gbDocEditor 0.9.11.bz2                  (OlivierCruilles - 332/332)
gbLauncher 0.1.12.bz2                   (shordi - 48/48)
gbRoadBookMoto 0.8.0.bz2               (OlivierCruilles - 54/54)
gbSvnCheckVersion 3.1.3.bz2            (OlivierCruilles - 15/15)
gbTerminal 0.1.6.bz2                   (InnovaDesktop - 790/790)
gbWeather 0.1.12.bz2                    (AJMSoftware - 39/39)
geiv 0.1.1.bz2                         (Gambas-Buch - 67/67)
generadorcarnet 0.0.51.bz2              (jsbsan - 551/551)
gplanet 0.1.2.bz2                      (jsbsan - 93/93)
group 0.1.0.bz2                        (cogier - 58/58)
haramaru-radio-player 42.1.4.bz2       (Integrated Data Thought Entity - 280/280)
helptranslator 0.0.6.bz2               (Jsbsan - 129/129)
helptranslator 0.1.11.bz2               (jsbsan - 87/87)
higgins 0.5.0.bz2                      (kokoko3k - 67/141)
higgins 0.7.390.bz2                      (kokoko3k - 74/141)
htEditor 1.0.14.bz2                     (shordi - 150/150)
iloSerialPort 0.1.2.bz2                (ilo - 248/248)
jackadd 0.1.1.bz2                      (COBRASoft - 77/77)
konvertilo 0.1.0.bz2                   (Belmotek - 5/5)
lmars 0.1.0.bz2                        (CamEra - 68/68)
miApp 5.0.1.bz2                        (Ronald - 38/38)
miPrimerPrograma 1.0.2.bz2             (juanpablo - 18/18)
mismarcadores 0.1.2.bz2                (jsbsan - 37/37)
nagato-map 0.11.4.bz2                  (Integrated Data Thought Entity - 228/228)
nagato-taskmanager 42.1.3.bz2          (Integrated Data Thought Entity - 189/189)
nagato-wallpaper 0.12.2.bz2            (Integrated Data Thought Entity - 108/108)
nagato-weather 42.1.4.bz2              (Integrated Data Thought Entity - 65/65)
nagato-writer 42.1.9.bz2               (Integrated Data Thought Entity - 352/352)
nozomi-dev 0.1.1.bz2                   (nozomichan-factory - 77/77)
observadorBoton 0.1.0.bz2              (postapase - 51/51)
pageGrid 0.1.1.bz2                     (Shordi - 25/25)
paginateGridView 1.0.1.bz2             (UZI - 58/58)
pikyaz 0.1.238.bz2                       (AbdurrahmanUlusoy - 8/8)
pikyaz 0.1.250.bz2                       (abdurrahmanulusoy - 3/3)
pintaScreen 0.0.63.bz2                  (Jsbsan - 447/447)
piramide_avec_modules 1.0.1.bz2        (froidevaux - 39/39)
pyrit_gui 1.0.2.bz2                    (Kerberos - 56/56)
pyrit_gui_v2 2.0.18.bz2                 (Ozymandias - 35/35)
researcher 1.0.0.bz2                   (Mohamed_Haggag - 40/40)
sbSizeFont 0.1.4.bz2                   (postapase - 10/10)
settings 1.0.0.bz2                     (cogier - 46/46)
solanum 0.1.0.bz2                      (Belmotek - 10/10)
splash 0.1.0.bz2                       (cogier - 98/98)
test 0.1.1.bz2                         (test - 43/43)
tradukisto 0.1.0.bz2                   (belmotek - 6/6)
tres 0.0.3.bz2                         (jsbsan - 245/245)
uniIR3 0.1.6.bz2                       (ilo - 44/44)
vinilo 0.1.0.bz2                       (belmotek - 7/7)
vrecentfilesd 0.1.9.bz2                (paddys-hill - 174/174)
wGridFilterSample 0.1.1.bz2            (Shordi - 13/13)
waiter 0.1.1.bz2                       (shordi - 47/47)
wolfsorter3-beta 2.9.2.bz2             (Octavio M.P. - 42/42)
wordWrapGrid 0.1.2.bz2                 (Shordi - 73/73)
xkcd-reader 0.2.1.bz2                  (Integrated Data Thought Entity - 130/130)
xt7-player-mpv 0.12.381.bz2              (AntonioOrefice - 112/672)
xt7-player-mpv 0.20.390.bz2              (AntonioOrefice - 143/672)
xt7-player-mpv 0.8.3371.bz2               (AntonioOrefice - 417/672)

Mega:  goo.gl/za7ydP

Dropbox:  goo.gl/3GbG5v

Contraseña:  postapase

viernes, 4 de agosto de 2017

Paint Rotate


La clase Paint es potente y difícil si se quiere, por eso hay que hacer practicas de pequeños ejercicios con una función determinada para ir comprendiendo el funcionamiento de Paint.
Les dejo un ejemplo de como usar el método Rotate de la clase paint.
Espero les sirva para sus practicas y mejorar así su conocimiento sobre la clase.



' gambas class file

'by postapase 04 agosto 2017

Private Const IMAGE_NAME As String = "clovis.jpg"
Private Angulo As Float

Public Sub Form_Open()

End

Public Sub DrawingArea1_Draw()

Dim X, Y, W, H As Float
Dim hBrush As PaintBrush
Dim hImage As Image

hImage = Image.Load(IMAGE_NAME)

X = 0
Y = 0
W = 200
H = 200

hBrush = Paint.Image(hImage)
Paint.Brush = hBrush
Paint.Rectangle(X, Y, W, H)

Paint.Translate(100, 100)
Paint.Rotate(Angulo)
Paint.Translate(-100, - 100)

Paint.Fill

End

Public Sub Slider1_Change()

Angulo = Rad(Slider1.Value)
Print "--> " & Rad(Slider1.Value)
DrawingArea1.Refresh()

End

Public Sub Slider2_Change()

Angulo = Rad(- Slider2.Value)
Print "--> " & Rad(- Slider2.Value)
DrawingArea1.Refresh()

End

Public Sub Button1_Click()

Angulo = -1.5707963267949
DrawingArea1.Refresh()

End

Public Sub Button2_Click()

Angulo = -3.14159265358979
DrawingArea1.Refresh()

End

Public Sub Button3_Click()

Angulo = -4.71238898038469
DrawingArea1.Refresh()

End

Public Sub Button4_Click()

Angulo = -6.28318530717959
DrawingArea1.Refresh()

End


El código fuente esta en la Granja Gambas

viernes, 28 de julio de 2017

Usando y probando argumentos en Gambas

Captura Hecha con PintaScreen

Bueno aquí les dejo un vídeo de como crear argumentos y probarlos.
Para ver el código en la clase de inicio descarga de la Granja de Gambas el proyecto VisorRV1960.

Args

http://gambaswiki.org/wiki/comp/gb/args?l=es&nl


Public Sub Main()

Dim a As Integer
Dim Argumento As String

For a = 1 To Args.Max
Argumento = Args[a]
If Argumento = "--version" Or If Argumento = "-v" Then
Print "VisorRV1960 versión " & Application.Version
Quit
Else If Argumento = "--help" Or If Argumento = "-h" Then
Print File.Load("textos/comando")
Quit
Else If Argumento = "--azar" Or If Argumento = "-a" Then
Print cmdAzar.VersiculoAzar()
Quit
Else
Print "Comando desconocido: " & Argumento
Print "Prueba--> VisorRV1960 --help"
Quit
Endif
Next

FMain.Show()

If Settings["Opciones/Azar", False] = True Then azar.ShowModal

End

jueves, 13 de julio de 2017

Une





Idea básica para armar un programa de este tipo.
Observalo en youtube:



' gambas class file

Public Cantidad_Sprites As Picture[]
Public XpictureBox As PictureBox
Public TagOrdenado As String[]
Public Repeticiones As Integer = 200
Public Intentos As Integer

Public PICactual As Picture
Public pbActual As PictureBox

Public Sub Form_Open()

Label1.Text = "by postapase v. " & Application.Version

ReiniciarVariables()

SepararImagenes("casa.jpeg", 3, 3)

End

Public Sub SepararImagenes(path As String, filas As Integer, columnas As Integer)
'subrutina extraida y modificada del ejemplo de Julio 1945

Dim i As Image
Dim fila As Integer
Dim columna As Integer
Dim imagenAncho As Integer
Dim imagenLargo As Integer
Dim fichero As Picture
Dim contador As Integer = 1
Dim ruta As String
Dim a As Integer

i = Image.Load(path)
PictureBox1.Visible = False
PictureBox1.Picture = Picture.Load(path)

Cantidad_Sprites = New Picture[]

imagenAncho = i.w / columnas
imagenlargo = i.h / filas

For fila = 1 To filas
For columna = 1 To columnas

fichero = New Picture(imagenAncho, imagenLargo, Color.Transparent)
Paint.Begin(fichero)

Paint.DrawImage(i, 0, 0, imagenAncho, imagenLargo, 1, Rect((columna - 1) * imagenAncho, (fila - 1) * imagenLargo, imagenancho, imagenlargo))
Paint.Stroke()
Paint.Fill
Paint.End()
Wait 0.1
ruta = "/tmp/dibujo" & Str$(contador) & ".png"
fichero.Save(ruta)
Wait 0.1
Cantidad_Sprites.Add(fichero)
TagOrdenado.Add(ruta)

Select Case contador
Case 1
pb1.Tag = ruta
Case 2
pb2.Tag = ruta
Case 3
pb3.Tag = ruta
Case 4
pb4.Tag = ruta
Case 5
pb5.Tag = ruta
Case 6
pb6.Tag = ruta
Case 7
pb7.Tag = ruta
Case 8
pb8.Tag = ruta
Case 9
pb9.Tag = ruta
End Select

contador += 1

Next
Next

For a = 1 To Repeticiones
Desordenar()
Next

Refrescar2()

End

Public Sub btnOtraImagen_Click()


Dialog.Path = User.Home
Dialog.Filter = ["*.png;*.jpg;*.jpeg;*.bmp", "Picture files"]

If Dialog.OpenFile() Then Return

Select Case File.Ext(Dialog.Path)
Case "png", "jpg", "jpeg", "bmp"
Case Else
Message.Error("Imagen no válida!")
Return
End Select

ReiniciarVariables()

SepararImagenes(Dialog.Path, 3, 3)

End

Public Sub parte2_Drag()

Print Last.Name
XpictureBox.Drag(XpictureBox.Picture)

End

Public Sub parte2_Drop()

Print Last.Name

End

Public Sub parte2_DblClick()

Print Last.Name

End

Public Sub pb9_MouseDrag()

Drag.Icon = pb9.Picture

If Mouse.Left Then
pb9.Drag(pb9.Tag)
Endif

End

Public Sub pb8_Drop()

Dim MiTag As String

MiTag = pb8.Tag

pb8.Picture = Picture.Load(Drag.Data)
pb8.Tag = Drag.Data

Drag.Source.Tag = MiTag
Refrescar()

End

Public Sub pb6_MouseDrag()

Drag.Icon = pb6.Picture

If Mouse.Left Then
pb6.Drag(pb6.Tag)

Endif

End

Public Sub Refrescar()

pb1.Picture = Picture.Load(pb1.Tag)
pb2.Picture = Picture.Load(pb2.Tag)
pb3.Picture = Picture.Load(pb3.Tag)

Wait 0.2

pb4.Picture = Picture.Load(pb4.Tag)
pb5.Picture = Picture.Load(pb5.Tag)
pb6.Picture = Picture.Load(pb6.Tag)

Wait 0.2

pb7.Picture = Picture.Load(pb7.Tag)
pb8.Picture = Picture.Load(pb8.Tag)
pb9.Picture = Picture.Load(pb9.Tag)

If Intentos > 5 Then
btnSolucion.Visible = True
Endif

Inc Intentos

End

Public Sub Desordenar()

Dim max As Integer
Dim uno As Integer
Dim dos As Integer

Randomize
max = TagOrdenado.Max

uno = Rand(0, max)
dos = Rand(0, max)

Repeat
dos = Rand(0, max)
Until uno <> dos

Swap TagOrdenado[uno], TagOrdenado[dos]

End

Public Sub Refrescar2()

pb1.Tag = TagOrdenado[0]
pb2.Tag = TagOrdenado[1]
pb3.Tag = TagOrdenado[2]

pb4.Tag = TagOrdenado[3]
pb5.Tag = TagOrdenado[4]
pb6.Tag = TagOrdenado[5]

pb7.Tag = TagOrdenado[6]
pb8.Tag = TagOrdenado[7]
pb9.Tag = TagOrdenado[8]

pb1.Picture = Null
pb2.Picture = Null
pb3.Picture = Null
pb4.Picture = Null
pb5.Picture = Null
pb6.Picture = Null
pb7.Picture = Null
pb8.Picture = Null
pb9.Picture = Null

Wait 0.5

Refrescar()

End

Public Sub pb5_MouseDrag()

Drag.Icon = pb5.Picture

If Mouse.Left Then
pb5.Drag(pb5.Tag)

Endif

End

Public Sub pb9_Drop()

Dim MiTag As String

MiTag = pb9.Tag

pb9.Picture = Picture.Load(Drag.Data)
pb9.Tag = Drag.Data

Drag.Source.Tag = MiTag
Refrescar()

End

Public Sub pb7_Drop()

Dim MiTag As String

MiTag = pb7.Tag

pb7.Picture = Picture.Load(Drag.Data)
pb7.Tag = Drag.Data

Drag.Source.Tag = MiTag
Refrescar()

End

Public Sub pb6_Drop()

Dim MiTag As String

MiTag = pb6.Tag

pb6.Picture = Picture.Load(Drag.Data)
pb6.Tag = Drag.Data

Drag.Source.Tag = MiTag
Refrescar()

End

Public Sub pb5_Drop()

Dim MiTag As String

MiTag = pb5.Tag

pb5.Picture = Picture.Load(Drag.Data)
pb5.Tag = Drag.Data

Drag.Source.Tag = MiTag
Refrescar()

End

Public Sub pb7_MouseDrag()

Drag.Icon = pb7.Picture

If Mouse.Left Then
pb7.Drag(pb7.Tag)

Endif

End

Public Sub pb4_MouseDrag()

Drag.Icon = pb4.Picture

If Mouse.Left Then
pb4.Drag(pb4.Tag)

Endif

End

Public Sub pb8_MouseDrag()

Drag.Icon = pb8.Picture

If Mouse.Left Then
pb8.Drag(pb8.Tag)
Endif

End

Public Sub pb1_MouseDrag()

Drag.Icon = pb1.Picture

If Mouse.Left Then
pb1.Drag(pb1.Tag)

Endif

End

Public Sub pb2_MouseDrag()

Drag.Icon = pb2.Picture

If Mouse.Left Then
pb2.Drag(pb2.Tag)

Endif

End

Public Sub pb3_MouseDrag()

Drag.Icon = pb3.Picture

If Mouse.Left Then
pb3.Drag(pb3.Tag)

Endif

End

Public Sub pb4_Drop()

Dim MiTag As String

MiTag = pb4.Tag

pb4.Picture = Picture.Load(Drag.Data)
pb4.Tag = Drag.Data

Drag.Source.Tag = MiTag
Refrescar()

End

Public Sub pb1_Drop()

Dim MiTag As String

MiTag = pb1.Tag

pb1.Picture = Picture.Load(Drag.Data)
pb1.Tag = Drag.Data

Drag.Source.Tag = MiTag
Refrescar()

End

Public Sub pb2_Drop()

Dim MiTag As String

MiTag = pb2.Tag

pb2.Picture = Picture.Load(Drag.Data)
pb2.Tag = Drag.Data

Drag.Source.Tag = MiTag
Refrescar()

End

Public Sub pb3_Drop()

Dim MiTag As String

MiTag = pb3.Tag

pb3.Picture = Picture.Load(Drag.Data)
pb3.Tag = Drag.Data

Drag.Source.Tag = MiTag
Refrescar()

End

Public Sub btnDesordenar_Click()

Desordenar()
Refrescar2

End

Public Sub ReiniciarVariables()

PBactual = New PictureBox(Me)
TagOrdenado = New String[]
Intentos = 0
btnSolucion.Visible = False

End

Public Sub btnSolucion_Click()

PictureBox1.Visible = Not PictureBox1.Visible

End

Public Sub cbxFotos_Click()

ReiniciarVariables()

SepararImagenes(cbxFotos.Text, 3, 3)

End



El ejemplo se encuentra en la granja de gambas.