topic
stringlengths
1
63
text
stringlengths
1
577k
Change the ""90% of resources"" for a REAL percentua
Kleyber, As easy as run your application, then run dpus.exe and make click on your application window: [url=http://imageshack.us:15czxepk][img:15czxepk]http://img479.imageshack.us/img479/255/gdi5oo.jpg[/img:15czxepk][/url:15czxepk] though it seems that the reported information is not very reliable.
Change the REPLACE command
Hi, I need to change the replace command to add a function when he is executed. [code=fw:30jgiajz]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   #command REPLACE <span style="color: #000000;">&#91;</span> <f1> WITH <x1> <span style="color: #000000;">&#91;</span>, <fn> WITH <xn><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#93;</span>                  ;<br />            <span style="color: #000000;">&#91;</span><span style="color: #00C800;">FOR</span> <for><span style="color: #000000;">&#93;</span>                                                    ;<br />            <span style="color: #000000;">&#91;</span><span style="color: #00C800;">WHILE</span> <while><span style="color: #000000;">&#93;</span>                                                ;<br />            <span style="color: #000000;">&#91;</span><span style="color: #00C800;">NEXT</span> <next><span style="color: #000000;">&#93;</span>                                                  ;<br />            <span style="color: #000000;">&#91;</span>RECORD <rec><span style="color: #000000;">&#93;</span>                                                 ;<br />            <span style="color: #000000;">&#91;</span><rest:<span style="color: #000000;">REST</span>><span style="color: #000000;">&#93;</span>                                                  ;<br />            <span style="color: #000000;">&#91;</span>ALL<span style="color: #000000;">&#93;</span>                                                          ;<br />                                                                           ;<br />         => DBEval<span style="color: #000000;">&#40;</span>                                                        ;<br />                    <span style="color: #000000;">&#123;</span>|| _FIELD-><f1> := <x1> <span style="color: #000000;">&#91;</span>, _FIELD-><fn> := <xn><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#125;</span>,    ;<br />                    <<span style="color: #000000;">&#123;</span><span style="color: #00C800;">for</span><span style="color: #000000;">&#125;</span>>, <<span style="color: #000000;">&#123;</span><span style="color: #00C800;">while</span><span style="color: #000000;">&#125;</span>>, <next>, <rec>, <.rest.>            ;<br />                  <span style="color: #000000;">&#41;</span><br /><br />   #command REPLACE <f1> WITH <v1> <span style="color: #000000;">&#91;</span>, <fN> WITH <vN> <span style="color: #000000;">&#93;</span>                     ;<br />         => _FIELD-><f1> := <v1> <span style="color: #000000;">&#91;</span>; _FIELD-><fN> := <vN><span style="color: #000000;">&#93;</span><br /><br />I need <span style="color: #0000ff;">to</span> <span style="color: #0000ff;">change</span> <span style="color: #0000ff;">to</span> something <span style="color: #0000ff;">like</span> that:<br />=> <span style="color: #00C800;">If</span> <span style="color: #000000;">&#40;</span>  <f1>  = <span style="color: #ff0000;">"RESGISTRO"</span> .Or. <fn> = <span style="color: #ff0000;">"RESGISTRO"</span>,;<br />                        _FIELD-><f1> := <v1> <span style="color: #000000;">&#91;</span>; _FIELD-><fN> := <vN><span style="color: #000000;">&#93;</span>,;<br />                        _FIELD-><f1> := <v1> <span style="color: #000000;">&#91;</span>; _FIELD-><fN> := <vN><span style="color: #000000;">&#93;</span>;<br />                        REGISTRA<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:30jgiajz]
Change the bitmap of GET ACTION
How can I change the bitmap of the GET with ACTION, when the user clicks on action button. I have a login dialog and I want to show/Hide the password when the user clicks the button. [code=fw:225hnt9l]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oPsw <span style="color: #0000ff;">VAR</span> cPsw <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont PASSWORD <span style="color: #0000ff;">UPDATE</span> ;<br />BITMAP <span style="color: #ff0000;">"BTN_SHOWPSW"</span> ;<br /><span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oPsw:<span style="color: #000000;">lPassword</span> := !oPsw:<span style="color: #000000;">lPassword</span>, ;<br />         <span style="color: #B900B9;">// Here I want to change it Something like IF( oPsw:lPassword, oPsw:cBitMap := "BTN_SHOWPSW", oPsw:cBitMap := "BTN_HIDEPSW")</span><br />         oDlg:<span style="color: #0000ff;">UpDate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span></div>[/code:225hnt9l]
Change the bitmap of GET ACTION
Perfect. Thank you very much.
Change the bitmap of GET ACTION
Hi, try this code [code=fw:115h81w6]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oPsw <span style="color: #0000ff;">VAR</span> cPsw <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">FONT</span> oFont PASSWORD <span style="color: #0000ff;">UPDATE</span> ;<br />    BITMAP <span style="color: #ff0000;">"BTN_SHOWPSW"</span> ;<br />    <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> oPsw:<span style="color: #000000;">lPassword</span> := !oPsw:<span style="color: #000000;">lPassword</span>, ;<br />             oPsw :<span style="color: #000000;">oBtn</span>:<span style="color: #000000;">LoadBitmap</span><span style="color: #000000;">&#40;</span> IIF<span style="color: #000000;">&#40;</span> oPsw:<span style="color: #000000;">lPassword</span>, <span style="color: #ff0000;">"BTN_SHOWPSW"</span>, <span style="color: #ff0000;">"BTN_HIDEPSW"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ;<br />             oDlg:<span style="color: #0000ff;">UpDate</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span></div>[/code:115h81w6]
Change the columns order with xBrowse
Hi, I succesfully replaced the fwh tcbrowse with xbrowse that is more flexible. I only have the problem to change the order of colums, for example with an array like: {"Mark","11-11-2007","3:45"} {"Luc","4-5-2004","11:37"} if I want to display the second,third and first element in twbrowse I can do it with ADD COLUMN TO oBrw DATA ARRAY ELEM 2 ADD COLUMN TO oBrw DATA ARRAY ELEM 3 ADD COLUMN TO oBrw DATA ARRAY ELEM 1 but how can I do the same with xBrowse ? Thanks in advance. Best Regards, Marco Turco
Change the columns order with xBrowse
See <!-- m --><a class="postlink" href="http://fivetechsoft.com/forums/viewtopic.php?t=7192&highlight=xbrowse">http://fivetechsoft.com/forums/viewtopi ... ht=xbrowse</a><!-- m --> This error was reported with corection No reaction Frank
Change the columns order with xBrowse
Frank, Already implemented. We simply missed it. Thanks! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Change the columns order with xBrowse
Yes, but what is the way to display the columns with the order ELEM 2 ELEM 3 ELEM 1 instead the default ELEM 1 ELEM 2 ELEM 3 ?
Change the columns order with xBrowse
Otto ELEM 2 ELEM 3 ELEM 1 instead the default ELEM 1 ELEM 2 ELEM 3 WITH OBJECT oBrw :Swapcols(:aCols[1],:aCols[2]) ; :Swapcols[:aCols[2],:aCols[3]) END Or look at oBrw:setarray to see how oBrw:bstrdata is set oCol := :aCols[1] oCol:bStrData := GenArrayBlock( { || :aArrayData[ :nArrayAt ] },2, .t. ) oCol := :aCols[2] oCol:bStrData := GenArrayBlock( { || :aArrayData[ :nArrayAt ] },3, .t. ) oCol := :aCols[3] oCol:bStrData := GenArrayBlock( { || :aArrayData[ :nArrayAt ] },1, .t. ) GenArrayBlock is STATIC and must be changed or copied
Change the size of icons in FWH18.03
My program has a string: @ 100, 100 XIMAGE oImg SIZE 64, 64 OF oDlg RESOURCE "i_bmp" NOBORDER The icon shown is of size 64x64 In FWH17.12 all right, in FWH18.03 I see the icon 32x32. Why? Icons 16x16 are inserted in the xBrowse column headers. In FWh17.12 all right, FWH18.03 the size of these icons has increased to the height of the title. Why?
Change the size of icons in FWH18.03
Are you referring to "icons" or "bitmaps"? Can you help me by suggesting names of any *.ico files in fwh folder for me to test and answer you?
Change the size of icons in FWH18.03
Icons 16x16 in the xBrowse column headers ..FWH\icons\blue.ico oBrw:aCols[nn]:AddResource( "blue" ) oBrw:aCols[nn]:nHeadBmpNo:= 1 oBrw:aCols[nn]:nHeadBmpAlign:= AL_RIGHT ------------------------------------- To show in xImage icons 64x64 additionally added oImg:FitWidth() oImg:FitHeight () Now works fine
Change the size of icons in FWH18.03
Please try @ 100, 100 XIMAGE oImg SIZE 64, 64 OF oDlg RESOURCE "i_bmp(64x64)" NOBORDER oBrw:aCols[nn]:AddResource( "blue(16x16)" ) I will explain more in my next post.
Change the size of icons in FWH18.03
"blue(16x16)" - yes it works
Change the transparency of the window
I need to change the transparency of the window.I try this way, but nothing changes. How can this problem be solved ? [code=fw:c7zdniso]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<br /><span style="color: #00C800;">private</span> oDlg<br /><br />  <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">300</span>,<span style="color: #000000;">300</span>  <span style="color: #0000ff;">PIXEL</span> ;<br />           <span style="color: #0000ff;">STYLE</span> nOR<span style="color: #000000;">&#40;</span>WS_POPUP, WS_THICKFRAME<span style="color: #000000;">&#41;</span> ;<br />           <span style="color: #0000ff;">COLOR</span> CLR_BLACK, RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">152</span>, <span style="color: #000000;">251</span>, <span style="color: #000000;">152</span><span style="color: #000000;">&#41;</span> RESIZABLE<br /><br />    <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg  <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span>   oDlg:<span style="color: #000000;">nOpacity</span>:=<span style="color: #000000;">100</span> <span style="color: #0000ff;">NOWAIT</span><br />    oDlg:<span style="color: #000000;">bLDblClick</span>:=<span style="color: #000000;">&#123;</span>||Chg_Tsp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">NIL</span><br /><br />procedure Chg_Tsp<br />  oDlg:<span style="color: #000000;">nOpacity</span>:=iif<span style="color: #000000;">&#40;</span>valtype<span style="color: #000000;">&#40;</span>oDlg:<span style="color: #000000;">nOpacity</span><span style="color: #000000;">&#41;</span>=<span style="color: #ff0000;">"N"</span>, <span style="color: #00C800;">NIL</span>, <span style="color: #000000;">100</span><span style="color: #000000;">&#41;</span><br />  oDlg:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span></div>[/code:c7zdniso]
Change the transparency of the window
[code=fw:3k71mthz]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">STATIC</span> oDlg<br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">300</span>,<span style="color: #000000;">300</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL RESIZABLE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">STYLE</span> nOR<span style="color: #000000;">&#40;</span>WS_POPUP, WS_THICKFRAME<span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">COLOR</span> CLR_BLACK, RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">152</span>, <span style="color: #000000;">251</span>, <span style="color: #000000;">152</span><span style="color: #000000;">&#41;</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp;TRANSPARENT<br /><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">bLDblClick</span>:=<span style="color: #000000;">&#123;</span> || Chg_Tsp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #B900B9;">// Double Click()</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// error:</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// ACTIVATE DIALOG oDlg &nbsp;ON INIT &nbsp; oFrg:nOpacity:=100 NOWAIT</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span><span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">nOpacity</span> := <span style="color: #000000;">100</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// NOWAIT test</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Chg_Tsp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;? <span style="color: #ff0000;">"yes?"</span><br /><br />&nbsp; <span style="color: #B900B9;">// oDlg:nOpacity:=iif(valtype(oDlg:nOpacity)="N", NIL, 100)</span><br /><br />&nbsp; oDlg:<span style="color: #000000;">nOpacity</span> := <span style="color: #000000;">180</span><br /><br />&nbsp; <span style="color: #B900B9;">// oDlg:Update()</span><br />&nbsp; <span style="color: #B900B9;">// oDlg:Refresh()</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">//FIN / END</span><br />&nbsp;</div>[/code:3k71mthz] Regards, saludos.
Change the transparency of the window
I am interested in a non-modal (NOWAIT) window
Change the transparency of the window
[code=fw:3rejqv86]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// C:\FWH..\SAMPLES\NATTER2.PRG</span><br /><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"Gif.ch"</span><br /><br /><span style="color: #00C800;">STATIC</span> oDlg, oSayNat<br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oWnd<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oMenu<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">MENU</span> oMenu<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">MenuItem</span> <span style="color: #ff0000;">"nOpacity"</span> <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> Test_nOpacit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ENDMENU</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MENU</span> oMenu <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Natter nOpcity"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Test_nOpacit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> n := <span style="color: #000000;">0</span>, oSay, oGif, oFont, nEnd := <span style="color: #000000;">1000000</span>, cText := SPACE<span style="color: #000000;">&#40;</span><span style="color: #000000;">50</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Segoe UI Light"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, &nbsp;<span style="color: #000000;">-18</span> BOLD<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">300</span>,<span style="color: #000000;">300</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL RESIZABLE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">STYLE</span> nOR<span style="color: #000000;">&#40;</span>WS_POPUP, WS_THICKFRAME<span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">COLOR</span> CLR_BLACK, RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">152</span>, <span style="color: #000000;">251</span>, <span style="color: #000000;">152</span><span style="color: #000000;">&#41;</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; TRANSPARENT<br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// FOR LOOPING</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">120</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> oSay <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"TEXTO"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">120</span>, <span style="color: #000000;">30</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">COLOR</span> CLR_BLACK, CLR_WHITE<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">200</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">SAY</span> oSayNat <span style="color: #0000ff;">VAR</span> cText &nbsp; <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">UPDATE</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">30</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">COLOR</span> CLR_BLACK, CLR_WHITE<br /><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">bLDblClick</span>:=<span style="color: #000000;">&#123;</span> || Chg_Tsp<span style="color: #000000;">&#40;</span> oSayNat <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #B900B9;">// Double Click()</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span><span style="color: #000000;">&#40;</span> &nbsp;CrearGif<span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span>, oDlg:<span style="color: #000000;">nOpacity</span> := <span style="color: #000000;">100</span> <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">NOWAIT</span> ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">VALID</span><span style="color: #000000;">&#40;</span> n := nEnd, .T. <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">WHILE</span> n < nEnd<br /><br />&nbsp; &nbsp; &nbsp; n++<br /><br />&nbsp; &nbsp; &nbsp; oSay:<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> n % <span style="color: #000000;">100</span> == <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SYSREFRESH<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; END<br /><br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oFont:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> CrearGif<span style="color: #000000;">&#40;</span> oDlg <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oGif<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> GIF oGif FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\g</span>ifs<span style="color: #000000;">\m</span>atrix.gif"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">300</span>, <span style="color: #000000;">150</span> <span style="color: #0000ff;">ADJUST</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Chg_Tsp<span style="color: #000000;">&#40;</span> oSayNat <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cTxtNat := SPACE<span style="color: #000000;">&#40;</span><span style="color: #000000;">50</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// oDlg:nOpacity:=iif(valtype(oDlg:nOpacity)="N", NIL, 100)</span><br /><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">nOpacity</span> := <span style="color: #000000;">180</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">// oDlg:Update()</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// oDlg:Refresh()</span><br /><br />&nbsp; &nbsp;cTxtNat := <span style="color: #ff0000;">"Perfecto, Perfect, <ESC> Exit."</span><br /><br />&nbsp; &nbsp;oSayNat:<span style="color: #000000;">VARPUT</span><span style="color: #000000;">&#40;</span> cTxtNat <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oSayNat:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// FIN / END</span><br />&nbsp;</div>[/code:3rejqv86] Regards, saludos.
Change the transparency of the window
Thank you, Karinha, it was a useful example !
Change the value
What about copying the value of TGet of App1 to ClipBoard and then in the App2 read the value from the clipboard and then paste into the corresponding TGet ? Just an idea
Change the value
Hi, Anserkk ! Yes, I can also use the clipboard. In this case, I wanted to use TGet as an indicator of accesses to App1. I solved it this way - inserted the handling of requests from App2 in the HandleEvent method of the App1 dialog box. Everything works
Change the value
Hi. There are 2 apps on FW. App1 and App2. App1 has a dialog box with the [b:39g5mtxk]TGet[/b:39g5mtxk] control. I use a timer to check the [b:39g5mtxk]TGet[/b:39g5mtxk] value for changes. I want to change the value of this TGet from App2. hWn:=FindWindow( ,"The dialog title") //Handle of the dialog App1 hGt:=FindWindowEx( hWn, 0, "Edit" , nil ) //Handle of the TGet App1 SetWindowText(hGt, "2") //changing the TGet value The GetWindowText(hGt) function determines that the TGet value has changed. However, checking in App1 doesn't see any changes. If I use [b:39g5mtxk]TSay[/b:39g5mtxk], then everything is fine. Why is this ?
Change the value of TMsgBar() at run-time
To All I would like to be able to change the value of 'set message' (TMsgBar()) at runtime. The only way I have found to do that is to re-issue the TMsgBar():New .. which works .. but the message bar 'blinks' when I do this. Any way to just change the value of TMsgBar() without using the :New method? Thanks Rick Lipkin ps .. :SetMsg() only sends a temporary text to the MsgBar
Change the value of TMsgBar() at run-time
Rick, oMsgBar:cMsgDef = "New text" oMsgBar:Refresh()
Change the value of TMsgBar() at run-time
Antonio Thank you .. I had to prefix the Mdi Window object to get it to work. [code=fw:2zvktzkt]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oWindMain:<span style="color: #000000;">oMsgBar</span>:<span style="color: #000000;">cMsgDef</span> := xMessage,oWindMain:<span style="color: #000000;">oMsgBar</span>:<span style="color: #0000ff;">ReFresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />&nbsp;</div>[/code:2zvktzkt] Rick Lipkin
Change the value of TMsgBar() at run-time
Rick, Just FYI, you can always use the wndMain() function which returns the main window object. So you can do: wndMain():oMsgbar... This prevents you from having to pass the main window object to functions or class methods. James
Change the value of TMsgBar() at run-time
Good day ... I used this method to change the text, but when mouse over the bar, showing me the previous value regards Johnson Russi
Change title of another window created with Run
Is it possible to change the title of a window to an application initiated with the run command? Cheers Gerry
Change title of another window created with Run
Grumpy: Yes, with Manu Exposito's twcapture class: oWnd := TWCapture():New( AllTrim( cTitle ) ) oWnd:SetText( "TWCapture captura ventanas - by Manu Exposito 2001" ) Regards,
Change title of another window created with Run
Where can one find this class? Cheers
Change title of another window created with Run
Grumpy: In the new location of prometheus website (ex dbwide.com.ar), in vikthor domain: <!-- m --><a class="postlink" href="http://vikthor.com.mx/fivewin/">http://vikthor.com.mx/fivewin/</a><!-- m --> In the section EXTRAS, FUENTES. Regards,
Change title of another window created with Run
I could not find it there? Cheers
Change title of another window created with Run
Grumpy: But there is it. The exact link is: <!-- m --><a class="postlink" href="http://www.vikthor.com.mx/fivewin/files/sources/wcapture.zip">http://www.vikthor.com.mx/fivewin/files ... apture.zip</a><!-- m --> Regards,
Change title of another window created with Run
I thank you for that - must have my glasses checked wen through the lists twice. <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) -->
Change to Harbour (SOLVED)
I now will change to Harbour. First problem is with [code=fw:1v5cixhr]<div class="fw" id="{CB}" style="font-family: monospace;">hb_reta<span style="color: #000000;">&#40;</span><span style="color: #000000;">12</span><span style="color: #000000;">&#41;</span><br />hb_storni<span style="color: #000000;">&#40;</span>nCheck,<span style="color: #000000;">-1</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//-> extra parameter</span><br /> </div>[/code:1v5cixhr]What function in Harbour to set this arrayitem?
Change to Harbour (SOLVED)
Try with [code=fw:3s1r89su]<div class="fw" id="{CB}" style="font-family: monospace;"><br />hb_storvni<br />&nbsp;</div>[/code:3s1r89su]
Change to Harbour (SOLVED)
Thanks! Is there a headerfile with translations xHarbour -> Harbour ?
Change to Harbour (SOLVED)
What LIBs are missing? Error: Nicht aufl÷sbares externes '_HB_FUN_CTOT' referenziert von C:\FWH\LIB\FIVEH.LIB|VALBLANK Error: Nicht aufl÷sbares externes '_HB_FUN_HB_COMPILEFROMBUF' referenziert von C:\FWH\LIB\FIVEH.LIB|HARBOUR Error: Nicht aufl÷sbares externes '_HB_FUN_TOLEAUTO' referenziert von C:\FWH\LIB\FIVEH.LIB|HARBOUR Error: Nicht aufl÷sbares externes '_HB_FUN_HHASKEY' referenziert von C:\FWH\LIB\FIVEH.LIB|FWDECODE Error: Nicht aufl÷sbares externes '_HB_FUN_OS_ISWTSCLIENT' referenziert von C:\FWH\LIB\FIVEH.LIB|MENU Error: Nicht aufl÷sbares externes '_HB_FUN_CREATEOBJECT' referenziert von C:\FWH\LIB\FIVEH.LIB|IMAGE Error: Nicht aufl÷sbares externes '_HB_FUN_HSETCASEMATCH' referenziert von C:\FWH\LIB\FIVEH.LIB|TRECSET Error: Nicht aufl÷sbares externes '_HB_FUN_HGETCASEMATCH' referenziert von C:\FWH\LIB\FIVEH.LIB|TRECSET Error: Nicht aufl÷sbares externes '_HB_FUN_STRTOHEX' referenziert von C:\FWH\LIB\FIVEH.LIB|TRECSET Error: Nicht aufl÷sbares externes '_HB_FUN_HB_ENUMINDEX' referenziert von C:\FWH\LIB\FIVEH.LIB|DATAROW Error: Nicht aufl÷sbares externes '_HB_FUN_GETACTIVEOBJECT' referenziert von C:\FWH\LIB\FIVEH.LIB|OLEFUNCS
Change to Harbour (SOLVED)
Yes, You Can Use HBCOMPAT.CH
Change to Harbour (SOLVED)
Oh, thanks! Some link-errors are gone. But the errors above are further present. Some Harbour-libs are to be linked. But which one?
Change to Harbour (SOLVED)
You have to link hbcplr.lib too
Change to Harbour (SOLVED)
Antonio, no effect! This is complete list of functions not found! [quote:2yls4adm]Error: Nicht aufl÷sbares externes '_HB_FUN_CTOT' referenziert von C:\FWH\LIB\FIVEH.LIB|VALBLANK Error: Nicht aufl÷sbares externes '_HB_FUN_TOLEAUTO' referenziert von C:\FWH\LIB\FIVEH.LIB|HARBOUR Error: Nicht aufl÷sbares externes '_HB_FUN_HHASKEY' referenziert von C:\FWH\LIB\FIVEH.LIB|FWDECODE Error: Nicht aufl÷sbares externes '_HB_FUN_OS_ISWTSCLIENT' referenziert von C:\FWH\LIB\FIVEH.LIB|MENU Error: Nicht aufl÷sbares externes '_HB_FUN_ANSITOWIDE' referenziert von C:\WGUN\GUN1\TGET_ST.OBJ Error: Nicht aufl÷sbares externes '_HB_FUN_CREATEOBJECT' referenziert von C:\FWH\LIB\FIVEH.LIB|IMAGE Error: Nicht aufl÷sbares externes '_HB_FUN_HSETCASEMATCH' referenziert von C:\FWH\LIB\FIVEH.LIB|TRECSET Error: Nicht aufl÷sbares externes '_HB_FUN_HGETCASEMATCH' referenziert von C:\FWH\LIB\FIVEH.LIB|TRECSET Error: Nicht aufl÷sbares externes '_HB_FUN_STRTOHEX' referenziert von C:\FWH\LIB\FIVEH.LIB|TRECSET Error: Nicht aufl÷sbares externes '_HB_FUN_HB_ENUMINDEX' referenziert von C:\FWH\LIB\FIVEH.LIB|DATAROW Error: Nicht aufl÷sbares externes '_HB_FUN_GETACTIVEOBJECT' referenziert von C:\FWH\LIB\FIVEH.LIB|OLEFUNCS Error: Nicht aufl÷sbares externes '_HB_FUN_HB_UNZIPOPEN' referenziert von C:\HARBOUR\LIB\HBZIPARC.LIB|ziparc Error: Nicht aufl÷sbares externes '_HB_FUN_HB_UNZIPGLOBALINFO' referenziert von C:\HARBOUR\LIB\HBZIPARC.LIB|ziparc Error: Nicht aufl÷sbares externes '_HB_FUN_HB_UNZIPCLOSE' referenziert von C:\HARBOUR\LIB\HBZIPARC.LIB|ziparc Error: Nicht aufl÷sbares externes '_HB_FUN_HB_UNZIPFILEFIRST' referenziert von C:\HARBOUR\LIB\HBZIPARC.LIB|ziparc Error: Nicht aufl÷sbares externes '_HB_FUN_HB_UNZIPFILEINFO' referenziert von C:\HARBOUR\LIB\HBZIPARC.LIB|ziparc Error: Nicht aufl÷sbares externes '_HB_FUN_HB_UNZIPFILENEXT' referenziert von C:\HARBOUR\LIB\HBZIPARC.LIB|ziparc Error: Nicht aufl÷sbares externes '_HB_FUN_HB_ZIPOPEN' referenziert von C:\HARBOUR\LIB\HBZIPARC.LIB|ziparc Error: Nicht aufl÷sbares externes '_HB_FUN_HB_ZIPFILECREATE' referenziert von C:\HARBOUR\LIB\HBZIPARC.LIB|ziparc Error: Nicht aufl÷sbares externes '_HB_FUN_HB_ZIPFILECRC32' referenziert von C:\HARBOUR\LIB\HBZIPARC.LIB|ziparc Error: Nicht aufl÷sbares externes '_HB_FUN_HB_ZIPFILEWRITE' referenziert von C:\HARBOUR\LIB\HBZIPARC.LIB|ziparc Error: Nicht aufl÷sbares externes '_HB_FUN_HB_ZIPFILECLOSE' referenziert von C:\HARBOUR\LIB\HBZIPARC.LIB|ziparc Error: Nicht aufl÷sbares externes '_HB_FUN_HB_ZIPCLOSE' referenziert von C:\HARBOUR\LIB\HBZIPARC.LIB|ziparc Error: Nicht aufl÷sbares externes '_HB_FUN_HB_UNZIPFILEOPEN' referenziert von C:\HARBOUR\LIB\HBZIPARC.LIB|ziparc Error: Nicht aufl÷sbares externes '_HB_FUN_HB_UNZIPFILEREAD' referenziert von C:\HARBOUR\LIB\HBZIPARC.LIB|ziparc Error: Nicht aufl÷sbares externes '_HB_FUN_HB_UNZIPFILECLOSE' referenziert von C:\HARBOUR\LIB\HBZIPARC.LIB|ziparc Error: Nicht aufl÷sbares externes '_HB_FUN_HB_ZIPDELETEFILE' referenziert von C:\HARBOUR\LIB\HBZIPARC.LIB|ziparc Error: Nicht aufl÷sbares externes '_HB_FUN_TTOS' referenziert von C:\WGUN\GUN1\PRV2PDF.OBJ Error: Nicht aufl÷sbares externes '_HB_FUN_DATETIME' referenziert von C:\WGUN\GUN1\PRV2PDF.OBJ Error: Nicht aufl÷sbares externes '_HB_FUN_HB_FUNCPTR' referenziert von C:\FWH\LIB\FIVEH.LIB|ADOFUNCS Error: Nicht aufl÷sbares externes '_HB_FUN_HB_EXEC' referenziert von C:\FWH\LIB\FIVEH.LIB|ADOFUNCS Error: Nicht aufl÷sbares externes '_HB_FUN_HEVAL' referenziert von C:\WGUN\GUN1\XBROWSE_LINE.OBJ Error: Nicht aufl÷sbares externes '_HB_FUN_HB_DECODE' referenziert von C:\WGUN\GUN1\XBROWSE_LINE.OBJ Error: Nicht aufl÷sbares externes '_HB_FUN_WILDMATCH' referenziert von C:\WGUN\GUN1\XBROWSE_LINE.OBJ Error: Nicht aufl÷sbares externes '_HB_FUN_OCCURS' referenziert von C:\WGUN\GUN1\XBROWSE_LINE.OBJ Error: Nicht aufl÷sbares externes '_HB_FUN_NUMTOHEX' referenziert von C:\WGUN\GUN1\XBROWSE_LINE.OBJ Error: Nicht aufl÷sbares externes '_HB_FUN_HEXTOSTR' referenziert von C:\WGUN\GUN1\XBROWSE_LINE.OBJ Error: Nicht aufl÷sbares externes '_HB_FUN_RASCAN' referenziert von C:\FWH\LIB\FIVEH.LIB|TFOLDEX Error: Nicht aufl÷sbares externes '_HB_FUN_DBPACK' referenziert von C:\WGUN\GUN1\BUCH.OBJ Error: Nicht aufl÷sbares externes '_HB_FUN_OS_VERSIONINFO' referenziert von C:\WGUN\GUN1\CONFIG.OBJ Error: Nicht aufl÷sbares externes '_HB_FUN_DLLCALL' referenziert von C:\WGUN\GUN1\QRCODE.OBJ Error: Nicht aufl÷sbares externes '_HB_FUN_NOTIFY' referenziert von C:\FWH\LIB\FIVEH.LIB|WINDOW[/quote:2yls4adm]
Change to Harbour (SOLVED)
Please, look <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=31031&p=179002&hilit=%27_HB_FUN_CTOT&sid=919ab8f8383ba06f53055e456b3457dc#p179002">viewtopic.php?f=3&t=31031&p=179002&hilit=%27_HB_FUN_CTOT&sid=919ab8f8383ba06f53055e456b3457dc#p179002</a><!-- l -->
Change to Harbour (SOLVED)
Oh, many thanks!! Now only one error occurs. Exist this function dllcall() in Harbour? Can i replace with other? [quote:7rz1j4tp]Error: Nicht aufl÷sbares externes '_HB_FUN_DLLCALL' referenziert von C:\WGUN\GUN1\QRCODE.OBJ[/quote:7rz1j4tp]
Change to Harbour (SOLVED)
I found DLL32..... All is OK! Thanks.
Change to Harbour (SOLVED)
very good <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Change/save Screen-resolution to Applic.-resol. at Runtime ?
Hello, I found some API-functions to make it possible, to adjust the Screen-resolution to Application-resolution. Does it make sense, to adjust it at Prog-start and restore the original Resolution at Prog.-end ? I don't know, if it is possible, to change the Resolution in silent-mode. Maybe somebody found a working Solution ? [color=#0000FF:36wzlycm]// get existing Resolution Declare Function EnumDisplaySettings Lib "user32" Alias "EnumDisplaySettingsA" _ (ByVal lpszDeviceName As Long, ByVal iModeNum As Long, lptypDevMode As Any) As Boolean // Change Resolution Declare Function ChangeDisplaySettings Lib "user32" Alias "ChangeDisplaySettingsA" _ (lptypDevMode As Any, ByVal dwFlags As Long) As Long[/color:36wzlycm] // Exit Windows Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved _ As Long) As Long Best Regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
Change/save Screen-resolution to Applic.-resol. at Runtime ?
Uwe, I think that this code does what you need... [code=fw:sl9bhb84]<div class="fw" id="{CB}" style="font-family: monospace;">CamReso <span style="color: #000000;">&#40;</span> <span style="color: #000000;">1024</span>, <span style="color: #000000;">768</span>, .f. <span style="color: #000000;">&#41;</span></div>[/code:sl9bhb84] [code=fw:sl9bhb84]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">///////////////////////////////////////////////////////////////////</span><br /><span style="color: #B900B9;">/// FUNCION CamReso</span><br /><span style="color: #B900B9;">/// CAMBIA RESOLUCION DE PANTALLA TEMPORALMENTE</span><br /><span style="color: #B900B9;">/// Manuel Valdenebro 2008</span><br /><span style="color: #B900B9;">/// Adaptación ChangeRes() Marcelo Gomes/Yuri Marcelino</span><br /><span style="color: #B900B9;">/// <!-- m --><a class="postlink" href="http://www.fivewin.com.br/forum/topic.asp?TOPIC_ID=10465">http://www.fivewin.com.br/forum/topic.a ... C_ID=10465</a><!-- m --></span><br /><span style="color: #B900B9;">/// ---------------------------------------</span><br /><span style="color: #B900B9;">// nAncho ancho pantalla</span><br /><span style="color: #B900B9;">// nAlto alto pantalla</span><br /><span style="color: #B900B9;">// lPreguntar si pregunta antes de realizar el cambio</span><br /><span style="color: #B900B9;">///////////////////////////////////////////////////////////////////</span><br /><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"dll.ch"</span><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"Struct.ch"</span><br /><br /><span style="color: #00C800;">Function</span> CamReso<span style="color: #000000;">&#40;</span>nAncho, nAlto, lPreguntar<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> DM_PELSWIDTH := nHex<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"80000"</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> DM_PELSHEIGHT := nHex<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"100000"</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> oDevMode<br /><span style="color: #00C800;">Local</span> lPosible<br /><span style="color: #00C800;">Local</span> cBuffer<br /><span style="color: #00C800;">Local</span> lCamReso := .f.<br />*<span style="color: #00C800;">DEFAULT</span> lPreguntar := .t.<br />*<span style="color: #00C800;">DEFAULT</span> nAlto := GetSysMetrics<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><br />*<span style="color: #00C800;">DEFAULT</span> nAncho := GetSysMetrics<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br /><br />STRUCT oDevMode<br />MEMBER cDevName AS STRING LEN <span style="color: #000000;">32</span><br />MEMBER nSpecVer AS WORD<br />MEMBER nDrvVer AS WORD<br />MEMBER nSize AS WORD<br />MEMBER nDrvExtra AS WORD<br />MEMBER nFields AS DWORD<br />MEMBER nOrientat AS WORD<br />MEMBER nPaperSiz AS WORD<br />MEMBER nPaperLen AS WORD<br />MEMBER nPaperWid AS WORD<br />MEMBER nScale AS WORD<br />MEMBER nCopies AS WORD<br />MEMBER nDefSrc AS WORD<br />MEMBER nPrnQlty AS WORD<br />MEMBER nColor AS WORD<br />MEMBER nDuplex AS WORD<br />MEMBER nYResolut AS WORD<br />MEMBER nTTOpt AS WORD<br />MEMBER nCollate AS WORD<br />MEMBER cFormName AS STRING LEN <span style="color: #000000;">32</span><br />MEMBER nUnusePad AS WORD<br />MEMBER nBitsPPel AS DWORD<br />MEMBER nPelWidth AS DWORD<br />MEMBER nPelHeigh AS DWORD<br />MEMBER nDisFlags AS DWORD<br />MEMBER nDisFreq AS DWORD<br />ENDSTRUCT<br /><br />cBuffer := oDevMode:<span style="color: #000000;">cBuffer</span><br /><span style="color: #B900B9;">// Comprueba si es posible cambiar la resolución</span><br />lPosible := EnumDisplaySettings<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, @cBuffer<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// Si es posible cambiar la resolución</span><br /><span style="color: #00C800;">IF</span> lPosible<br /><span style="color: #00C800;">if</span> lPreguntar<br /><span style="color: #00C800;">if</span> MsgYesNo<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Desea cambiar la resolución?"</span>, <span style="color: #ff0000;">"Atención"</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">else</span><br /><span style="color: #00C800;">RETURN</span> lCamReso<br /><span style="color: #00C800;">endif</span><br />endi<br />oDevMode:<span style="color: #000000;">nFields</span> := nOr<span style="color: #000000;">&#40;</span>DM_PELSWIDTH, DM_PELSHEIGHT <span style="color: #000000;">&#41;</span><br />oDevMode:<span style="color: #000000;">nPelWidth</span> := nAncho<br />oDevMode:<span style="color: #000000;">nPelHeigh</span> := nAlto<br />cBuffer:=oDevMode:<span style="color: #000000;">cBuffer</span><br /><span style="color: #00C800;">TRY</span><br />ChangeDisplaySettings<span style="color: #000000;">&#40;</span>@cBuffer, <span style="color: #000000;">4</span><span style="color: #000000;">&#41;</span><br />lCamReso := .T.<br />CATCH<br />MsgAlert<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Modo no soportado"</span>, <span style="color: #ff0000;">"Error"</span> <span style="color: #000000;">&#41;</span><br />END<br /><span style="color: #00C800;">else</span><br />MsgAlert<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Modo no soportado"</span>, <span style="color: #ff0000;">"Error"</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">return</span> lCamReso<br /><br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> EnumDisplaySettings<span style="color: #000000;">&#40;</span>lpszDeviceName AS DWORD,;<br />iModeNum AS DWORD, ;<br />@lpDevMode AS LPSTR<span style="color: #000000;">&#41;</span> AS BOOL PASCAL;<br /><span style="color: #0000ff;">FROM</span> <span style="color: #ff0000;">"EnumDisplaySettingsA"</span> LIB <span style="color: #ff0000;">"User32.dll"</span><br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> ChangeDisplaySettings<span style="color: #000000;">&#40;</span>@lpDevMode AS LPSTR,;<br />dwFlags AS DWORD<span style="color: #000000;">&#41;</span> AS DWORD;<br /><span style="color: #0000ff;">FROM</span> <span style="color: #ff0000;">"ChangeDisplaySettingsA"</span> LIB <span style="color: #ff0000;">"User32.dll"</span><br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> ExitWindowsEx<span style="color: #000000;">&#40;</span>uFlags AS DWORD,;<br />dwReserved AS DWORD<span style="color: #000000;">&#41;</span> AS DWORD PASCAL;<br />LIB <span style="color: #ff0000;">"user32.dll"</span><br /><br /> </div>[/code:sl9bhb84]
Change/save Screen-resolution to Applic.-resol. at Runtime ?
Hello Byron, Thank You very much. The Function works perfect. But there is still a problem, I have to find out : After changing the Screen-resolution, I get a System-Message : cannot continue. Maybe I have to create a extra small Exe-file. I tested a PRG-Structure like : [code=fw:283c4qdd]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />..<br />..<br /><span style="color: #00C800;">IF</span> CHANGE_SCR<span style="color: #000000;">&#40;</span><span style="color: #000000;">1152</span>, <span style="color: #000000;">864</span>, .T.<span style="color: #000000;">&#41;</span> = .F. <span style="color: #B900B9;">// new Resolution</span><br />&nbsp; &nbsp;MsgAlert<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Cannot change Screen-resolution !"</span>,<span style="color: #ff0000;">"Attention"</span><br /><span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oWndMain <span style="color: #0000ff;">FROM</span> &nbsp;<span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">260</span>, <span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> TRANSPARENT ;<br />&nbsp; &nbsp;<span style="color: #0000ff;">STYLE</span> WS_POPUP | WS_VISIBLE | WS_DLGFRAME | WS_THICKFRAME <br />&nbsp; &nbsp;..<br />&nbsp; &nbsp;..<br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oWndMain <span style="color: #0000ff;">CENTERED</span> <br /><br />&nbsp; &nbsp;CHANGE_SCR<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1024</span>, <span style="color: #000000;">768</span>, .T.<span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// old Resolution</span><br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br />&nbsp;</div>[/code:283c4qdd] Best Regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
Change/save Screen-resolution to Applic.-resol. at Runtime ?
Hi Uwe, the function should be called with .F. so It does not ask's for confirmation to change the resolution [code=fw:bfiv0rxn]<div class="fw" id="{CB}" style="font-family: monospace;">CHANGE_SCR<span style="color: #000000;">&#40;</span><span style="color: #000000;">1152</span>, <span style="color: #000000;">864</span>, .F.<span style="color: #000000;">&#41;</span></div>[/code:bfiv0rxn] Maybe that is the problem, or it may be a problem with your video card???? I used it a while ago and did not had problems... If you post an compiled example, I can test in my computer to see if gives me the same problem....
Change/save Screen-resolution to Applic.-resol. at Runtime ?
Hello Byron, the Screenshots of my Tests : started with 1152 x 864 [img:36wvyv8p]http&#58;//www&#46;pflegeplus&#46;com/pictures/scr1&#46;jpg[/img:36wvyv8p] switching to Application Screen-resolution 1024 x 768, the Application stopps. [img:36wvyv8p]http&#58;//www&#46;pflegeplus&#46;com/pictures/scr2&#46;jpg[/img:36wvyv8p] Maybe it is a Dialog and not a Window ? The Main-prgstructure : [code=fw:36wvyv8p]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> oWndMain<br /><span style="color: #00C800;">LOCAL</span> nScrwidth := GetSysmetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <br /><span style="color: #00C800;">LOCAL</span> nScrheight := GetSysmetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> cRestart := <span style="color: #ff0000;">"NO"</span><br />...<br />...  <br />SetBalloon<span style="color: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Balloon shape required for tooltips</span><br />c_path := CURDRIVE<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">":<span style="color: #000000;">\"</span> + GETCURDIR()  <br /><br />IF nScrwidth <> 1024 .and. nScrheight <> 768<br />    cRestart := "</span>YES<span style="color: #ff0000;">"<br />ENDIF<br /><br />oFont1 := TFont():New( "</span>Arial<span style="color: #ff0000;">", 0, 16,.F.,.T.,  0,  0,  0,.F.,.F.)<br /><br />DEFINE BITMAP oAlpha FILENAME c_Path + "</span>\<span style="color: #0000ff;">bitmaps</span>\LOGO2.bmp<span style="color: #ff0000;">"<br /><br />DEFINE DIALOG oWndMain FROM  0, 0 TO 260, 400 PIXEL TRANSPARENT ;<br />STYLE WS_POPUP | WS_VISIBLE | WS_DLGFRAME | WS_THICKFRAME <br />...<br />...<br />@ 90, 125 BTNBMP oBtn5 OF oWndMain  ;<br />SIZE 40, 40 ;<br />TOP NOBORDER ;<br />FILE c_path + "</span>\<span style="color: #0000ff;">Bitmaps</span>\32Screen.bmp<span style="color: #ff0000;">" ;       <br />PROMPT "</span> &Screen<span style="color: #ff0000;">" ;<br />FONT oFont1 ;<br />ACTION ( TEST_SCR(oWndMain) ) <br />oBtn5:cTooltip :=  { "</span><span style="color: #00C800;">New</span><span style="color: #ff0000;">" + CRLF + ;<br />      "</span>Screen-resolution <span style="color: #000000;">1024</span> x <span style="color: #000000;">768</span><span style="color: #ff0000;">","</span>Screen<span style="color: #ff0000;">", 1, CLR_BLACK, 14089979 }<br />oBtn5:lTransparent := .T.<br />oBtn5:l2007 := .F.<br />oBtn5:SetColor( 16312263 )<br />...<br />...<br />ACTIVATE DIALOG oWndMain CENTERED ;<br />ON INIT GRADBRU1(oWndMain, 0.8, 8388608, 14853684, .T.) ; <br />ON PAINT ABPaint( hDC, 50, 10, oAlpha:hBitmap, 255 )  // Horiz / Vertical<br /><br />oFont1:End()  <br /><br />// Back to different Screen-resolution RESET<br />IF cRestart = "</span>YES<span style="color: #ff0000;">" <br />    CHANGE_SCR( nScrwidth, nScrheight, .T.)<br />ENDIF<br /><br />RETURN NIL  <br /><br />// --------- Use 1024 x 768 if Screenresolution is different ------------<br /><br />FUNCTION TEST_SCR(oWndMain)<br /><br />IF cRestart = "</span>YES<span style="color: #ff0000;">"<br />   IF CHANGE_SCR(1024, 768, .T.) = .F.<br />      MsgAlert( "</span>Cannot <span style="color: #0000ff;">change</span> Screen-resolution !<span style="color: #ff0000;">","</span>Attention<span style="color: #ff0000;">")<br />   ENDIF<br />ELSE<br />    MsgAlert( "</span>No Screen-resolution-<span style="color: #0000ff;">change</span> needed !<span style="color: #ff0000;">","</span>Attention<span style="color: #ff0000;">" ) <br />ENDIF<br /><br />RETURN NIL <br /></span></div>[/code:36wvyv8p] Added to Sample : Testbtn.prg I got the same Result. After changing the Screen-resolution Message : Testbtn.exe doesn't work anymore .... [img:36wvyv8p]http&#58;//www&#46;pflegeplus&#46;com/pictures/scr3&#46;jpg[/img:36wvyv8p] [code=fw:36wvyv8p]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// Defining ButtonBar buttons which uses Bitmaps files from disk</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">static</span> oWnd<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oBar<br />   <span style="color: #00C800;">local</span> oBrush<br />   <span style="color: #00C800;">local</span> oPopup<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush <span style="color: #0000ff;">COLOR</span> nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">12</span>, <span style="color: #000000;">129</span>, <span style="color: #000000;">87</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">60</span> ;<br />      <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Testing Buttons from disk"</span> ;<br />      <span style="color: #0000ff;">BRUSH</span> oBrush<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTONBAR</span> oBar <span style="color: #0000ff;">OF</span> oWnd _3D<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\1</span>6x16<span style="color: #000000;">\e</span>xit.bmp"</span> ;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> CHANGE_SCR<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1152</span>, <span style="color: #000000;">864</span>, .T.<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> ;<br />      <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"You can place..."</span><br /><br />   <span style="color: #0000ff;">MENU</span> oPopup <span style="color: #0000ff;">POPUP</span><br />      <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">WHEN</span> .f.<br />      <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Any action"</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #0000ff;">MENU</span><br />         <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"Another"</span> <span style="color: #0000ff;">WHEN</span> .f.<br />         <span style="color: #0000ff;">MENUITEM</span> <span style="color: #ff0000;">"More..."</span><br />      <span style="color: #0000ff;">ENDMENU</span><br />   <span style="color: #0000ff;">ENDMENU</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\1</span>6x16<span style="color: #000000;">\O</span>pen.bmp"</span> GROUP ;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> FWVERSION <span style="color: #000000;">&#41;</span> ;<br />      <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Any BMP File here..."</span> ;<br />      <span style="color: #0000ff;">MENU</span> oPopup<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #0000ff;">OF</span> oBar FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\1</span>6x16<span style="color: #000000;">\C</span>ut.bmp"</span> ;<br />      <span style="color: #0000ff;">ACTION</span> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> FWVERSION <span style="color: #000000;">&#41;</span> ;<br />      <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Reading it from disk !!!"</span><br /><br />   SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> FWVERSION + <span style="color: #ff0000;">" "</span> + FWCOPYRIGHT<br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">///////////////////////////////////////////////////////////////////</span><br /><span style="color: #B900B9;">/// FUNCION CamReso</span><br /><span style="color: #B900B9;">/// CAMBIA RESOLUCION DE PANTALLA TEMPORALMENTE</span><br /><span style="color: #B900B9;">/// Manuel Valdenebro 2008</span><br /><span style="color: #B900B9;">/// Adaptación ChangeRes() Marcelo Gomes/Yuri Marcelino</span><br /><span style="color: #B900B9;">/// <!-- m --><a class="postlink" href="http://www.fivewin.com.br/forum/topic.a">http://www.fivewin.com.br/forum/topic.a</a><!-- m --> ... C_ID=10465</span><br /><span style="color: #B900B9;">/// ---------------------------------------</span><br /><span style="color: #B900B9;">// nAncho ancho pantalla</span><br /><span style="color: #B900B9;">// nAlto alto pantalla</span><br /><span style="color: #B900B9;">// lPreguntar si pregunta antes de realizar el cambio</span><br /><span style="color: #B900B9;">///////////////////////////////////////////////////////////////////</span><br /><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"dll.ch"</span><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"Struct.ch"</span><br /><br /><span style="color: #00C800;">Function</span> CHANGE_SCR<span style="color: #000000;">&#40;</span>nScrwidth, nScrheight, lChange<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> DM_PELSWIDTH := nHex<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"80000"</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> DM_PELSHEIGHT := nHex<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"100000"</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> oDevMode<br /><span style="color: #00C800;">Local</span> lPosible<br /><span style="color: #00C800;">Local</span> cBuffer<br /><span style="color: #00C800;">Local</span> lScrReso := .f.<br />*<span style="color: #00C800;">DEFAULT</span> lPreguntar := .t.<br />*<span style="color: #00C800;">DEFAULT</span> nScrwidth := GetSysMetrics<span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Width</span><br />*<span style="color: #00C800;">DEFAULT</span> nScrheight := GetSysMetrics<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Height</span><br /><br />STRUCT oDevMode<br />MEMBER cDevName AS STRING LEN <span style="color: #000000;">32</span><br />MEMBER nSpecVer AS WORD<br />MEMBER nDrvVer AS WORD<br />MEMBER nSize AS WORD<br />MEMBER nDrvExtra AS WORD<br />MEMBER nFields AS DWORD<br />MEMBER nOrientat AS WORD<br />MEMBER nPaperSiz AS WORD<br />MEMBER nPaperLen AS WORD<br />MEMBER nPaperWid AS WORD<br />MEMBER nScale AS WORD<br />MEMBER nCopies AS WORD<br />MEMBER nDefSrc AS WORD<br />MEMBER nPrnQlty AS WORD<br />MEMBER nColor AS WORD<br />MEMBER nDuplex AS WORD<br />MEMBER nYResolut AS WORD<br />MEMBER nTTOpt AS WORD<br />MEMBER nCollate AS WORD<br />MEMBER cFormName AS STRING LEN <span style="color: #000000;">32</span><br />MEMBER nUnusePad AS WORD<br />MEMBER nBitsPPel AS DWORD<br />MEMBER nPelWidth AS DWORD<br />MEMBER nPelHeigh AS DWORD<br />MEMBER nDisFlags AS DWORD<br />MEMBER nDisFreq AS DWORD<br />ENDSTRUCT<br /><br />cBuffer := oDevMode:<span style="color: #000000;">cBuffer</span><br /><span style="color: #B900B9;">// Comprueba si es posible cambiar la resolución</span><br />lPosible := EnumDisplaySettings<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, @cBuffer<span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">// Change if possible</span><br /><span style="color: #00C800;">IF</span> lPosible<br />    <span style="color: #00C800;">IF</span> lChange<br />        <span style="color: #00C800;">IF</span> MsgYesNo<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Do You want to change the Resolution ?"</span>, <span style="color: #ff0000;">"Attention"</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ELSE</span><br />            <span style="color: #00C800;">RETURN</span> lScrReso<br />        <span style="color: #00C800;">ENDIF</span><br />    <span style="color: #00C800;">ENDIF</span><br />    oDevMode:<span style="color: #000000;">nFields</span> := nOr<span style="color: #000000;">&#40;</span>DM_PELSWIDTH, DM_PELSHEIGHT <span style="color: #000000;">&#41;</span><br />    oDevMode:<span style="color: #000000;">nPelWidth</span> := nScrwidth<br />    oDevMode:<span style="color: #000000;">nPelHeigh</span> := nScrheight<br />    cBuffer:=oDevMode:<span style="color: #000000;">cBuffer</span><br />    <span style="color: #00C800;">TRY</span><br />        ChangeDisplaySettings<span style="color: #000000;">&#40;</span>@cBuffer, <span style="color: #000000;">4</span><span style="color: #000000;">&#41;</span><br />        lScrReso := .T.<br />    CATCH<br />        MsgAlert<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Modo no soportado"</span>, <span style="color: #ff0000;">"Error"</span> <span style="color: #000000;">&#41;</span><br />    END<br /><span style="color: #00C800;">ELSE</span><br />    MsgAlert<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Modo no soportado"</span>, <span style="color: #ff0000;">"Error"</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> lScrReso<br /><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> EnumDisplaySettings<span style="color: #000000;">&#40;</span>lpszDeviceName AS DWORD,;<br />iModeNum AS DWORD, ;<br />@lpDevMode AS LPSTR<span style="color: #000000;">&#41;</span> AS BOOL PASCAL;<br /><span style="color: #0000ff;">FROM</span> <span style="color: #ff0000;">"EnumDisplaySettingsA"</span> LIB <span style="color: #ff0000;">"User32.dll"</span><br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> ChangeDisplaySettings<span style="color: #000000;">&#40;</span>@lpDevMode AS LPSTR,;<br />dwFlags AS DWORD<span style="color: #000000;">&#41;</span> AS DWORD;<br /><span style="color: #0000ff;">FROM</span> <span style="color: #ff0000;">"ChangeDisplaySettingsA"</span> LIB <span style="color: #ff0000;">"User32.dll"</span><br /><br />DLL32 <span style="color: #00C800;">FUNCTION</span> ExitWindowsEx<span style="color: #000000;">&#40;</span>uFlags AS DWORD,;<br />dwReserved AS DWORD<span style="color: #000000;">&#41;</span> AS DWORD PASCAL;<br />LIB <span style="color: #ff0000;">"user32.dll"</span><br /> </div>[/code:36wvyv8p] Best Regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
Change/save Screen-resolution to Applic.-resol. at Runtime ?
Hi Uwe, I confirm that there is a problem with the code!!! I was able to temporaly change the resolution by using the function directly right after declaring Local Variables without using a button to call it. No error was produced, but the window was not created and the original resolution was restored after a few seconds... Sorry I can not help you any further in the issue...
Change/save Screen-resolution to Applic.-resol. at Runtime ?
I just read in the Brasilian forum, that it seem that it produces the error when using xHarbour... I don't use Harbour, maybe someone can test it...
Change/save Screen-resolution to Applic.-resol. at Runtime ?
Hello it's a sample using the function from C [code=fw:1smjwbz1]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><br /><span style="color: #00C800;">function</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />? CHANGEDISLPAYRESOLUTION<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1440</span>, <span style="color: #000000;">900</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> CHANGEDISLPAYRESOLUTION <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; &nbsp;DWORD dmBitsPerPel = hb_pcount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> > <span style="color: #000000;">2</span> ? hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> : <span style="color: #000000;">0</span> ;<br />&nbsp; &nbsp;DWORD dmPelsWidth &nbsp;= hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;DWORD dmPelsHeight = hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp;DEVMODE DevMode;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp;EnumDisplaySettings<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NULL</span>, ENUM_CURRENT_SETTINGS, &DevMode <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;DevMode.dmPelsWidth = dmPelsWidth;<br />&nbsp; &nbsp;DevMode.dmPelsHeight = dmPelsHeight;<br />&nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> dmBitsPerPel > <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; DevMode.dmBitsPerPel = dmBitsPerPel;<br /><br />&nbsp; &nbsp;hb_retnl<span style="color: #000000;">&#40;</span> ChangeDisplaySettings<span style="color: #000000;">&#40;</span> &DevMode, CDS_RESET <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp;&nbsp;<br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br />&nbsp;</div>[/code:1smjwbz1]
Change/save Screen-resolution to Applic.-resol. at Runtime ?
Daniel, Thank You very much. This Function works [color=#FF0000:230wrg8c]GREAT[/color:230wrg8c] without any Problems. As well the RESET, to restore the old Screen-resolution after finishing the Application. No Validation needed ( works in silent Mode ). It's funny, that calling original API-functions, making Problems. CHANGEDISLPAYRESOLUTION( [color=#FF0000:230wrg8c]1152, 864 [/color:230wrg8c]) must use supported Values : 1024 x 768 1152 x 864 1280 x 720 1280 x 768 1280 x 960 1280 x 1024 1600 x 1200 Sample : [code=fw:230wrg8c]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> oWndMain<br /><span style="color: #00C800;">LOCAL</span> nScrwidth := GetSysmetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nScrheight := GetSysmetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">IF</span> nScrwidth <> <span style="color: #000000;">1024</span> .and. nScrheight <> <span style="color: #000000;">768</span><br />     CHANGEDISLPAYRESOLUTION<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1024</span>, <span style="color: #000000;">768</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Application Screen-resolution</span><br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oWndMain <span style="color: #0000ff;">FROM</span>  <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">260</span>, <span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> TRANSPARENT ;<br /><span style="color: #0000ff;">STYLE</span> WS_POPUP | WS_VISIBLE | WS_DLGFRAME | WS_THICKFRAME <br /><span style="color: #B900B9;">// ...</span><br /><span style="color: #B900B9;">// ...</span><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oWndMain <span style="color: #0000ff;">CENTERED</span> <br /><br /><span style="color: #B900B9;">// Back to different Screen-resolution RESET</span><br /><span style="color: #00C800;">IF</span> nScrwidth <> <span style="color: #000000;">1024</span> .and. nScrheight <> <span style="color: #000000;">768</span><br />     CHANGEDISLPAYRESOLUTION<span style="color: #000000;">&#40;</span> nScrwidth, nScrheight <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span>  <br /><br /><span style="color: #B900B9;">// ----------------</span><br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> CHANGEDISLPAYRESOLUTION <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   DWORD dmBitsPerPel = hb_pcount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> > <span style="color: #000000;">2</span> ? hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> : <span style="color: #000000;">0</span> ;<br />   DWORD dmPelsWidth  = hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />   DWORD dmPelsHeight = hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;   <br />     DEVMODE DevMode;<br />    <br />   EnumDisplaySettings<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NULL</span>, ENUM_CURRENT_SETTINGS, &DevMode <span style="color: #000000;">&#41;</span>;<br />   <br />   DevMode.dmPelsWidth = dmPelsWidth;<br />   DevMode.dmPelsHeight = dmPelsHeight;<br />   <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> dmBitsPerPel > <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />      DevMode.dmBitsPerPel = dmBitsPerPel;<br /><br />   hb_retnl<span style="color: #000000;">&#40;</span> ChangeDisplaySettings<span style="color: #000000;">&#40;</span> &DevMode, CDS_RESET <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />    <br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br /> </div>[/code:230wrg8c] Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
Change/save Screen-resolution to Applic.-resol. at Runtime ?
Am I missing something??? I Compiled Uwe's sample, but the resolution does not changes!!!! When I press escape to exit, I see the screen blink, but nothing else happens!!!!
Change/save Screen-resolution to Applic.-resol. at Runtime ?
Byron did you tested my sample?
Change/save Screen-resolution to Applic.-resol. at Runtime ?
[quote="Daniel Garcia-Gil":3e4utzzf]Byron did you tested my sample?[/quote:3e4utzzf] Yes I did; I got a dialog Alert: [img:3e4utzzf]http&#58;//www&#46;mayapos&#46;com/FiveWin/alert2&#46;jpg[/img:3e4utzzf]
Change/save Screen-resolution to Applic.-resol. at Runtime ?
Bayron you're trying set a mode not supported... [code=fw:1uciyg8c]<div class="fw" id="{CB}" style="font-family: monospace;">DISP_CHANGE_SUCCESSFUL= &nbsp;<span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp;;The settings <span style="color: #0000ff;">change</span> was successful.<br />DISP_CHANGE_RESTART= &nbsp; &nbsp; <span style="color: #000000;">1</span> &nbsp;;The computer must be restarted in order <span style="color: #00C800;">for</span> the graphics mode <span style="color: #0000ff;">to</span> work.<br />DISP_CHANGE_FAILED= &nbsp; &nbsp; <span style="color: #000000;">-1</span> &nbsp;;The <span style="color: #00C800;">display</span> driver failed the specified graphics mode.<br />DISP_CHANGE_BADMODE= &nbsp; &nbsp;<span style="color: #000000;">-2</span> &nbsp;;The graphics mode is not supported.<br />DISP_CHANGE_NOTUPDATED= <span style="color: #000000;">-3</span> &nbsp; &nbsp; &nbsp;;Unable <span style="color: #0000ff;">to</span> write settings <span style="color: #0000ff;">to</span> the registry.<br />DISP_CHANGE_BADFLAGS= &nbsp; <span style="color: #000000;">-4</span> &nbsp; &nbsp; &nbsp;;An invalid set <span style="color: #0000ff;">of</span> flags was passed in.<br />DISP_CHANGE_BADPARAM= &nbsp; <span style="color: #000000;">-5</span> &nbsp;; Bad parameters</div>[/code:1uciyg8c]
Change/save Screen-resolution to Applic.-resol. at Runtime ?
Thanks Daniel, That is why I compiled Uwe's sample... I did not get the error, but the resolution does not changes.... By the way, the resolution in your sample should be supported in my system!!! [img:6s8bjzna]http&#58;//www&#46;mayapos&#46;com/FiveWin/resolution&#46;jpg[/img:6s8bjzna] Maybe it has something to do that I have 2 monitors???
Change/save Screen-resolution to Applic.-resol. at Runtime ?
A better sample with Button-selection : ( The Exit-button restores to original Screen-resolution ) [img:122iwgqd]http&#58;//www&#46;pflegeplus&#46;com/pictures/scr4&#46;jpg[/img:122iwgqd] [code=fw:122iwgqd]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> oWndMain, oFont<br /><span style="color: #00C800;">LOCAL</span> nScrwidth := GetSysmetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, nScrheight := GetSysmetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// adjust to Application Screen-resolution</span><br /><span style="color: #B900B9;">// --------------------------------------------------</span><br /><span style="color: #00C800;">IF</span> nScrwidth <> <span style="color: #000000;">1024</span> .and. nScrheight <> <span style="color: #000000;">768</span><br />     CHANGEDISLPAYRESOLUTION<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1024</span>, <span style="color: #000000;">768</span> <span style="color: #000000;">&#41;</span> <br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">'MS Sans Serif'</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">16</span>, <span style="color: #000000;">16</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oWndMain <span style="color: #0000ff;">FROM</span>  <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">260</span>, <span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> TRANSPARENT ;<br /><span style="color: #0000ff;">STYLE</span> WS_POPUP | WS_VISIBLE | WS_DLGFRAME | WS_THICKFRAME <br /><br />@ <span style="color: #000000;">15</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"Exit"</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">25</span> <span style="color: #0000ff;">font</span> oFont <span style="color: #0000ff;">OF</span> oWndMain <span style="color: #0000ff;">PIXEL</span> ;<br /><span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> nScrwidth := <span style="color: #000000;">1024</span>, ; <span style="color: #B900B9;">// Application Screen-resolution</span><br />        nScrheight := <span style="color: #000000;">768</span>, ;<br />        oWndMain:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />@ <span style="color: #000000;">45</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"1280 x 720"</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">25</span> <span style="color: #0000ff;">font</span> oFont <span style="color: #0000ff;">OF</span> oWndMain <span style="color: #0000ff;">PIXEL</span> ;<br /><span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> CHANGEDISLPAYRESOLUTION<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1280</span>, <span style="color: #000000;">720</span> <span style="color: #000000;">&#41;</span>, ;<br />                 nScrwidth := GetSysmetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, ;<br />         nScrheight := GetSysmetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />@ <span style="color: #000000;">75</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"1280 x 720"</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">25</span> <span style="color: #0000ff;">font</span> oFont <span style="color: #0000ff;">OF</span> oWndMain <span style="color: #0000ff;">PIXEL</span> ;<br /><span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> CHANGEDISLPAYRESOLUTION<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1280</span>, <span style="color: #000000;">1024</span> <span style="color: #000000;">&#41;</span>, ;<br />                 nScrwidth := GetSysmetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span>, ;<br />         nScrheight := GetSysmetrics<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oWndMain <span style="color: #0000ff;">CENTERED</span> <br /><br />oFont:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// RESET to 1024 x 768</span><br /><span style="color: #B900B9;">// ------------------------</span><br />CHANGEDISLPAYRESOLUTION<span style="color: #000000;">&#40;</span> nScrwidth, nScrheight <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span>  <br /><br /><span style="color: #B900B9;">// ----------------</span><br /><br /><span style="color: #00D7D7;">#pragma</span> BEGINDUMP<br /><span style="color: #00D7D7;">#include</span> <hbapi.h><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><br /><br /><span style="color: #00C800;">HB_FUNC</span><span style="color: #000000;">&#40;</span> CHANGEDISLPAYRESOLUTION <span style="color: #000000;">&#41;</span><br /><span style="color: #000000;">&#123;</span><br />   DWORD dmBitsPerPel = hb_pcount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> > <span style="color: #000000;">2</span> ? hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> : <span style="color: #000000;">0</span> ;<br />   DWORD dmPelsWidth  = hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>;<br />   DWORD dmPelsHeight = hb_parnl<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>;   <br />     DEVMODE DevMode;<br />    <br />   EnumDisplaySettings<span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NULL</span>, ENUM_CURRENT_SETTINGS, &DevMode <span style="color: #000000;">&#41;</span>;<br />   <br />   DevMode.dmPelsWidth = dmPelsWidth;<br />   DevMode.dmPelsHeight = dmPelsHeight;<br />   <span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span> dmBitsPerPel > <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />      DevMode.dmBitsPerPel = dmBitsPerPel;<br /><br />   hb_retnl<span style="color: #000000;">&#40;</span> ChangeDisplaySettings<span style="color: #000000;">&#40;</span> &DevMode, CDS_RESET <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />    <br /><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00D7D7;">#pragma</span> ENDDUMP<br /> </div>[/code:122iwgqd] Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
Change/save Screen-resolution to Applic.-resol. at Runtime ?
[quote="Bayron":25wh1reb]Maybe it has something to do that I have 2 monitors???[/quote:25wh1reb] yes maybe... i'll test in my home tonight...
Change/save Screen-resolution to Applic.-resol. at Runtime ?
Thanks Uwe and Daniel, I compiled this example, but it does not do anything at all other than blinking the screen once each time I press the button. By the way I unplugged the extra monitors and only left one working, and still does not do anything... (this is weird, since I realize that it is Windows API that is asked to do the changes) Daniel, I am just providing feedback, I do not use this functions, so do not set It's priority level too high, since it is already working for Uwe; I know you are working in a lot of kool and usefull things for FiveWin!!!
Change/save Screen-resolution to Applic.-resol. at Runtime ?
I still have a Question about the Position of Desktop-Icons. After changing the Screen-resolution it is possible, that Icons are displayed on different Places. For that Reason, there are some Freeware-prog*s available ( external ) to save and restore Icon-positions. Is it maybe possible, to do this from inside a FWH-application as well ? It would make Daniel's Solution complete. A standalone Application to save / restore the Desktop-icon-positions => Download : <!-- m --><a class="postlink" href="http://www.softpedia.com/get/Desktop-Enhancements/Other-Desktop-Enhancements/DesktopSave.shtml">http://www.softpedia.com/get/Desktop-En ... Save.shtml</a><!-- m --> [img:2vpg3ile]http&#58;//www&#46;pflegeplus&#46;com/pictures/desktop&#46;jpg[/img:2vpg3ile] I still found another one. Maybe a better Solution. Autorestore, in case of a changed Screen-resolution ( saving to a File ). [img:2vpg3ile]http&#58;//www&#46;pflegeplus&#46;com/pictures/desktop3&#46;jpg[/img:2vpg3ile] Best regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
Change/save Screen-resolution to Applic.-resol. at Runtime ?
Uwe This is great! I downloaded a command line desktop restor from [url:2msrul39]http&#58;//www&#46;midiox&#46;com/desktoprestore&#46;htm[/url:2msrul39] and used the following at the start [code=fw:2msrul39]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> nScrwidth <> <span style="color: #000000;">1024</span> .and. nScrheight <> <span style="color: #000000;">768</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Copyright &nbsp; 2010 by Jamie O'Connell <!-- m --><a class="postlink" href="http://www.midiox.com">http://www.midiox.com</a><!-- m --></span><br />&nbsp; &nbsp; &nbsp; WaitRun<span style="color: #000000;">&#40;</span>cINIPath+<span style="color: #ff0000;">'DesktopCmd save /y'</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; CHANGEDISLPAYRESOLUTION<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1024</span>, <span style="color: #000000;">768</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp;</div>[/code:2msrul39] and the following trigered by closing the window 'VALID' (passing nScrwidth, nScrheight) [code=fw:2msrul39]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> nScrwidth <> <span style="color: #000000;">1024</span> .and. nScrheight <> <span style="color: #000000;">768</span><br />&nbsp; &nbsp; &nbsp; &nbsp; CHANGEDISLPAYRESOLUTION<span style="color: #000000;">&#40;</span> nScrwidth, nScrheight <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; WaitRun<span style="color: #000000;">&#40;</span>cINIPath+<span style="color: #ff0000;">'DesktopCmd restore /y'</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp;</div>[/code:2msrul39] This is its simplest form. Can be optimised in case the resolution gets changed back by the user while still in your program. Thanks Daniel! <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> Bayron have you got the resolution to change on one? or two screens? Jonathan
Change/save Screen-resolution to Applic.-resol. at Runtime ?
Jonathan, Thank You very much. This Solution works fine for me. Do You know, if the existing Resolution is written to a File or Registry ? With 2 Monitors, I couldn't test. Best Regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
Change/save Screen-resolution to Applic.-resol. at Runtime ?
Uwe [quote:24oxqyj9]Do You know, if the existing Resolution is written to a File or Registry ?[/quote:24oxqyj9] Reg => HKEY_CURRENT_USER\Software\JOConnell\DeskTop You can define a registry storage name too. More info in the rtf info in the download. I have just been looking at some of Jamie oConnell's code on the website - undocumented windows - clever! [quote:24oxqyj9]With 2 Monitors, I couldn't test.[/quote:24oxqyj9] I dont have 2 screens. I will test at a customer site next week with 2 screens. Maybe dependant upon screen driver, resolutions. It would be nice to have a command to return the resolutions available? Bayron have you got any results with 2 screens? Jonathan
Changer d'impromante automatique
Clipper 5.4Blinker 4Fw 2.1Comment changer d'imprimante pour un rapport (checks) automatiquement
Changer d'impromante automatique
You may use oPrinter:SetSize( nNewWidth, nNewHeight )
Changer d'impromante automatique
Comment changer le model :HP 1200 to HP 1020
Changer d'impromante automatique
Printer by default is HP1200For the report "Invoice" the printer is HP1020How can I change the printer
Changer d'impromante automatique
[code:30339hqi]PRINT oPrn &#46;&#46;&#46; TO "yourprinternamehere"[/code:30339hqi]EMG
Changer d'impromante automatique
Tanks .It worhs well but after printing the invoice.If I want to print another list and I try to change the printer with the function printersetup()I Can"t do it . Why???
Changes for code getcookies
Hi to all I made a change in this code adding the alltrim() to cCookie variable. Without this in some situation the functions gives error. [code=fw:58jgd88i]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> GetCookies<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> hHeadersIn := AP_HeadersIn<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> cCookies := <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> hb_HHasKey<span style="color: #000000;">&#40;</span> hHeadersIn, <span style="color: #ff0000;">"Cookie"</span> <span style="color: #000000;">&#41;</span>, hb_hGet<span style="color: #000000;">&#40;</span> hHeadersIn, <span style="color: #ff0000;">"Cookie"</span> <span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> aCookies := hb_aTokens<span style="color: #000000;">&#40;</span> cCookies, <span style="color: #ff0000;">";"</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">local</span> cCookie, hCookies := <span style="color: #000000;">&#123;</span>=><span style="color: #000000;">&#125;</span><br />   <br />   <span style="color: #00C800;">for</span> each cCookie in aCookies<br />      hb_HSet<span style="color: #000000;">&#40;</span> hCookies, <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> alltrim<span style="color: #000000;">&#40;</span>cCookie<span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span>, <span style="color: #00C800;">At</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"="</span>, alltrim<span style="color: #000000;">&#40;</span>cCookie<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>,;<br />               <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> alltrim<span style="color: #000000;">&#40;</span>cCookie<span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">At</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"="</span>, alltrim<span style="color: #000000;">&#40;</span>cCookie<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">next</span><br />   <br /><span style="color: #00C800;">return</span> hCookies<br /> </div>[/code:58jgd88i]
Changes for code getcookies
thank you!
Changing BtnBmp Icon on demand
To All I have a BtnBmp that uses icons from resources ( enabled and disabled ) and I would like to be able to change the Enabled Bitmap that shows on the button based on a programmatical logical value which needs to be changed and re-evaluated on the value of the variable. In clearer terms .. I need to change the Bitmap at runtime based on the value of a logical variable. Any Ideas ?? Thanks Rick Lipkin
Changing BtnBmp Icon on demand
Rick, [quote="Rick Lipkin":13g9s37m]To All I have a BtnBmp that uses icons from resources ( enabled and disabled ) and I would like to be able to change the Enabled Bitmap that shows on the button based on a programmatical logical value which needs to be changed and re-evaluated on the value of the variable. In clearer terms .. I need to change the Bitmap at runtime based on the value of a logical variable. Any Ideas ?? Thanks Rick Lipkin[/quote:13g9s37m] Did you try using WHEN clause? EMG
Changing BtnBmp Icon on demand
Enrico Here is a typical BtnBmp button code with Icons from resource .. I want to be able to change the Enabled Icon at runtine .. "Ok" to maybe "Finished" ( resource icons ). Where would I use the 'when' clause ? Thanks Rick Lipkin [code=fw:2yvt456f]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oBtn1 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">111</span> <span style="color: #0000ff;">OF</span> oDlg &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"OK"</span>, <span style="color: #ff0000;">"DOK"</span>, <span style="color: #ff0000;">"DOK"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">" &nbsp;&Ok &nbsp; &nbsp;"</span> <span style="color: #0000ff;">LEFT</span> <span style="color: #000000;">2007</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:2yvt456f]
Changing BtnBmp Icon on demand
Rick, [quote="Rick Lipkin":15eyrjpq]Enrico Here is a typical BtnBmp button code with Icons from resource .. I want to be able to change the Enabled Icon at runtine .. "Ok" to maybe "Finished" ( resource icons ). Where would I use the 'when' clause ? Thanks Rick Lipkin [code=fw:15eyrjpq]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oBtn1 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">111</span> <span style="color: #0000ff;">OF</span> oDlg   ;<br />         <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"OK"</span>, <span style="color: #ff0000;">"DOK"</span>, <span style="color: #ff0000;">"DOK"</span> ;<br />         <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"  &Ok    "</span> <span style="color: #0000ff;">LEFT</span> <span style="color: #000000;">2007</span>;<br />         <span style="color: #0000ff;">ACTION</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:15eyrjpq][/quote:15eyrjpq] Ok, so try using oBtn:SetFile() method. EMG
Changing BtnBmp Icon on demand
Dear Rick, I test with BmpFile and it works well. I'm not quite sure, is it what you want. [code=fw:3754ucs4]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'Fivewin.ch'</span><br /><br />   <span style="color: #00C800;">local</span> oBru, oDlg, oBtn<br />   <span style="color: #00C800;">local</span> lYes := .T.<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBru FILENAME <span style="color: #ff0000;">"../bitmaps/Backgrnd/beach.bmp"</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span>, <span style="color: #000000;">200</span> <span style="color: #0000ff;">BRUSH</span> oBru TRANSPARENT<br /><br />   @ <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Hello"</span> <span style="color: #0000ff;">OF</span> oDlg<br />   oDlg:<span style="color: #000000;">aControls</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">lTransparent</span> = .t.<br /><br />   @ <span style="color: #000000;">70</span>, <span style="color: #000000;">80</span> <span style="color: #0000ff;">BTNBMP</span> oBtn FILENAME <span style="color: #ff0000;">"../bitmaps/yes.bmp"</span> ;<br />      <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">50</span>, <span style="color: #000000;">30</span> <span style="color: #0000ff;">OF</span> oDlg NOBORDER <span style="color: #0000ff;">ACTION</span> ChangeBmp<span style="color: #000000;">&#40;</span> oBtn, @lYes<span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// MsgInfo( "click" )</span><br />      <br />   oBtn:<span style="color: #000000;">lTransparent</span> = .T.   <br />      <br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><br /><span style="color: #00C800;">Function</span> ChangeBmp<span style="color: #000000;">&#40;</span> oBtn, lYes <span style="color: #000000;">&#41;</span><br />lYes := !lYes<br /><br /><span style="color: #00C800;">if</span> lYes<br />   oBtn:<span style="color: #000000;">LoadBitmaps</span><span style="color: #000000;">&#40;</span> ,, <span style="color: #ff0000;">"../bitmaps/yes.bmp"</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">else</span><br />   oBtn:<span style="color: #000000;">LoadBitmaps</span><span style="color: #000000;">&#40;</span> ,, <span style="color: #ff0000;">"../bitmaps/no.bmp"</span> <span style="color: #000000;">&#41;</span><br /><br />end<br /><br />   oBtn:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:3754ucs4]
Changing BtnBmp Icon on demand
Dutch Thank you ... I will test your suggestion when I get to work Monday! Rick Lipkin
Changing BtnBmp Icon on demand
Hi, Ricky, you can try this, also: [code=fw:1ducgzef]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">if</span> cVar==<span style="color: #ff0000;">"A"</span><br />&nbsp; &nbsp;oBtn:<span style="color: #000000;">LoadBitmaps</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"A"</span><span style="color: #000000;">&#41;</span><br />elseif cVar ==<span style="color: #ff0000;">"B"</span><br />&nbsp; &nbsp;oBtn:<span style="color: #000000;">LoadBitmaps</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"B"</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">else</span><br />&nbsp; &nbsp;oBtn:<span style="color: #000000;">LoadBitmaps</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"X"</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endif</span><br />oBtn:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:1ducgzef] Regards.
Changing Color of Get
Hi, I have a dialog from a rc with 1 get with a numeric var and 1 multiline get . I want to change the background color of the multiline field depending of the value entered in the firts numeric . Any samples ? Thanks Philippe
Changing Color of Get
Look this, [url:2ctdfsoq]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=6&t=40181&sid=1aade6997ddab341911b652507773fdf[/url:2ctdfsoq] [url:2ctdfsoq]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=6&t=35809&sid=1aade6997ddab341911b652507773fdf[/url:2ctdfsoq] Regards, saludos.
Changing Color of Get
[code=fw:1lhv4vtr]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> aColors := <span style="color: #000000;">&#123;</span> CLR_WHITE, CLR_YELLOW, CLR_HGREEN <span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">local</span> oDlg, oFont, oGet, oMemo, n<br />   <span style="color: #00C800;">local</span> nColor   := <span style="color: #000000;">1</span><br />   <span style="color: #00C800;">local</span> CText    := <span style="color: #ff0000;">"This is some"</span> + CRLF + <span style="color: #ff0000;">"text"</span><br /><br />   SetGetColorFocus<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">300</span>,<span style="color: #000000;">350</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL<br /><br />   @ <span style="color: #000000;">20</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Color Code : "</span> <span style="color: #0000ff;">GET</span> nColor <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"9"</span> ;<br />      <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">&#40;</span> ;<br />            n  := aColors<span style="color: #000000;">&#91;</span> <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span> nColor - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> % <span style="color: #000000;">3</span> <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, ;<br />            oMemo:<span style="color: #000000;">SetColor</span><span style="color: #000000;">&#40;</span> CLR_BLACK, n <span style="color: #000000;">&#41;</span>, ;<br />            .t. <span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">60</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">GET</span> oMemo <span style="color: #0000ff;">VAR</span> cText MEMO <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">260</span>,<span style="color: #000000;">270</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />      COLORS CLR_BLACK, aColors<span style="color: #000000;">&#91;</span> nColor <span style="color: #000000;">&#93;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oMemo:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:1lhv4vtr] [url=https&#58;//imageshack&#46;com/i/pmzDwViRg:1lhv4vtr][img:1lhv4vtr]https&#58;//imagizer&#46;imageshack&#46;com/img922/8655/zDwViR&#46;gif[/img:1lhv4vtr][/url:1lhv4vtr]
Changing Color of Get
Another way to change the color of the GET: [code=fw:1llf42hz]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// C:\FWH..\SAMPLES\CORGET2.PRG</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00D7D7;">#Define</span> CLR_SOFTYELLOW nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">255</span>, <span style="color: #000000;">251</span>, <span style="color: #000000;">225</span> <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//-> Amerelo Soft.</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> aColors := <span style="color: #000000;">&#123;</span> CLR_WHITE, CLR_YELLOW, CLR_HGREEN <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oDlg, oFont, oGet, oMemo, n, oBtnCal, oBtnCan<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nColor &nbsp; := <span style="color: #000000;">1</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> CText &nbsp; &nbsp;:= <span style="color: #ff0000;">"This is some"</span> + CRLF + <span style="color: #ff0000;">"text"</span><br /><br />&nbsp; &nbsp;SetGetColorFocus<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;tGet<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">lDisColors</span> &nbsp;:= .F.<br />&nbsp; &nbsp;tGet<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">nClrTextDis</span> := CLR_HBLUE<br />&nbsp; &nbsp;tGet<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">nClrPaneDis</span> := CLR_WHITE<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont &nbsp;<span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Ms Sans Serif"</span> &nbsp;<span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">00</span>, <span style="color: #000000;">-18</span> BOLD<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">300</span>,<span style="color: #000000;">350</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL <span style="color: #0000ff;">FONT</span> oFont ;<br />&nbsp; &nbsp; &nbsp; COLORS CLR_BLACK, CLR_WHITE TRANSPARENT<br /><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">lHelpIcon</span> := .F.<br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">/*<br />&nbsp; &nbsp;@ 20,20 SAY "Color Code : " GET nColor SIZE 200,24 PIXEL PICTURE "9" ;<br />&nbsp; &nbsp; &nbsp; OF oDlg VALID ( ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; n &nbsp;:= aColors[ ( ( nColor - 1 ) % 3 ) + 1 ], ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oMemo:SetColor( CLR_BLACK, n ), ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .t. )<br />&nbsp; &nbsp;*/</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">20</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Cambiar Color: "</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>,<span style="color: #000000;">24</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">UPDATE</span> TRANSPARENT<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">60</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">GET</span> oMemo <span style="color: #0000ff;">VAR</span> cText MEMO <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">260</span>,<span style="color: #000000;">220</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg &nbsp;<span style="color: #B900B9;">/* ;<br />&nbsp; &nbsp; &nbsp; COLORS CLR_BLACK, aColors[ nColor ] */</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">300</span>, <span style="color: #000000;">100</span> &nbsp;<span style="color: #0000ff;">BTNBMP</span> oBtnCal FILENAME <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\1</span>6x16<span style="color: #000000;">\f</span>loppy.bmp"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp;FLAT <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">14</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg NOBORDER &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span> SET_COLOR<span style="color: #000000;">&#40;</span> oMemo, nColor <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">300</span>, <span style="color: #000000;">150</span> &nbsp;<span style="color: #0000ff;">BTNBMP</span> oBtnCan FILENAME <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\1</span>6x16<span style="color: #000000;">\E</span>xit.bmp"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp;FLAT <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">20</span>, <span style="color: #000000;">14</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg NOBORDER &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oBtnCan:<span style="color: #000000;">lCancel</span> := .T.<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> oMemo:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oFont:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> SET_COLOR<span style="color: #000000;">&#40;</span> oMemo, nColor <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oIni, oBrush, oBmp<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nTipo, cStyle, cFile, cLogo, nRow, nCol, lSelect<br /><br />&nbsp; &nbsp;nColor := ChooseColor<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oMemo:<span style="color: #000000;">SetColor</span><span style="color: #000000;">&#40;</span> nColor, CLR_WHITE <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oMemo:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span> nColor <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// FIN / END</span><br />&nbsp;</div>[/code:1llf42hz] Regards, saludos.
Changing Color of Get
Thanks for this samples ! Philippe
Changing Color of Get
With the new BtnClr class from Next fwh package [img:xcvtpqea]https&#58;//i&#46;postimg&#46;cc/bvk9RJtG/btnclr&#46;gif[/img:xcvtpqea]
Changing Color of Get
[quote="Silvio.Falconi":3btntiu3]With the new BtnClr class from Next fwh package [img:3btntiu3]https&#58;//i&#46;postimg&#46;cc/bvk9RJtG/btnclr&#46;gif[/img:3btntiu3][/quote:3btntiu3] Very good. Regards, saludos.
Changing Color of Get with When clause
First globally set TGet():lDisColors := .F. // Disables default disabled colors Then oGet:nClrTextDis := <nTextColorWhenDisabled> oGet:nClrPaneDis := <nBackColorWhenDisabled>
Changing Color of Get with When clause
Hi, I use the WHEN clause with GET in other to desable the GET . How is it possible to change the fore of background color when the WHEN retun .F. I'd like that the bakgroud is Yellow . REDEFINE GET oG1 var wtotal picture "999" REDEFINE GET oG2 var wxx WHEN wtotal > 10 Thanks for your help .
Changing Color of Get with When clause
Hi, TGet():lDisColors := .F. works nice but oG2:nClrTextDis := RGB( 255, 199, 206 ) dont work . Error description: Error BASE/1005 No exported variable: NCLRTEXTDIS Thanks
Changing Color of Get with When clause
These are the DATAs in TGet program DATA nClrTextDis, nClrPaneDis Please ensure oG2 is already defined as GET May I know your FWH version?
Changing Color of Get with When clause
Fivewin 2014 or 2016 Thanks for your help .
Changing Color of Get with When clause
I am not sure about 2014, but it should work with any versions from 2015 onwards. Please use your 2016 version.
Changing Color of Get with When clause
Same with FWH16 ?? What is the first argument ? Thanks . Application =========== Path and name: G:\Apps\BioBanque\bhul.exe (32 bits) Size: 3,948,544 bytes Compiler version: Harbour 3.2.0dev (r1601050904) FiveWin Version: FWH 16.10 Windows version: 6.2, Build 9200 Time from start: 0 hours 0 mins 5 secs Error occurred at: 06/03/2017, 18:22:01 Error description: Error BASE/1005 No exported variable: NCLRTEXTDIS Args: [ 1] = U [ 2] = N 13551615 Stack Calls ===========
Changing Color of Get with When clause
Can you please reproduce your program?
Changing Errorsys
Hi all, Has anyone changed the errorsys in order to quit the program only if we pulse the button QUIT? My idea is if we pulse other button, the program continues normally without quit. Is it possible? If so, how can I do it in my errorsys? Best Regards,
Changing Errorsys
It's only possible for recoverable errors. You can BREAK if you want let the main program to handle the error, return .T. to retry the operation or return .F. to ignore the error. EMG