AMIT Posted March 19, 2016 Posted March 19, 2016 I create new blank uniGUI project and try to set background picture in the Mainmodule, When I run the program there is no background picture shown on the browser. Can you tell me how to make it work? I have add procedure TUniMainModule.UniGUIMainModuleCreate(Sender: TObject);begin Background.Url:=UniServerModule.UniRoot+'files\home_bkgrnd.png';end; It also doesn't work at all. Is it a bug? Quote
Hayri ASLAN Posted March 19, 2016 Posted March 19, 2016 please try Background.Url:='files\home_bkgrnd.png'; Quote
AMIT Posted March 20, 2016 Author Posted March 20, 2016 please try Background.Url:='files\home_bkgrnd.png'; It also doesn't work at all. I don't know why it doesn't work. It's simple program just setup the property and it should work fine. I use the latest build.(1279), Windows 10 x64. Any clue to make it work or what it should be the problem. Quote
Administrators Farshad Mohajeri Posted March 20, 2016 Administrators Posted March 20, 2016 Do you have a login screen? Quote
AMIT Posted March 20, 2016 Author Posted March 20, 2016 No Login Screen. Just simple Application. I create Project using uniGUI Application Wizard. I put 'home_bkgrnd.png' file in files folder (\uniTESTBKGND\Debug\Win32\files). Then set the Background\Picture property in the MainModule and Run Program. It doesn't work on Firefox and Chrome Browser. I notice that after I set Background\picture property it will show (TdxPNGImage) in the picture property (Object inspector). I have devExpress on my system too, Is this the cause of the problem? Quote
Administrators Farshad Mohajeri Posted March 20, 2016 Administrators Posted March 20, 2016 Yes it can be the issue, devexpress replaces PNG handler with its own. Try using JPEG format. Quote
AMIT Posted March 20, 2016 Author Posted March 20, 2016 JPEG also doesn't work. It means that uniGUI and DevExpress cannot be installed on the same system, isn't it? I will try to remove DevExpress and see if it solve the problem. I'll let you know. Quote
AMIT Posted March 20, 2016 Author Posted March 20, 2016 I have removed DevExpress. I set Background\picture property it will show (TPNGImage) in the picture property when select png file format and (TJPEGImage) when select Jpg file format. Try to run it again. Problem still exist! No picture show on the screen just only a white blank page. What should I do? Please help. Quote
Administrators Farshad Mohajeri Posted March 20, 2016 Administrators Posted March 20, 2016 I can not reproduce this. Can you send a test project to: info@fmsoft.net Quote
AMIT Posted March 20, 2016 Author Posted March 20, 2016 Its behavior very strange. I set MainFormDisplayPage = mfPage. There is no Background image display even I change background to any file. So I change the MainFormDisplayPage = mfWindow then I got the Background images only the jpeg file format. PNG had never been displayed at all. The strange behavior is when I change to any other jpeg files the background image is fixed for only one file. example I set url = files/truck.jpg then it displayed OK when I change to any other jpg for example url = files/xxxx.jpg. It keep display truck.jpg as a background. So I think it may be browser cache the old html file. So I clear all cache but it still be the same. I test it many times. I view (firefox) Page Source for HTML, the Url in the html is always link to 'files/truck.jpg' even I change the content of Background/url property to any file. (every time I change I recompile and run). Finally, I decide to delete this project (delete its folder) and Create a new project using uniGUI Application Wizard again. This time every thing look ok except it cannot display PNG File format. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.