Board Logo
« Background for a guiwindow program »

Welcome Guest. Please Login or Register.
Nov 22nd, 2017, 8:00pm


Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ

This board is not meant for general discussion, it is meant for posting articles to help others.
For general discussions use the appropriate board, which best describes your problem area.

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Background for a guiwindow program  (Read 450 times)
pmbolton
New Member
Image


member is offline

Avatar




PM


Posts: 10
xx Background for a guiwindow program
« Thread started on: Jul 25th, 2017, 10:59am »

Hello to those who stil use this great program.

I am creating a program which uses gui windows ALOT ... to make life more interesting and instead of background being a "colour" , I would like to have a picture behind which everything else sits above ...
Only way i have acheived this thus far is by creating a window filling button and uploading an image into it, then disabling that button so it is not active.. works perfectly well .. though one annoying snag....

when going from window closing to another opening.. the text on that screen does not show until I maximise the window.. then all works well..

My obvious question is, how do I acheive what I wish (if possible) without having to maximise the new window every single time??

Cheers for help.. hopefully
Paul
User IP Logged

pmbolton
New Member
Image


member is offline

Avatar




PM


Posts: 10
xx Re: Background for a guiwindow program
« Reply #1 on: Jul 25th, 2017, 11:02am »

P.S
statictext does not show ... until maximise.. all other text issues show up first time
User IP Logged

pmbolton
New Member
Image


member is offline

Avatar




PM


Posts: 10
xx Re: Background for a guiwindow program
« Reply #2 on: Jul 25th, 2017, 11:10am »

P.P.S
Sorry to linger on here smiley ..
is there quite simply a command which will automatically maximise the window,, maybe that would solve my problem
User IP Logged

Rod
Administrator
ImageImageImageImageImage


member is offline

Avatar

Graphics = Goosebumps!


PM

Gender: Male
Posts: 3131
xx Re: Background for a guiwindow program
« Reply #3 on: Jul 25th, 2017, 11:12am »

Some code to demonstrate would help us answer. First off you are not meant to place controls on graphic resources.

The graphicbox is set to take all sorts of mouse and keyboard input. By placing other controls that take mouse and keyboard input over that you are setting up a problem. The Z order of controls is also an issue.

Statictext are known not to work in graphic resources, so the fact it works at all is lucky.

I am guessing but I think the solution will be to place graphic resources "around" your gui controls. Either that or mimic gui controls inside your graphicbox.
User IP Logged

pmbolton
New Member
Image


member is offline

Avatar




PM


Posts: 10
xx Re: Background for a guiwindow program
« Reply #4 on: Jul 25th, 2017, 11:24am »

Cheers for reply...
TBH alot of what you said went right over my head ... not been a big gui user up until this point.. so nove am afraid..

below is a simple example of what i mean... it does what it says on the tin.. but I need to maximise before statictext appears .. hope it helps

WindowWidth = DisplayWidth
WindowHeight = DisplayHeight
UpperLeftx = 0
UpperLefty = 0

bmpbutton #HISTORYRECORDS.bmpbutton1, "C:\PREDMASTER\IMAGES\USING\HISTORYRECORDS.bmp", [bmpbutton1Click], UL, 0, 0

statictext #HISTORYRECORDS.statictext2, team$(1), 52, 29, 179, 30
listbox #HISTORYRECORDS.listbox2, team$(, [listbox2DoubleClick], 1024, 26, 182, 35

open "HistoryRecords" for window as #HISTORYRECORDS
#HISTORYRECORDS.bmpbutton1 "disable"
print #HISTORYRECORDS, "font Ariel_Black_serif 6 24"

[HISTORYRECORDS.inputLoop] 'wait here for input event
wait
User IP Logged

pmbolton
New Member
Image


member is offline

Avatar




PM


Posts: 10
xx Re: Background for a guiwindow program
« Reply #5 on: Jul 25th, 2017, 11:30am »

if I delete the font line .. it works perfectly fine

but the default font i need glasses for smiley
User IP Logged

pmbolton
New Member
Image


member is offline

Avatar




PM


Posts: 10
xx Re: Background for a guiwindow program
« Reply #6 on: Jul 25th, 2017, 11:50am »

Problem solved thankfully more simply than I thought...
It was the font size choice that is the problem..

7 24 works just fine and now gives me a faultless look to background images to the windows created.. sorry for wasting ya time
User IP Logged

rtr
Member in Training
ImageImage


member is offline

Avatar




PM


Posts: 30
xx Re: Background for a guiwindow program
« Reply #7 on: Jul 25th, 2017, 3:44pm »

on Jul 25th, 2017, 11:12am, Rod wrote:
First off you are not meant to place controls on graphic resources. The graphicbox is set to take all sorts of mouse and keyboard input. By placing other controls that take mouse and keyboard input over that you are setting up a problem.

The OP stated that the background image was placed on a BMPBUTTON, not on a GRAPHICBOX. Surely in that case most of your cautions do not apply?
« Last Edit: Jul 25th, 2017, 3:56pm by rtr » User IP Logged

Rod
Administrator
ImageImageImageImageImage


member is offline

Avatar

Graphics = Goosebumps!


PM

Gender: Male
Posts: 3131
xx Re: Background for a guiwindow program
« Reply #8 on: Jul 25th, 2017, 3:57pm »

Yep,missed that point, who would have thought to put controls on a button. 7 24 does not work for me it still only shows after resize.

To explain Z order, imagine three buttons one on top of the other all exactly the same size. You click the mouse, which is clicked? Not them all, which? Top one, which is that?

Statictext don't react to mouse or keyboard so are special case but can you click through a statictext to the control below?

Me, I would stick to protocol.
User IP Logged

pmbolton
New Member
Image


member is offline

Avatar




PM


Posts: 10
xx Re: Background for a guiwindow program
« Reply #9 on: Jul 25th, 2017, 5:53pm »

All is working fine now .. correct way or not
I can have a full screen image background .... disabled .. with any kind of text use above with 0 selection and now no viewing problems
User IP Logged

Rod
Administrator
ImageImageImageImageImage


member is offline

Avatar

Graphics = Goosebumps!


PM

Gender: Male
Posts: 3131
xx Re: Background for a guiwindow program
« Reply #10 on: Jul 26th, 2017, 01:51am »

Good, when I get some time I will experiment with your technique and see if it provides new functionality we have mostly avoided in the past.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls