Start main window in top right monitor

Moderator: Rathinagiri

User avatar
RussBaker
Posts: 51
Joined: Wed Jul 22, 2015 9:44 am

Start main window in top right monitor

Post by RussBaker »

How can I start my main window in the top right corner of the monitor?
More specifically, how can I determine the screen resolution? It may be different on other user monitors?

Also, how do I change the font color of a label after the form is loaded?

--Russ
User avatar
RussBaker
Posts: 51
Joined: Wed Jul 22, 2015 9:44 am

Re: Start main window in top right monitor

Post by RussBaker »

I found the answer to my first question

DEFINE WINDOW Win_1 ;
AT 0,GetDesktopWidth()- myformwidth

2) Can I change the font color and/or the form background color after the form is active?


--Russ
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: Start main window in top right monitor

Post by andyglezl »

Definicion:

DEFINE WINDOW Form_1.......

@ 200,20 LABEL Label_1 VALUE "HMG" TRANSPARENT FONT "ARIAL" SIZE 36 ;
FONTCOLOR BLACK BACKCOLOR YELLOW AUTOSIZE

END WINDOW

----------------------------------------------------------------------------------------------------
Ejecucion:

Form_1.Label_1.FONTCOLOR := WHITE
Form_1.Label_1.BACKCOLOR := BLUE
Andrés González López
Desde Guadalajara, Jalisco. México.
User avatar
RussBaker
Posts: 51
Joined: Wed Jul 22, 2015 9:44 am

Re: Start main window in top right monitor

Post by RussBaker »

I know how to set the colors of a label at definition.

How can I change the property AFTER?

My form displays data that changes. I want to be able to change the color of a label to Green or Red based on status.
How can I set the color properties of a label?

--Russ
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Start main window in top right monitor

Post by Rathinagiri »

my_form.my_label.fontcolor := aNewColor

You can change the color during runtime using the above property.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
mol
Posts: 3720
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Start main window in top right monitor

Post by mol »

Background color of window is not changeable. You can define it only at creation time.
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Start main window in top right monitor

Post by Rathinagiri »

Marek,

He wants to change the color of the label and not the background color of the window.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
mol
Posts: 3720
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Start main window in top right monitor

Post by mol »

RussBaker wrote:I found the answer to my first question

DEFINE WINDOW Win_1 ;
AT 0,GetDesktopWidth()- myformwidth

2) Can I change the font color and/or the form background color after the form is active?


--Russ
Russ wrote about form background color :-) in this post ;)
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Start main window in top right monitor

Post by Rathinagiri »

:) Thanks Marek. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: Start main window in top right monitor

Post by andyglezl »

Quiza son 2 preguntas... pero si RussBaker no contesta los post, no sabremos...
-------------------------------------------------------------------------------------------------------
Maybe are 2 questions ... but if RussBaker not answer the post not know ...
Also, how do I change the font color of a label after the form is loaded?
......
2) Can I change the font color and/or the form background color after the form is active?
Andrés González López
Desde Guadalajara, Jalisco. México.
Post Reply