Jump to content

Arkaplan Değiştirmek


peerfen

Recommended Posts

Buton On Click;

Application.SetPageProperties("Page1", {BackgroundType=2, ImageFilename="abc.png"});[/CODE]

Sayfanın Ismi : Page1

Resim : abc.png (projenin ana dizinindeki abc.png dosyası)

buraları isteğine göre düzenle..

Link to comment
Share on other sites

ayarlar = {};
ayarlar.BackgroundType = BG_IMAGE;    
ayarlar.ImageFilename = "Autoplay\\Images\\1.jpg"
Application.SetPageProperties("Page1", ayarlar)[/CODE]

Bu kod sayfa arkaplanını Images klasorundeki 1.jpg olarak ayarlayacaktır.

Edit: spydevil hangi ara yazdın gıcık oluyorum sana pis zenci! :ninja:

Link to comment
Share on other sites

peki arkadaslar bu degistirtigimiz arka plan biz projeyi acip kapattigimizda eski haliylemi acilacak yoksa en son ayarladigimiz resimlemi kapattiysak acilacak...

talhanın dediği doğru ama ayarladığımız arkaplanı saklamak mümkün. Şöyle ki;

Sayfanın On Show evresine:

resim = INIFile.GetValue("AutoPlay\\Docs\\data.ini", "ayarlar", "arkaplan")
Application.SetPageProperties("Page1", {BackgroundType=2, ImageFilename="AutoPlay\\Images\\"..resim});[/CODE]

ve Buttonumuza;

[CODE]dosya = Dialog.FileBrowse(true, "Dosya seçin", _DesktopFolder, "Resim Dosyaları (.png, .jpg, .bmp)|*.png;*.jpg;*.bmp|", "", "", false, true);
if dosya ~= "CANCEL" then
File.Copy(dosya[1], _SourceFolder.."\\AutoPlay\\Images", false, true, false, false)
dosyaismi = String.SplitPath(dosya[1])
ayarlar = {};
ayarlar.BackgroundType = BG_IMAGE;    
ayarlar.ImageFilename = "Autoplay\\Images\\"..dosyaismi.Filename..dosyaismi.Extension;
Application.SetPageProperties("Page1", ayarlar)
INIFile.SetValue("Autoplay\\Docs\\data.ini", "ayarlar", "arkaplan", dosyaismi.Filename..dosyaismi.Extension)
end[/CODE]

kodlarını yazarsak seçtiğimiz arka plan saklanacak ve bir dahaki açılışımızda o arkaplanla açılacak. Hem bu kodda dosya seçme penceresi ile istediğimiz dosyayı seçmek mümkün.

Link to comment
Share on other sites

  • 1 ay sonra...
Şu şekilde olması lazım:

Buttonun On Click evresine;

tblButton = {};
tblButton.ButtonFile = "Autoplay\\Docs\\1.btn;    
Button.SetPageProperties("Button1", tblButton)
INIFile.SetValue("Autoplay\\Docs\\data.ini", "ayarlar", "button1", "Autoplay\\Buttons\\1.btn")[/CODE]

Şu kodlarda Sayfanın On Preload evresine:

[CODE]strBtn = INIFile.GetValue("Autoplay\\Docs\\data.ini", "ayarlar", "button1")
tblButton.ButtonFile = strBtn;    
Button.SetPageProperties("Button1", tblButton)
Button.SetPageProperties("Button1", ayarlar)[/CODE]

Buttonun On Click asagidaki kisim hata verdi

[CODE]tblButton.ButtonFile = "Autoplay\\Docs\\1.btn;[/CODE]

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...