Yangi formatda davom etish uchun: https://uzfor.net/view.php?act=post&id=49132
Postga havola
NetLizard [1846] [ban]
Endi dasturlarda screenshot funksiyasini hech qanday qiyinchiliksiz qilishingiz mumkin.Funksiya sodda va tezkor qilib yaratildi.
Funksiyani ishga tushirish juda oddiy "app.ScreenShoot("sdcard/test.png", 90);
orqali screenshot qilish mumkin.
*- bu yerda 90(bu rasm sifati, uni hoxlagancha qoyishingiz mumkin.Masalan, 70,80,100
function OnStart() { //Create a layout with objects vertically centered. lay = app.CreateLayout( "linear", "VCenter,FillXY" ); //Create image 1/5 of screen width and correct aspect ratio. img = app.CreateImage( "Img/Hello World.png", 0.2, -1 ); lay.AddChild( img ); //Create a button 1/3 of screen width and 1/10 screen height. btn = app.CreateButton( "Press Me", 0.3, 0.1 ); btn.SetMargins( 0, 0.05, 0, 0 ); lay.AddChild( btn ); //Set function to call when button pressed. btn.SetOnTouch( btn_OnTouch ); //Add layout to app. app.AddLayout( lay ); } //Called when user touches our button. function btn_OnTouch() { //Show a popup message. date = new Date(); app.ScreenShot( "sdcard/" + date + ".png"); app.ShowPopup( date); }
Funksiyani ishga tushirish juda oddiy "app.ScreenShoot("sdcard/test.png", 90);
orqali screenshot qilish mumkin.
*- bu yerda 90(bu rasm sifati, uni hoxlagancha qoyishingiz mumkin.Masalan, 70,80,100