topic
stringlengths
1
63
text
stringlengths
1
577k
Can Properties (DATA) be added dynamically to an Object (CLA
Basic code is up and running. Doesn't yet cover all possibilities but I'm happy so far.Method AddDatas performs following functions:adds DATAs (not to it's class but to the class passed in)writes field positions into the aPROPERTIES array (so that only has to be done once)writes variable names into the aVALUES array (again so that only has to be done once)It looks like this:[code:2814ou2k]METHOD AddDatas( oCalling ) CLASS VIEW LOCAL aTHIS oCalling:oDBF:Select() oCalling:oDBF:GoTo( 100 ) ::aVALUES := ARRAY( 0 ) FOR ii := 1 TO ::iProperties __ObjAddData( oCalling, ::aPROPERTIES[ii][1] ) ::aPROPERTIES[ii][3] := FieldPos( ::aPROPERTIES[ii][2] ) aTHIS := ARRAY( 2 ) aTHIS[1] := ::aPROPERTIES[ii][1] AADD( ::aVALUES, aTHIS ) NEXT[/code:2814ou2k] Method ReadValues reads values from the data base table, translates the names, converts type as appropriate and sends the values to the object passed in. It looks like: [code:2814ou2k]METHOD ReadValues( oCalling ) CLASS VIEW LOCAL cDataType FOR ii = 1 TO ::iProperties cDataType := ::aPROPERTIES[ii][4] DO CASE CASE cDataType = "D" ::aVALUES[ii][2] := STOD( FieldGet( ::aPROPERTIES[ii][3] ) ) OTHERWISE ::aVALUES[ii][2] := FieldGet( ::aPROPERTIES[ii][3] ) ENDCASE NEXT __ObjSetValueList( oCalling, ::aVALUES )[/code:2814ou2k] Method BlankValues sets values in the passed in object to blanks or defaults as appropriate. It looks like: [code:2814ou2k]METHOD BlankValues( oCalling ) CLASS VIEW LOCAL cDataType FOR ii = 1 TO ::iProperties cDataType := ::aPROPERTIES[ii][4] DO CASE CASE cDataType = "C" ::aVALUES[ii][2] := " " CASE cDataType = "D" ::aVALUES[ii][2] := CTOD(" / / ") CASE cDataType = "P" ::aVALUES[ii][2] := "[NOT_YET_SET]" CASE cDataType = "Q" ::aVALUES[ii][2] := SPACE( 16 ) CASE cDataType = "S" IF ::aPROPERTIES[ii][7] != nil ::aVALUES[ii][2] := ::aPROPERTIES[ii][7] ELSE ::aVALUES[ii][2] := SPACE( ::aPROPERTIES[ii][5] ) ENDIF CASE cDataType = "T" ::aVALUES[ii][2] := SPACE( 16 ) ENDCASE NEXT __ObjSetValueList( oCalling, ::aVALUES )[/code:2814ou2k] That just leaves method WriteValues which effectively does the reverse of ReadValues. It looks like: [code:2814ou2k]METHOD WriteValues( oCalling ) CLASS VIEW FOR ii = 1 TO ::iProperties cDataType := ::aPROPERTIES[ii][4] DO CASE CASE cDataType = "D" FieldPut( ::aPROPERTIES[ii][3], DTOS( oSend( oCalling, ::aPROPERTIES[ii][1] ) ) ) OTHERWISE FieldPut( ::aPROPERTIES[ii][3], oSend( oCalling, ::aPROPERTIES[ii][1] ) ) ENDCASE NEXT[/code:2814ou2k]This is basically operational code so I am convinced this approach will work. I think it may offer some advantages over other approaches.xProgrammer
Can TBtnbmp has TRANSPARENT?
Dear Antonio, I try to use BITMAP and BTNBMP and both has an weak and good point ( I've only few knowledge ). - BITMAP - Nice but No Motion when Click - BTNBMP - Nice and Motion but cannot TRANSPARENT. 1.) Can I make Motion on BITMAP ON CLICK as iPhone. Change Bitmap back when click as iPhone 2.) Can I Transparent BTNBMP background. [url=http://img710.imageshack.us/i/btnbmp.png/:1bg6dpjn][img:1bg6dpjn]http://img710.imageshack.us/img710/8131/btnbmp.png[/img:1bg6dpjn][/url:1bg6dpjn]
Can TBtnbmp has TRANSPARENT?
Dutch, Please email me the button image that it is inside the red circle and also the image that you want to show when it is clicked, thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Can TBtnbmp has TRANSPARENT?
Dutch, Please try this example: [code=fw:3m9hifb1]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FWCE.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> oWnd, oBmp<br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd<br /><br />   @ <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span> BITMAP oBmp FILE CurDir<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"<span style="color: #000000;">\f</span>ind.bmp"</span> NOBORDER <br />   <br />   oBmp:<span style="color: #000000;">bLClicked</span>  = <span style="color: #000000;">&#123;</span> || DeleteObject<span style="color: #000000;">&#40;</span> oBmp:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">&#41;</span>, oBmp:<span style="color: #000000;">hBitmap</span> := PalBmpRead<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, CurDir<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"<span style="color: #000000;">\f</span>ind3.bmp"</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, oBmp:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />   oBmp:<span style="color: #000000;">bLButtonUp</span> = <span style="color: #000000;">&#123;</span> || DeleteObject<span style="color: #000000;">&#40;</span> oBmp:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">&#41;</span>, oBmp:<span style="color: #000000;">hBitmap</span> := PalBmpRead<span style="color: #000000;">&#40;</span> <span style="color: #000000;">0</span>, CurDir<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"<span style="color: #000000;">\f</span>ind.bmp"</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, oBmp:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><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 /> </div>[/code:3m9hifb1]
Can TCOMBOBOX with 2 dimension array?
As subject. Thanks in advance.
Can TCOMBOBOX with 2 dimension array?
Dutch I do not think a two dimensional array is possible.. I have worked around this by concantonating two values together into a single text and loaded it to an array .. [code=fw:1tz06x6s]<div class="fw" id="{CB}" style="font-family: monospace;"><br />aEmp := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #0000ff;">Select</span> <span style="color: #000000;">1</span> <span style="color: #B900B9;">// employee</span><br />Go Top<br /><br /><span style="color: #00C800;">Do</span> <span style="color: #00C800;">While</span> .not. eof<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    cText := str<span style="color: #000000;">&#40;</span>a->EmpNumber,<span style="color: #000000;">4</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">"---"</span>+a->EmpName<br />    AAdd<span style="color: #000000;">&#40;</span> aEmp, cText <span style="color: #000000;">&#41;</span><br />    <br />    <span style="color: #0000ff;">select</span> <span style="color: #000000;">1</span><br />    skip<br /><span style="color: #00C800;">Enddo</span><br /> </div>[/code:1tz06x6s] Then if I want to extract ONLY the Employee number I substr it out from the value of cEmp [code=fw:1tz06x6s]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">COMBOBOX</span> oEmp  <span style="color: #0000ff;">var</span> cEmp    <span style="color: #0000ff;">ID</span> <span style="color: #000000;">127</span> <span style="color: #0000ff;">of</span> oDlg  ;<br />              <span style="color: #0000ff;">ITEMS</span> aEmp <span style="color: #0000ff;">UPDATE</span><br /><br />...<br />...<br /><br />b->EmpNumber := val<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">substr</span><span style="color: #000000;">&#40;</span> cEmp,<span style="color: #000000;">1</span>,<span style="color: #000000;">4</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:1tz06x6s] Rick Lipkin
Can TCOMBOBOX with 2 dimension array?
I'm not sure exactly what you are needing this for, but with DBCombo you can list one value and return another. For instance you can list a description and return an ID number. James
Can TCOMBOBOX with 2 dimension array?
Dear Rick, Thanks, it is a good idea for solve the problem. Dear James, Yes, exactly I need. Show 1 column (array) return another column as your said. How can I do that? Thank you so much.
Can TCOMBOBOX with 2 dimension array?
Dutch, Below is an example. You will also need the fwh\samples\states.dbf data file. James [code=fw:3ny3c4ll]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">/*<br />Program : DBC1.PRG<br />Purpose : Test DBCombo<br />Notes   :<br />*/</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;">"dbcombo.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 />   <span style="color: #00C800;">local</span> oDlg, oDBC1, oDBC2, cVar, oCust, cStateID:=<span style="color: #ff0000;">"  "</span>, oBtn, cState:=<span style="color: #ff0000;">""</span><br />   <span style="color: #00C800;">local</span> cDept:= space<span style="color: #000000;">&#40;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#41;</span>, oStates, aItems, aList<br />   field <span style="color: #0000ff;">NAME</span><br /><br />   <span style="color: #00C800;">if</span> file<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"states.dbf"</span><span style="color: #000000;">&#41;</span><br />      use states<br />      <span style="color: #0000ff;">index</span> <span style="color: #0000ff;">on</span> upper<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">NAME</span><span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">to</span> temp<br />      database oStates<br />   <span style="color: #00C800;">else</span><br />      <span style="color: #0000ff;">msgInfo</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"File states.dbf not found."</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;">dialog</span> oDlg<br /><br />   @ <span style="color: #000000;">10</span>,<span style="color: #000000;">30</span> dbcombo oDBC1 <span style="color: #0000ff;">var</span> cStateID <span style="color: #0000ff;">of</span> oDlg;<br />      <span style="color: #0000ff;">alias</span> oStates:<span style="color: #000000;">cAlias</span>;<br />      <span style="color: #0000ff;">size</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">200</span> <span style="color: #0000ff;">pixel</span>;<br />      itemfield <span style="color: #ff0000;">"CODE"</span> ;<br />      listfield <span style="color: #ff0000;">"NAME"</span>;<br />      <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> msgbeep<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;<br />      <span style="color: #0000ff;">update</span>;<br /><br />   aList:= <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Accounting"</span>,<span style="color: #ff0000;">"HR"</span>,<span style="color: #ff0000;">"Marketing"</span>,<span style="color: #ff0000;">"Production"</span>,<span style="color: #ff0000;">"Research"</span>,<span style="color: #ff0000;">"Shipping"</span>,<span style="color: #ff0000;">"Sales"</span><span style="color: #000000;">&#125;</span><br />   aItems:= <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"100"</span>,<span style="color: #ff0000;">"200"</span>,<span style="color: #ff0000;">"400"</span>,<span style="color: #ff0000;">"300"</span>,<span style="color: #ff0000;">"600"</span>,<span style="color: #ff0000;">"500"</span>,<span style="color: #ff0000;">"700"</span><span style="color: #000000;">&#125;</span><br /><br />   @ <span style="color: #000000;">30</span>,<span style="color: #000000;">30</span> DBCOMBO oDBC2 <span style="color: #0000ff;">VAR</span> cDept;<br />      <span style="color: #0000ff;">items</span> aItems;<br />      <span style="color: #0000ff;">size</span> <span style="color: #000000;">100</span>,<span style="color: #000000;">200</span> <span style="color: #0000ff;">pixel</span>;<br />      list aList;<br />      <span style="color: #0000ff;">of</span> oDlg;<br />      <span style="color: #0000ff;">update</span><br /><br /><br />   @ <span style="color: #000000;">50</span>, <span style="color: #000000;">50</span> <span style="color: #0000ff;">button</span> oBtn <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"Selected"</span>;<br />      <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">action</span> <span style="color: #000000;">&#40;</span>odbc1:<span style="color: #0000ff;">Select</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span>, eval<span style="color: #000000;">&#40;</span> oDBC1:<span style="color: #000000;">bChange</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">default</span><br /><span style="color: #B900B9;">//      action msgInfo( "cStateId: " +cStateID +CRLF+"DeptNo: "+cDept,"Selected" );</span><br /><span style="color: #B900B9;">//      default</span><br /><br />   @ <span style="color: #000000;">60</span>,<span style="color: #000000;">100</span> <span style="color: #0000ff;">button</span> oBtn2 <span style="color: #0000ff;">prompt</span> <span style="color: #ff0000;">"sdfs"</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">action</span> <span style="color: #0000ff;">msgInfo</span><span style="color: #000000;">&#40;</span> cStateID <span style="color: #000000;">&#41;</span> <span style="color: #0000ff;">pixel</span><br /><br />   <span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">dialog</span> oDlg <span style="color: #0000ff;">center</span>;<br /><br />   ferase<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"temp.ntx"</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;">// EOF </span></div>[/code:3ny3c4ll]
Can TCOMBOBOX with 2 dimension array?
Dutch, I just noticed you wanted to use a 2-dimensional array. You will need to copy the two columns to single dimensional arrays. Or, you could copy the entire 2-dimensional array into a temp dbf and specify the column names. See another recent thread here about temp DBFs that are all in memory. James
Can TCOMBOBOX with 2 dimension array?
Dear James, Thank you, I got it now.
Can TGraph do XY plots?
I am in need of creating a X,Y plot chart. It seems that TGraph can only make time-series point and/or line charts, i.e. plot the value of Y and increment the X value by 1 unit for each data point of Y. Since there is no documentation for TGraph it is hard to tell if it is capable of X,Y charts. Does anyone know? If so, do you have an example? James
Can TGraph do XY plots?
James, In tgraph.prg we find: #Define GRAPH_TYPE_BAR 1 #Define GRAPH_TYPE_LINE 2 #Define GRAPH_TYPE_POINT 3 #Define GRAPH_TYPE_PIE 4 so it seems as a point type is supported. In order to select a type we have to do: oGraph:nType := GRAPH_TYPE_POINT oGraph:Refresh() I have not tested it yet
Can TGraph do XY plots?
This is the right way to use it. Using samples\graph.prg example: [code=fw:d07ude0j]<div class="fw" id="{CB}" style="font-family: monospace;"><br />    @ <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span> GRAPH oGraph; <br />           <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">200</span>; <br />           TYPE <span style="color: #000000;">3</span>; <span style="color: #B900B9;">// GRAPH_TYPE_...</span><br />           YVALUES 3D XGRID YGRID XVALUES LEGENDS <br /> </div>[/code:d07ude0j] [img:d07ude0j]https&#58;//bitbucket&#46;org/fivetech/screenshots/downloads/graph_points&#46;JPG[/img:d07ude0j]
Can TGraph do XY plots?
Antonio, Yes, I have done that for years. But that is a Time-Series chart. You cannot specify the X value, only the Y value. So, X is always 1,2,3,4...and they are at equally spaced intervals. These are basically bar charts, using points and lines instead of bars. I need to be able to plot user specified x and y points. E.G.: X, Y 3.21,152 5.13, 133 7.67, 121 etc. Does that clarify it? There is another issue I forgot to mention. It seems that the Y-axis always starts at zero--there seems to be no way to specify the y-axis starting value. Thus, for instance, if you have a bunch of points all around 80 they are all going to appear very close together (almost in a straight line) since the Y-axis will be from 0 to 100. I need to be able to make the Y-axis start at around 70 and go to 100. I can't see a way to do this. I see what appears to be a hard-coded zero in the TGraph code for the start of the Y-axis. James
Can TGraph do XY plots?
James, I am afraid that you need to review Class TGraph Method Paint() and implement your own painting method for a new type. I am not familiar with Class TGraph source code, so you may need to review it and modify it to your needs.
Can TGraph do XY plots?
Antonio, Yes, that was my plan and I have done it before. But, before I start, I just wanted to check to make sure that x,y plots were not possible, and/or to see if anyone had already made any such modifications. I was just looking at the code, and I forgot about another issue. It seems that the user defined X-axis label is printed on the Y-axis and visa versa. This makes it confusing when looking at the code since you don't know if it is just the label on the chart that is wrong, or are all the code vars containing a Y actually referring to the X-axis. This will be fun... James
Can TGraph do XY plots?
Hi James, I know it is an old post, but did you implement X,Y plots in TGraph? Thank you Alvaro
Can TGraph do XY plots?
Alvaro, Sorry, no I never did. Most of my graphs are time series and TGraph works great for that. I can't remember what I did for the x,y plots that I needed back then, but I can find no evidence that I ever tried it. The TGraph code is quit complex and I expect it will take quite some time to modify it. Regards, James
Can TGraph do XY plots?
[quote="James Bott":3eouymsl]Alvaro, Sorry, no I never did. Most of my graphs are time series and TGraph works great for that. I can't remember what I did for the x,y plots that I needed back then, but I can find no evidence that I ever tried it. The TGraph code is quit complex and I expect it will take quite some time to modify it. Regards, James[/quote:3eouymsl] Thank you James, I modified the class yesterday to plot XY Charts. New data: [code=fw:3eouymsl]<div class="fw" id="{CB}" style="font-family: monospace;"> <br /><span style="color: #00D7D7;">#Define</span> GRAPH_TYPE_XY_AQ <span style="color: #000000;">6</span><br /><br />   <span style="color: #00C800;">data</span>    chart_top<br />   <span style="color: #00C800;">data</span>    chart_bottom<br />   <span style="color: #00C800;">data</span>    chart_left<br />   <span style="color: #00C800;">data</span>    chart_right<br />   <span style="color: #00C800;">DATA</span>    nXMaxVal         <span style="color: #B900B9;">// Max Value</span><br />   <span style="color: #00C800;">DATA</span>    nXMinVal         <span style="color: #B900B9;">// Min Value</span><br />   <span style="color: #00C800;">data</span>    XY_Values</div>[/code:3eouymsl] new methods [code=fw:3eouymsl]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   <span style="color: #00C800;">METHOD</span>  aq_DrawLine<span style="color: #000000;">&#40;</span> nY, nX, nHigh, nWidth, nColor, lDotted  , nPenwidth <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span>  aq_DrawPoint<span style="color: #000000;">&#40;</span> nY, nX,  nColor, lDotted , nPixels  , nPenwidth <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">// --------------------------------------------------------------------------- //</span><br /><span style="color: #00C800;">METHOD</span> aq_DrawLine<span style="color: #000000;">&#40;</span> nY1, nX1, nY2, nX2, nColor, lDotted , nPenwidth<span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TGraph<br /><span style="color: #00C800;">local</span> x1,x2,y1,y2<br /><span style="color: #00C800;">local</span> era_nPenwidth<br /><br /><span style="color: #00C800;">default</span> nPenwidth := <span style="color: #000000;">3</span><br /><br />era_nPenwidth := ::<span style="color: #000000;">nPenwidth</span><br />::<span style="color: #000000;">nPenWidth</span> :=  nPenwidth<br /><br /><br />x1 := ::<span style="color: #000000;">chart_left</span> +   <span style="color: #000000;">&#40;</span>nX1-::<span style="color: #000000;">nXMinVal</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nXMaxval</span>-::<span style="color: #000000;">nXMinVal</span><span style="color: #000000;">&#41;</span> * <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">chart_right</span> - ::<span style="color: #000000;">chart_left</span> <span style="color: #000000;">&#41;</span><br />y1 := ::<span style="color: #000000;">chart_bottom</span> - <span style="color: #000000;">&#40;</span>nY1-::<span style="color: #000000;">nMinVal</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nMaxval</span>-::<span style="color: #000000;">nMinVal</span><span style="color: #000000;">&#41;</span> * <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">chart_bottom</span> - ::<span style="color: #000000;">chart_top</span> <span style="color: #000000;">&#41;</span><br />x2 := ::<span style="color: #000000;">chart_left</span> +   <span style="color: #000000;">&#40;</span>nX2-::<span style="color: #000000;">nXMinVal</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nXMaxval</span>-::<span style="color: #000000;">nXMinVal</span><span style="color: #000000;">&#41;</span> * <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">chart_right</span> - ::<span style="color: #000000;">chart_left</span> <span style="color: #000000;">&#41;</span><br />y2 := ::<span style="color: #000000;">chart_bottom</span> - <span style="color: #000000;">&#40;</span>nY2-::<span style="color: #000000;">nMinVal</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nMaxval</span>-::<span style="color: #000000;">nMinVal</span><span style="color: #000000;">&#41;</span> * <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">chart_bottom</span> - ::<span style="color: #000000;">chart_top</span> <span style="color: #000000;">&#41;</span><br /><br />::<span style="color: #000000;">DrawLine</span><span style="color: #000000;">&#40;</span> y1, x1, y2, x2, nColor, lDotted <span style="color: #000000;">&#41;</span><br /><br />::<span style="color: #000000;">nPenWidth</span> := era_nPenwidth<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">// --------------------------------------------------------------------------- //</span><br /><span style="color: #00C800;">METHOD</span> aq_DrawPoint<span style="color: #000000;">&#40;</span> nY1, nX1, nColor, lDotted , npixels  , nPenwidth <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TGraph<br /><span style="color: #00C800;">local</span> x1,y1<br /><span style="color: #00C800;">local</span> era_nPenwidth<br /><br /><br /><span style="color: #00C800;">default</span> nPenwidth := nPenwidth<br /><span style="color: #00C800;">default</span> nPixels := <span style="color: #000000;">7</span><br /><br />era_nPenwidth := ::<span style="color: #000000;">nPenwidth</span><br />::<span style="color: #000000;">nPenWidth</span> := <span style="color: #000000;">4</span><br /><br /><br />nPixels := nPixels /<span style="color: #000000;">2</span><br /><br />x1 := ::<span style="color: #000000;">chart_left</span> +   <span style="color: #000000;">&#40;</span>nX1-::<span style="color: #000000;">nXMinVal</span> <span style="color: #000000;">&#41;</span> / <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nXMaxval</span>-::<span style="color: #000000;">nXMinVal</span><span style="color: #000000;">&#41;</span> * <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">chart_right</span> - ::<span style="color: #000000;">chart_left</span> <span style="color: #000000;">&#41;</span><br />y1 := ::<span style="color: #000000;">chart_bottom</span> - <span style="color: #000000;">&#40;</span>nY1-::<span style="color: #000000;">nMinVal</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">&#40;</span>::<span style="color: #000000;">nMaxval</span>-::<span style="color: #000000;">nMinVal</span><span style="color: #000000;">&#41;</span> * <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">chart_bottom</span> - ::<span style="color: #000000;">chart_top</span> <span style="color: #000000;">&#41;</span><br /><br />::<span style="color: #000000;">DrawLine</span><span style="color: #000000;">&#40;</span> y1 , x1-nPixels , y1+nPixels, x1, nColor, lDotted <span style="color: #000000;">&#41;</span><br />::<span style="color: #000000;">DrawLine</span><span style="color: #000000;">&#40;</span> y1+nPixels , x1 , y1, x1+nPixels, nColor, lDotted <span style="color: #000000;">&#41;</span><br />::<span style="color: #000000;">DrawLine</span><span style="color: #000000;">&#40;</span> y1 , x1+nPixels , y1-nPixels, x1, nColor, lDotted <span style="color: #000000;">&#41;</span><br />::<span style="color: #000000;">DrawLine</span><span style="color: #000000;">&#40;</span> y1-nPixels , x1 , y1 , x1-nPixels , nColor, lDotted <span style="color: #000000;">&#41;</span><br /><br />::<span style="color: #000000;">nPenWidth</span> := era_nPenwidth<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /> </div>[/code:3eouymsl] This line at the begining of method new and method redefine [code=fw:3eouymsl]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   ::<span style="color: #000000;">XY_Values</span> :=<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /> </div>[/code:3eouymsl] This lines in the Paint method after the tag // Graph borders [code=fw:3eouymsl]<div class="fw" id="{CB}" style="font-family: monospace;"><br />::<span style="color: #000000;">chart_top</span> := nTop<br />::<span style="color: #000000;">chart_bottom</span> := nBottom<br />::<span style="color: #000000;">chart_left</span> := nLeft<br />::<span style="color: #000000;">chart_right</span> := nRight<br /> </div>[/code:3eouymsl] And finally this lines in the Paint method before the tag // legends or // Max, Min values [code=fw:3eouymsl]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nType</span> == GRAPH_TYPE_XY_AQ<br />      <span style="color: #00C800;">FOR</span> nJ := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aSeries</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">for</span> nI := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">XY_Values</span><span style="color: #000000;">&#91;</span>nJ<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">-1</span><br />          ::<span style="color: #000000;">aq_Drawline</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">XY_Values</span><span style="color: #000000;">&#91;</span>nJ, nI,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> , ::<span style="color: #000000;">XY_Values</span><span style="color: #000000;">&#91;</span>nJ,nI,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> , ;<br />                           ::<span style="color: #000000;">XY_Values</span><span style="color: #000000;">&#91;</span>nJ, nI<span style="color: #000000;">+1</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> , ::<span style="color: #000000;">XY_Values</span><span style="color: #000000;">&#91;</span>nJ, nI<span style="color: #000000;">+1</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>, ::<span style="color: #000000;">aSeries</span><span style="color: #000000;">&#91;</span>nj,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">next</span> nI<br /><br />         <span style="color: #00C800;">if</span> len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">XY_Values</span><span style="color: #000000;">&#91;</span>nJ<span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">1</span><br />            ::<span style="color: #000000;">aq_DrawPoint</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">XY_Values</span><span style="color: #000000;">&#91;</span>nJ, <span style="color: #000000;">1</span>,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> , ::<span style="color: #000000;">XY_Values</span><span style="color: #000000;">&#91;</span>nJ,<span style="color: #000000;">1</span>,<span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> , ::<span style="color: #000000;">aSeries</span><span style="color: #000000;">&#91;</span>nj,<span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> ,,  <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">endif</span><br />      <span style="color: #00C800;">next</span> nJ<br />      <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lYVal</span><br />            ::<span style="color: #0000ff;">Say</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">325</span> , <span style="color: #000000;">80</span> , <span style="color: #ff0000;">"Hola"</span> , ::<span style="color: #000000;">aFont</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>, rgb<span style="color: #000000;">&#40;</span><span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span> , ::<span style="color: #000000;">nTLeft</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">endif</span><br />   <span style="color: #00C800;">endif</span><br /> </div>[/code:3eouymsl] Then in your prg code you have to put [code=fw:3eouymsl]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   oChart:<span style="color: #000000;">nType</span>    := GRAPH_TYPE_XY_AQ<br /><br /> oChart:<span style="color: #000000;">nMaxVal</span>   := max_value <span style="color: #B900B9;">//  your calculated max value for Y axis</span><br /> oChart:<span style="color: #000000;">nMinVal</span>   := min_value  <span style="color: #B900B9;">//  your calculated min value for Y axis</span><br /> oChart:<span style="color: #000000;">nXMaxVal</span>  := max_Xvalue  <span style="color: #B900B9;">//  your calculated max value for X axis</span><br /> oChart:<span style="color: #000000;">nXMinVal</span>  := min_Xvalue    <span style="color: #B900B9;">//  your calculated min value for X axis</span><br /><br /> oChart:<span style="color: #000000;">AddSerie</span><span style="color: #000000;">&#40;</span>  <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span> , <span style="color: #ff0000;">"name_or_the_serie1"</span> , RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">128</span>,<span style="color: #000000;">128</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// empty array</span><br /> aadd<span style="color: #000000;">&#40;</span> oChart:<span style="color: #000000;">XY_Values</span> , aArray1  <span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// aArray1 is an array with the XY points  i.e. {   { 1.25 , 9.25} , { 1.5  , 9.452 } , ......}</span><br /><br /> oChart:<span style="color: #000000;">AddSerie</span><span style="color: #000000;">&#40;</span>  <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span> , <span style="color: #ff0000;">"name_or_the_serie2"</span> , RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">128</span>,<span style="color: #000000;">128</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// empty array</span><br /> aadd<span style="color: #000000;">&#40;</span> oChart:<span style="color: #000000;">XY_Values</span> , aArray2  <span style="color: #000000;">&#41;</span>  <span style="color: #B900B9;">// aArray2 is an array with the XY points  i.e. {   { 3.25 , 7.25} , { 2.5  , 8.452 } , ......}</span><br /><br />you may add more series<br /><br /> </div>[/code:3eouymsl] [code=fw:3eouymsl]<div class="fw" id="{CB}" style="font-family: monospace;"> </div>[/code:3eouymsl] Regards
Can TGraph do XY plots?
Alvaro, Wow, very impressive. May I get a copy of your new tgraph.prg? You can find my email address on my website [url:3o82zgb4]http&#58;//gointellitech&#46;com[/url:3o82zgb4].
Can TGraph do XY plots?
[quote="James Bott":uc9ajr2k]Alvaro, Wow, very impressive. May I get a copy of your new tgraph.prg? You can find my email address on my website [url:uc9ajr2k]http&#58;//gointellitech&#46;com[/url:uc9ajr2k].[/quote:uc9ajr2k] Sent, regards Alvaro
Can TGraph do XY plots?
Alvaro, Would you mind to post it here or send it to me by email, so we can include it in next FWH 18.02 ? many thanks
Can TGraph do XY plots?
Alvaro, It is not clear to me if you are automatically finding the min and max for each axis in the class, or if you must do the calculation outside the class and pass those values. One of the first programs I wrote (way back in the BASIC era, circa 1980), I wrote code to find those values. I discovered that it was a challenge to find those values since they needed to be rounded up (or down) to a reasonable number that made the chart look right. E.G. rounding 10.3 to 11 or 15 or whatever. Of course, being able to specify the ranges by overriding the internal calculations would also be useful. ------------------------------ May I suggest changing this line: oChart:nType := GRAPH_TYPE_XY_AQ To something like this: oChart:nType := GRAPH_TYPE_XY //AQ I am assuming AQ are your initials? The above change just keeps the naming consistent with the existing ones. If you care to share this modified class with everyone, then I would also first make sure you have the latest copy of TGraph, and make your changes to that version. Also I would suggest adding comments at the top explaining your work and adding your name and contact info. I am looking forward to seeing your modified TGraph class. Regards, James
Can TGraph do XY plots?
[quote="James Bott":3ofa5cfm]Alvaro, It is not clear to me if you are automatically finding the min and max for each axis in the class, or if you must do the calculation outside the class and pass those values. One of the first programs I wrote (way back in the BASIC era, circa 1980), I wrote code to find those values. I discovered that it was a challenge to find those values since they needed to be rounded up (or down) to a reasonable number that made the chart look right. E.G. rounding 10.3 to 11 or 15 or whatever. Of course, being able to specify the ranges by overriding the internal calculations would also be useful. ------------------------------ May I suggest changing this line: oChart:nType := GRAPH_TYPE_XY_AQ To something like this: oChart:nType := GRAPH_TYPE_XY //AQ I am assuming AQ are your initials? The above change just keeps the naming consistent with the existing ones. If you care to share this modified class with everyone, then I would also first make sure you have the latest copy of TGraph, and make your changes to that version. Also I would suggest adding comments at the top explaining your work and adding your name and contact info. I am looking forward to seeing your modified TGraph class. Regards, James[/quote:3ofa5cfm] I use this to calculate the min/max values, I will add to the class. Please send me the last one. I will also work on displaying the XTitles [code=fw:3ofa5cfm]<div class="fw" id="{CB}" style="font-family: monospace;"><br />&nbsp;oChart:<span style="color: #000000;">nXMaxVal</span> &nbsp;:= max_Xvalue + <span style="color: #000000;">&#40;</span> max_Xvalue - min_Xvalue <span style="color: #000000;">&#41;</span> *.<span style="color: #000000;">1</span><br />&nbsp;oChart:<span style="color: #000000;">nXMinVal</span> &nbsp;:= min_Xvalue - <span style="color: #000000;">&#40;</span> max_Xvalue - min_Xvalue <span style="color: #000000;">&#41;</span> *.<span style="color: #000000;">1</span><br />&nbsp;</div>[/code:3ofa5cfm] Regards
Can TGraph do XY plots?
I should clarify, in the beginning of this thread I was talking about making an x,y chart with just data points. This is also commonly called a scatter chart. For this type of chart the data points can be in any order. You can see a sample scatter chart here: [url:2xrnf1kl]https&#58;//www&#46;highcharts&#46;com/docs/chart-and-series-types/scatter-chart[/url:2xrnf1kl] The line chart that TGraph has already, is a series chart where the X-axis data is in increasing order starting from the smallest point. An example might be temperature vs month-of-the-year. Here is a sample line chart: [url:2xrnf1kl]https&#58;//www&#46;highcharts&#46;com/docs/chart-and-series-types/line-chart[/url:2xrnf1kl] Alvaro, which type of chart are you looking for? What type of data are you working with?
Can TGraph do XY plots?
[quote="James Bott":2k9cmpsi]I should clarify, in the beginning of this thread I was talking about making an x,y chart with just data points. This is also commonly called a scatter chart. For this type of chart the data points can be in any order. You can see a sample scatter chart here: [url:2k9cmpsi]https&#58;//www&#46;highcharts&#46;com/docs/chart-and-series-types/scatter-chart[/url:2k9cmpsi] The line chart that TGraph has already, is a series chart where the X-axis data is in increasing order starting from the smallest point. An example might be temperature vs month-of-the-year. Here is a sample line chart: [url:2k9cmpsi]https&#58;//www&#46;highcharts&#46;com/docs/chart-and-series-types/line-chart[/url:2k9cmpsi] Alvaro, which type of chart are you looking for? What type of data are you working with?[/quote:2k9cmpsi] I did the first one, the "Scatter Chart". It's is already working. I have to finish minor changes. I will send it to you when finished. In my modified class you can choose between drawing individual points or drawing a line between points, in this case in the same order that the points have in the array, although the distance between x values may not be constant and may increase and decrease. I forgot in my previous posts to credit the author of the excellent class, Alfredo Arteaga. Regards, Alvaro A working example of the modified class [img:2k9cmpsi]https&#58;//farm5&#46;staticflickr&#46;com/4653/40668023431_850c992d30_b&#46;jpg[/img:2k9cmpsi]
Can TGraph do XY plots?
[quote="Antonio Linares":1x5e00ix]Alvaro, Would you mind to post it here or send it to me by email, so we can include it in next FWH 18.02 ? many thanks[/quote:1x5e00ix] Hi Antonio, sorry I skipped your message yesterday. If the class is going to be included in the next release of FWH I will polish it a little and I will add some comments. Give me a few days. Alvaro
Can TGraph do XY plots?
Many thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Can TGraph do XY plots?
[quote="Antonio Linares":1rt50fs0]Many thanks <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:1rt50fs0] Antonio, I just sent you an email with the class Regards
Can TSButton use ::bDropOver?
I would like to use TSButton (Drag and Drop) between SBUTTON but bDropOver is not working. Can it works with Drag and Drop features?
Can Windows Mobile UIs Look as Good as the iPhone
[quote:f2xonx8q]Microsoft tells developers: do not count on us - just imitate iPhone by hand ! May 16, 2009 [Pocket PC phone] | By Edward J. R. Through the voice of their MVPs, Microsoft suggests that with some tricks, i.e. workarounds, developers can get looks like in the iPhone. What is this? Why Microsoft simply couldn't provide proper APIs and class libraries to make implementation of finger-friendly UI easy and straightforward? Because Microsoft is belated with Windows Mobile 7 (that will have such classes), and Windows Mobile 6.5 simply doesn't have such stuff as finger-friendly libraries/APIs for programmers at all... ... the standard controls in the Visual Studio Toolbox look a bit 'Windows 95-ish', but armed with some fairly simple programming techniques, a little knowledge of how controls get painted on the screen and the skills of a decent graphic artist, Windows Mobile developers can create applications that look great--[color=#FF0000:f2xonx8q][i:f2xonx8q][b:f2xonx8q]and enjoy the far superior productivity that developing with the .NET Compact Framework gives you[/b:f2xonx8q][/i:f2xonx8q][/color:f2xonx8q]. [url:f2xonx8q]http&#58;//forums&#46;fivetechsupport&#46;com/posting&#46;php?mode=post&f=4[/url:f2xonx8q] [/quote:f2xonx8q]
Can Windows Mobile UIs Look as Good as the iPhone
I saw on sdk there is a sample for the phone.lib but I not Know How we can create it: <!-- m --><a class="postlink" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9996b314-0364-4623-9ede-0b5fbb133652&displaylang=en&Hash=puAFYIedi3ftTAUAtvTJC7mLKar0FoUaLE%2bEhU1XibYfpL310m31Y07yRLYuuYoBibtPTVIKxX9b6ag0runXZg%3d%3d">http://www.microsoft.com/downloads/deta ... nXZg%3d%3d</a><!-- m -->
Can Windows Mobile UIs Look as Good as the iPhone
I inserted the wrong link. This is the right one: <!-- m --><a class="postlink" href="http://www.msteched.com/online/view.aspx?tid=a6641301-add9-4a03-b767-53197c3baf74">http://www.msteched.com/online/view.asp ... 197c3baf74</a><!-- m --> Regards, Otto
Can Windows Mobile UIs Look as Good as the iPhone
Otto, Have a look a Microsoft next Windows Mobile version: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=19&t=14758">viewtopic.php?f=19&t=14758</a><!-- l -->
Can Xbrowse show ALL used Mem variables ?
As a inspector, we can use : xbrowser(oWnd) Can we also use it to show all memory variables that are in use ? Now I put a msginfo(cData) to see what is de value if i'm not sure.. Maybe it can be done with the power of Xbrowse(r)
Can Xbrowse show ALL used Mem variables ?
Please try this program [code=fw:2dflv4ch]<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> cParam <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nn := <span style="color: #ff0000;">"kk"</span><br /><br />&nbsp; &nbsp;func2<span style="color: #000000;">&#40;</span> <span style="color: #000000;">2</span>, <span style="color: #000000;">3</span>, <span style="color: #000000;">4</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> func2<span style="color: #000000;">&#40;</span> a, b, c <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> x := <span style="color: #000000;">20</span>, y := <span style="color: #000000;">30</span><br /><br />&nbsp; &nbsp;func3<span style="color: #000000;">&#40;</span> a+b, b+c, <span style="color: #00C800;">nil</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> func3<span style="color: #000000;">&#40;</span> x, y, z <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> p := <span style="color: #000000;">100</span>, q, r := date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;StackVars<span style="color: #000000;">&#40;</span> .t. <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: #00C800;">function</span> StackVars<span style="color: #000000;">&#40;</span> lBrw <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> n := <span style="color: #000000;">1</span>, aInfo := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>, nParam, nLocal<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">while</span> ! Empty<span style="color: #000000;">&#40;</span> ProcName<span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />#ifdef __XHARBOUR__<br /><br />&nbsp; &nbsp; &nbsp; AAdd<span style="color: #000000;">&#40;</span> aInfo, <span style="color: #000000;">&#123;</span> ProcName<span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span>, cFileNoPath<span style="color: #000000;">&#40;</span> ProcFile<span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ProcLine<span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span>, &nbsp;<span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />#endif<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> !Empty<span style="color: #000000;">&#40;</span> aInfo <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">for</span> nParam = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> ParamCount<span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AAdd<span style="color: #000000;">&#40;</span> ATail<span style="color: #000000;">&#40;</span> aInfo <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span>, GetParam<span style="color: #000000;">&#40;</span> n, nParam <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">for</span> nLocal = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> LocalCount<span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AAdd<span style="color: #000000;">&#40;</span> ATail<span style="color: #000000;">&#40;</span> aInfo <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span>, GetLocal<span style="color: #000000;">&#40;</span> n, nLocal <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />#ifndef __XHARBOUR__<br /><br />&nbsp; &nbsp; &nbsp; AAdd<span style="color: #000000;">&#40;</span> aInfo, <span style="color: #000000;">&#123;</span> ProcName<span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span>, cFileNoPath<span style="color: #000000;">&#40;</span> ProcFile<span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>, ProcLine<span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />#endif<br /><br />&nbsp; &nbsp; &nbsp; n++<br />&nbsp; &nbsp;end<br /><br />#ifndef __XHARBOUR__<br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> !Empty<span style="color: #000000;">&#40;</span> aInfo <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">for</span> nParam = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> ParamCount<span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AAdd<span style="color: #000000;">&#40;</span> ATail<span style="color: #000000;">&#40;</span> aInfo <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span>, GetParam<span style="color: #000000;">&#40;</span> n, nParam <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">for</span> nLocal = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> LocalCount<span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AAdd<span style="color: #000000;">&#40;</span> ATail<span style="color: #000000;">&#40;</span> aInfo <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span>, GetLocal<span style="color: #000000;">&#40;</span> n, nLocal <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">next</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br /><br />#endif<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> lBrw == .t.<br />&nbsp; &nbsp; &nbsp; BrowseStack<span style="color: #000000;">&#40;</span> aInfo <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> aInfo<br /><br /><span style="color: #00C800;">function</span> BrowseStack<span style="color: #000000;">&#40;</span> aStack <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oFont, oBrw1, oBrw2, oBrw3, nCol<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;">"ARIAL"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-12</span><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;">710</span>,<span style="color: #000000;">300</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL <span style="color: #0000ff;">FONT</span> oFont ;<br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TITLE</span> cFileNoPath<span style="color: #000000;">&#40;</span> ExeName<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" : STACK"</span> RESIZABLE<br /><br />&nbsp; &nbsp;nCol &nbsp;:= <span style="color: #000000;">10</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">10</span>, nCol <span style="color: #0000ff;">XBROWSE</span> oBrw1 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">300</span>,<span style="color: #000000;">-10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; DATASOURCE aStack COLUMNS <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">3</span> ;<br />&nbsp; &nbsp; &nbsp; HEADERS <span style="color: #ff0000;">"PROCEDURE"</span>, <span style="color: #ff0000;">"MODULE"</span>, <span style="color: #ff0000;">"LINE"</span> ;<br />&nbsp; &nbsp; &nbsp; COLSIZES <span style="color: #00C800;">nil</span>, <span style="color: #000000;">-12</span>, <span style="color: #ff0000;">"999999"</span> ;<br />&nbsp; &nbsp; &nbsp; CELL LINES NOBORDER FOOTERS<br /><br />&nbsp; &nbsp;WITH OBJECT oBrw1<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nStretchCol</span> &nbsp; := <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lHScroll</span> &nbsp; &nbsp; &nbsp;:= .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lVScroll</span> &nbsp; &nbsp; &nbsp;:= .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bRecSelData</span> &nbsp; := <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">BookMark</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bRecSelFooter</span> := <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">nLen</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nRecSelWidth</span> &nbsp;:= <span style="color: #ff0000;">"99"</span><br /><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bChange</span> &nbsp; &nbsp; &nbsp; := < ||<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw2:<span style="color: #000000;">aArrayData</span> &nbsp;:= oBrw1:<span style="color: #000000;">aRow</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw2:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw2:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw3:<span style="color: #000000;">aArrayData</span> &nbsp;:= oBrw1:<span style="color: #000000;">aRow</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw3:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oBrw3:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;><br /><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;nCol &nbsp;+= oBrw1:<span style="color: #000000;">nWidth</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">10</span>, nCol <span style="color: #0000ff;">XBROWSE</span> oBrw2 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">180</span>,<span style="color: #000000;">-10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; DATASOURCE aStack<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">4</span><span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; COLUMNS <span style="color: #000000;">&#123;</span> || ValType<span style="color: #000000;">&#40;</span> oBrw2:<span style="color: #000000;">aRow</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">1</span> ;<br />&nbsp; &nbsp; &nbsp; HEADERS <span style="color: #ff0000;">"TYP"</span>, <span style="color: #ff0000;">"PARAM"</span> ;<br />&nbsp; &nbsp; &nbsp; CELL LINES NOBORDER FOOTERS<br /><br />&nbsp; &nbsp;WITH OBJECT oBrw2<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nStretchCol</span> &nbsp; := <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lHScroll</span> &nbsp; &nbsp; &nbsp;:= .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lVScroll</span> &nbsp; &nbsp; &nbsp;:= .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bRecSelData</span> &nbsp; := <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">BookMark</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bRecSelFooter</span> := <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">nLen</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nRecSelWidth</span> &nbsp;:= <span style="color: #ff0000;">"99"</span><br /><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;nCol &nbsp;+= oBrw2:<span style="color: #000000;">nWidth</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">10</span>, nCol <span style="color: #0000ff;">XBROWSE</span> oBrw3 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">180</span>,<span style="color: #000000;">-10</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; DATASOURCE aStack<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">5</span><span style="color: #000000;">&#93;</span> ;<br />&nbsp; &nbsp; &nbsp; COLUMNS <span style="color: #000000;">&#123;</span> || ValType<span style="color: #000000;">&#40;</span> oBrw3:<span style="color: #000000;">aRow</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span>, <span style="color: #000000;">1</span> ;<br />&nbsp; &nbsp; &nbsp; HEADERS <span style="color: #ff0000;">"TYP"</span>, <span style="color: #ff0000;">"LOCAL"</span> ;<br />&nbsp; &nbsp; &nbsp; CELL LINES NOBORDER FOOTERS<br /><br />&nbsp; &nbsp;WITH OBJECT oBrw3<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nStretchCol</span> &nbsp; := <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lHScroll</span> &nbsp; &nbsp; &nbsp;:= .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">lVScroll</span> &nbsp; &nbsp; &nbsp;:= .f.<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bRecSelData</span> &nbsp; := <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">BookMark</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">bRecSelFooter</span> := <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">nLen</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">nRecSelWidth</span> &nbsp;:= <span style="color: #ff0000;">"99"</span><br /><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;END<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:2dflv4ch]
Can Xbrowse show ALL used Mem variables ?
Is it possible to show the var names also ? cData:= "Test" Test is in the browse Can the varname cData also be there ?
Can Xbrowse show ALL used Mem variables ?
Marc, [url:3ef7mo6y]https&#58;//harbour&#46;github&#46;io/doc/harbour&#46;html#__mvdbginfo[/url:3ef7mo6y] [code=fw:3ef7mo6y]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbmemvar.ch"</span><br /><br />MEMVAR cPublic<br />MEMVAR cPrivate<br />MEMVAR ccPublic<br />MEMVAR ccPrivate<br /><br />PROCEDURE Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nCount, tmp, xValue, cName<br /><br />&nbsp; &nbsp;nCount := __mvDbgInfo<span style="color: #000000;">&#40;</span> HB_MV_PUBLIC <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">FOR</span> tmp := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> nCount<br />&nbsp; &nbsp; &nbsp; xValue := __mvDbgInfo<span style="color: #000000;">&#40;</span> HB_MV_PUBLIC, tmp, @cName <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ? tmp, cName, xValue<br />&nbsp; &nbsp;<span style="color: #00C800;">NEXT</span><br /><br />&nbsp; &nbsp;? <span style="color: #ff0000;">"PUBLIC="</span>, __mvDbgInfo<span style="color: #000000;">&#40;</span> HB_MV_PUBLIC <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;? <span style="color: #ff0000;">"PRIVATE="</span>, __mvDbgInfo<span style="color: #000000;">&#40;</span> HB_MV_PRIVATE <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">PUBLIC</span> cPublic := <span style="color: #ff0000;">"cPublic in MAIN"</span><br /><br />&nbsp; &nbsp;? <span style="color: #ff0000;">"PUBLIC="</span>, __mvDbgInfo<span style="color: #000000;">&#40;</span> HB_MV_PUBLIC <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;? <span style="color: #ff0000;">"PRIVATE="</span>, __mvDbgInfo<span style="color: #000000;">&#40;</span> HB_MV_PRIVATE <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">PRIVATE</span> cPrivate := <span style="color: #ff0000;">"cPrivate in MAIN"</span><br /><br />&nbsp; &nbsp;? <span style="color: #ff0000;">"PUBLIC="</span>, __mvDbgInfo<span style="color: #000000;">&#40;</span> HB_MV_PUBLIC <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;? <span style="color: #ff0000;">"PRIVATE="</span>, __mvDbgInfo<span style="color: #000000;">&#40;</span> HB_MV_PRIVATE <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;CountMemvars<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;? <span style="color: #ff0000;">"Back in Main"</span><br />&nbsp; &nbsp;? <span style="color: #ff0000;">"PUBLIC="</span>, __mvDbgInfo<span style="color: #000000;">&#40;</span> HB_MV_PUBLIC <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;? <span style="color: #ff0000;">"PRIVATE="</span>, __mvDbgInfo<span style="color: #000000;">&#40;</span> HB_MV_PRIVATE <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span><br /><br /><span style="color: #00C800;">STATIC</span> PROCEDURE CountMemvars<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> nCount, tmp, xValue, cName<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">PUBLIC</span> ccPublic := <span style="color: #ff0000;">"ccPublic"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">PRIVATE</span> ccPrivate := <span style="color: #ff0000;">"ccPrivate"</span><br /><br />&nbsp; &nbsp;? <span style="color: #ff0000;">"In CountMemvars"</span><br />&nbsp; &nbsp;? <span style="color: #ff0000;">"PUBLIC="</span>, __mvDbgInfo<span style="color: #000000;">&#40;</span> HB_MV_PUBLIC <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;? <span style="color: #ff0000;">"PRIVATE="</span>, __mvDbgInfo<span style="color: #000000;">&#40;</span> HB_MV_PRIVATE <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">PRIVATE</span> cPublic := <span style="color: #ff0000;">"cPublic"</span><br /><br />&nbsp; &nbsp;? <span style="color: #ff0000;">"PUBLIC="</span>, __mvDbgInfo<span style="color: #000000;">&#40;</span> HB_MV_PUBLIC <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;? <span style="color: #ff0000;">"PRIVATE="</span>, __mvDbgInfo<span style="color: #000000;">&#40;</span> HB_MV_PRIVATE <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;nCount := __mvDbgInfo<span style="color: #000000;">&#40;</span> HB_MV_PRIVATE <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span><br />&nbsp; &nbsp;<span style="color: #00C800;">FOR</span> tmp := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> nCount<br />&nbsp; &nbsp; &nbsp; xValue := __mvDbgInfo<span style="color: #000000;">&#40;</span> HB_MV_PRIVATE, tmp, @cName <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ? tmp, <span style="color: #ff0000;">"="</span>, cName, xValue<br />&nbsp; &nbsp;<span style="color: #00C800;">NEXT</span><br /><br />&nbsp; &nbsp;nCount := __mvDbgInfo<span style="color: #000000;">&#40;</span> HB_MV_PUBLIC <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">1</span><br />&nbsp; &nbsp;<span style="color: #00C800;">FOR</span> tmp := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> nCount<br />&nbsp; &nbsp; &nbsp; xValue := __mvDbgInfo<span style="color: #000000;">&#40;</span> HB_MV_PUBLIC, tmp, @cName <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ? tmp, <span style="color: #ff0000;">"="</span>, cName, xValue<br />&nbsp; &nbsp;<span style="color: #00C800;">NEXT</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">RETURN</span></div>[/code:3ef7mo6y]
Can Xbrowse show Hex. Color codes
Hey, Can Xbrowse show's a array/dbf with colorcodes in hex. Format like #4286f4 I need to show colors codes in Hex
Can Xbrowse show Hex. Color codes
Colors with notation like "#rrggbb" can be converted to normal RGB values with this function: [code=fw:jq89ls1t]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> X2RGB<span style="color: #000000;">&#40;</span> cClr <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> r &nbsp;:= HEXTONUM<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> cClr, <span style="color: #000000;">2</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> g &nbsp;:= HEXTONUM<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> cClr, <span style="color: #000000;">4</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> b &nbsp;:= HEXTONUM<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> cClr, <span style="color: #000000;">6</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> nRGB<span style="color: #000000;">&#40;</span> r, g, b <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:jq89ls1t] For example, X2RGB( "#4286f4" ) --> 16025154
Can a FWH-32 Bit win program run on a Mac
Hello, We have a Die-Hard fan for Mac in our soccer group. We use a FWH with Maria DB online program, but I think that will not run on Mac. Are there Win emulators or so on Mac to get it going ?
Can a FWH-32 Bit win program run on a Mac
In 2015 there was a solution, but anno 2018 there is a new way. From Antonio Puedes ejecutar tu aplicación FWH para Windows directamente en Mac usando: <!-- m --><a class="postlink" href="http://winebottler.kronenberg.org/">http://winebottler.kronenberg.org/</a><!-- m --> FiveMac te permite que sea una aplicación nativa propia de OSX ( Mac ).
Can a FWH-32 Bit win program run on a Mac
Marc, Try WinBottler
Can a FWH-32 Bit win program run on a Mac
Hi You can install Vmware Fusion and run Windows on the Mac. I've been using it for over 10 years and it's great. No problem at all.
Can a FWH-32 Bit win program run on a Mac
I use Parallels on an iMac 27" and a MacBook Pro ( newest model ). I do all my programming on it now. Parallels has a Cohesion mode so you do not have to see the Windows desktop. Just open the application and then Save on Dock. The icon to start the program will show like on the Windows task bar. Click it to run side by side with the Mac applications. It opens it like it normally would, and it runs perfectly. I have my Windows editor ( UE Studio ), Visual Studio 2017, my applications, and a few others all running on the same desktop as all of the Mac versions. It is seamless.
Can a FWH-32 Bit win program run on a Mac
I will try this approach. Thanks all.
Can a FWH-32 Bit win program run on a Mac
You can try a copy of Parallels at no cost. If your customer loves the Mac, they will love this option because it simply allows the program to run just like all their Mac programs, does not require a reboot into a different OS, and the support is excellent.
Can a dialog be resized ?
I need to resize a dialog that is displaying an image. If the user selects to stretch the current image or display another one with different size, then the dialog changes it size to the new one. Can this be done ? Thank you.
Can a dialog be resized ?
Gustavo,oDlg:SetSize( nNewWidth, nNewHeight )or simply:oDlg:nWidth := ...oDlg:nHeight := ...With oDlg:SetSize() you do it in one single step.
Can a dialog be resized ?
Hello HunterEC, Your question is : the dialog resized to the Image-size.Shows this Screenshot, what you want to do ?The Preview of the real Alpha-Channel-BMP,is shown in a adjusted Dialog in relation to the Image-size.[img:cpf44mlu]http&#58;//www&#46;pflegeplus&#46;com/pictures/dialogadjust&#46;jpg[/img:cpf44mlu][code:cpf44mlu] // The Dialog-Button to Show a adjusted-Dialog // ----------------------------------------------------------- REDEFINE BUTTONBMP oBtn12 ID 75 OF oDlg3 ; ACTION &#40; ALPHA_IMG&#40;oDlg3, cImage&#41; &#41; ; BITMAP "preview" PROMPT " &Alpha-Channel" TEXTRIGHT oBtn12&#58;cTooltip = &#123; "Preview" + CRLF + ; "Alpha-Channel","Preview", 1, CLR_BLACK, 14089979 &#125; // ------------ Image-Resource in Folder for normal Preview // ------------on Record-change in xBrowse => oBMP10&#58;Refresh&#40;&#41; ----- REDEFINE BITMAP oBMP10 ID 210 ADJUST RESOURCE "Blanc" OF oFolder&#58;aDialogs&#91;1&#93; UPDATE oBMP10&#58;bPainted &#58;= &#123;|hDC| DRAW_IMG1&#40; oBMP10, cIMAGE &#41; &#125; // ------------ IMAGE - Preview in Folder ----------------------------------- FUNCTION DRAW_IMG1&#40; oBitmap, cBitmap&#41; DEFINE IMAGE oImage FILENAME "&c_Path\" + ALLTRIM&#40;cSUBDIR&#41; + cBitmap // Image-Size adjusted to BMP-resource in Folder // If the Image is bigger, it is reduced to the < TBitmap-Resource > size // -------------------------------------------------------------------------------- aRect &#58;= GETCLIENTRECT&#40; oBitmap&#58;hWnd &#41; hDC &#58;= oBitmap&#58;GETDC&#40;&#41; IF nWIDTH < aRect&#91;4&#93; &#46;and&#46; nHEIGHT < aRect&#91;3&#93; PalBmpDraw&#40; hDC, 0, 0, oImage&#58;hBitmap, , nWIDTH, nHEIGHT &#41; ENDIF IF nWIDTH > aRect&#91;4&#93; &#46;and&#46; nHEIGHT <= aRect&#91;3&#93; nNewproz &#58;= &#40; aRect&#91;4&#93; / nWIDTH &#41; * 100 nNewHeight &#58;= &#40; nHEIGHT / 100 &#41; * nNewproz PalBmpDraw&#40; hDC, 0, 0, oImage&#58;hBitmap, , aRect&#91;4&#93;, nNewHeight &#41; ENDIF IF nWIDTH <= aRect&#91;4&#93; &#46;and&#46; nHEIGHT > aRect&#91;3&#93; nNewproz &#58;= &#40; aRect&#91;4&#93; / nHEIGHT &#41; * 100 nNewWidth &#58;= &#40; nWIDTH / 100 &#41; * nNewproz PalBmpDraw&#40; hDC, 0, 0, oImage&#58;hBitmap, , nNewWidth, aRect&#91;3&#93; &#41; ENDIF IF nWIDTH > aRect&#91;4&#93; &#46;and&#46; nHEIGHT > aRect&#91;3&#93; nNewprozW &#58;= &#40; aRect&#91;4&#93; / nWIDTH &#41; * 100 nNewprozH &#58;= &#40; aRect&#91;4&#93; / nHEIGHT &#41; * 100 nNewWidth &#58;= &#40; nWIDTH / 100 &#41; * nNewprozW nNewHeight &#58;= &#40; nHEIGHT / 100 &#41; * nNewprozW PalBmpDraw&#40; hDC, 0, 0, oImage&#58;hBitmap, , nNewWidth, nNewHeight &#41; ENDIF lRESIZE &#58;= &#46;F&#46; ReleaseDC&#40;hDC&#41; RETURN&#40; NIL &#41; // ------------ ALPHA- IMAGE &#40; Dialog adjusted to Image &#41; ------------ //------------- give a little bit space around the Image ---------- // nHEIGHT + 50, nWIDTH + 40 // take care of the Dialog-border &#58; ABPaint&#40; hDC, 10, 10 &#46;&#46;&#46;&#46;&#46;&#46; FUNCTION ALPHA_IMG&#40;oDlg3, cBitmap&#41; Local oDlg, oBmp, oBrush, oBtn // nHeight = Image-Height // nWidth &#58;= Image-Width DEFINE BRUSH oBrush STYLE "BORLAND" DEFINE BITMAP oBmp FILENAME "&c_Path\" + ALLTRIM&#40;cSUBDIR&#41; + cBITMAP DEFINE DIALOG oDlg FROM 35, 20 TO nHEIGHT + 50, nWIDTH + 40 ; OF oDlg3 COLOR 0, "N/W" BRUSH oBrush ; TITLE "BMP with Alpha-Channel" PIXEL ACTIVATE DIALOG oDlg ; ON PAINT ABPaint&#40; hDC, 10, 10, oBmp&#58;hBitmap, 220 &#41; oBrush&#58;End&#40;&#41; oBmp&#58;End&#40;&#41; RETURN&#40; NIL &#41; [/code:cpf44mlu]RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
Can a dialog be resized ?
Antonio, Ukoenig:Thank you very much for your help. Seems that both of your answers are what I'm looking for. I'll give it a try.
Can a dialog be resized ?
Hello HunterEC,to define the dialog-size, You have to use the Image-sizewith a bit space around, like shown in the sample.The array < aRect > will give You the size you need :nWIDTH = aRect[4], nHEIGHT = aRect[3] // Image-Size in Dialog-resource// ---------------------------------------aRect := GETCLIENTRECT( oBitmap:hWnd )hDC := oBitmap:GETDC()RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
Can a toolbar button be of different size?
I normally create a toolbar using the command DEFINE BUTTONBAR oBar OF oWnd SIZE 30,33 Is it possible to have one button that is actually longer than that? TIA
Can a toolbar button be of different size?
Any button created by "DEFINE BUTTON OF oBar" will be of the same size only. But after defining all buttons, we can create any control on the bar in the space not occupied by the buttons. Same way we can create a button of different width by [code=fw:uhdf5pgf]<div class="fw" id="{CB}" style="font-family: monospace;"><br />@ r, c <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"prompt"</span> <span style="color: #0000ff;">OF</span> oBar <span style="color: #0000ff;">SIZE</span> w,h <span style="color: #0000ff;">PIXEL</span><br />&nbsp;</div>[/code:uhdf5pgf]
Can a toolbar button be of different size?
Thank you for the reply Rao. I'll experiment with it a bit
Can a toolbar button be of different size?
For some reason, I nothing happens when I click on the button. But was able triggering it programmatically using oBtn:click(). Strange
Can a toolbar button be of different size?
[quote="hua":2ayd9eb9]For some reason, I nothing happens when I click on the button. But was able triggering it programmatically using oBtn:click(). Strange[/quote:2ayd9eb9] Discoevered the reason. I can't place @ r, c BTNBMP oBtn PROMPT "prompt" OF oBar SIZE w,h PIXEL at oDlg:bInit
Can a toolbar button be of different size?
[quote="hua":33i4sip6]For some reason, I nothing happens when I click on the button. But was able triggering it programmatically using oBtn:click(). Strange[/quote:33i4sip6] Discovered the reason. I can't place @ r, c BTNBMP oBtn PROMPT "prompt" OF oBar SIZE w,h PIXEL at oDlg:bInit
Can anyone read this file in FiveWin
Hi Everybody, I am told the following file is a "digitized binary image". Can someone let me know if there is any way to read it with Fivewin. [url] <!-- m --><a class="postlink" href="http://hyperupload.com/download/02efc19d51/00000001.ECG.html">http://hyperupload.com/download/02efc19 ... 1.ECG.html</a><!-- m --> [/url] Thanks, Jeff
Can anyone read this file in FiveWin
Jeff, You might look at <!-- w --><a class="postlink" href="http://www.leadtools.com">www.leadtools.com</a><!-- w -->. They have a medical imaging api and C++ class libraries. I don't know if they support your format. James
Can anyone read this file in FiveWin
Thanks James ... I sent them an e-mail. I hope they can help. Jeff
Can anyone read this file in FiveWin
Hi Jeff, ECG is a Electro Cardio Graph. You must review the next articles in Code Project: <!-- m --><a class="postlink" href="http://www.codeproject.com/tools/ecg_dsp.asp">http://www.codeproject.com/tools/ecg_dsp.asp</a><!-- m --> <!-- m --><a class="postlink" href="http://www.codeproject.com/tools/ECG_1_to_TXT.asp">http://www.codeproject.com/tools/ECG_1_to_TXT.asp</a><!-- m --> Best regards, Felix
Can anyone read this file in FiveWin
you cam modify tgraph class there is an sample Timer test as your egc graph [code:1r6fsed1]// Program &#58; Timer test &#40;Compilar con B&#46;Bat &#58; B TstTimer&#41; // Author &#58; Arteaga #Include "Fivewin&#46;Ch" #Define GRAPH_TYPE_BAR 1 #Define GRAPH_TYPE_LINE 2 Static oWnd, oGraph, oTimer, aVals, nP FUNCTION FWGraphics&#40;&#41; LOCAL oReg, oIcon nP&#58;=19 aVals&#58;=Array&#40;20&#41; Afill&#40;aVals,0&#41; DEFINE WINDOW oWnd TITLE "TGraph, timer test" FROM 0, 0 TO 7,40 oGraph&#58;=TGraph&#40;&#41;&#58;New&#40;0,0,oWnd,oWnd&#58;nWidth&#40;&#41;-8,oWnd&#58;nHeight&#40;&#41;-30&#41; oGraph&#58;cPicture &#58;= "999" oGraph&#58;l3D &#58;= &#46;F&#46; oGraph&#58;aYVals &#58;= &#123;&#125; oGraph&#58;lDotted &#58;= &#46;F&#46; oGraph&#58;lLegends &#58;= &#46;F&#46; oGraph&#58;lTitle &#58;= &#46;F&#46; oGraph&#58;lPopUp &#58;= &#46;T&#46; oGraph&#58;nPenWidth&#58;= 1 oGraph&#58;nClrBack &#58;= CLR_BLACK oGraph&#58;nClrGrid &#58;= CLR_GREEN oGraph&#58;nType &#58;= GRAPH_TYPE_LINE aVals&#91;19&#93; &#58;= 15 aVals&#91;20&#93; &#58;= 150 oGraph&#58;AddSerie&#40;aVals, "", RGB&#40;255, 255, 0&#41;&#41; Define Timer oTimer Interval 900 Action Update&#40;&#41; OF oWnd Activate Timer oTimer WndCenter&#40;oWnd&#58;hWnd&#41; ACTIVATE WINDOW oWnd ; ON PAINT &#40;oGraph&#58;nWidth&#58;=oWnd&#58;nWidth&#40;&#41;- 8, ; oGraph&#58;nHeight&#58;=oWnd&#58;nHeight-30, ; oGraph&#58;Refresh&#40;&#46;f&#46;&#41;&#41; oTimer&#58;End&#40;&#41; RETURN &#40;NIL&#41; Function Update&#40;oReg&#41; LOCAL aTmp &#58;=&#123;150, 15,135, 30,120, 45,105, 60, 90, 75,; 75, 90, 60,105, 45,120, 30,135, 15,150 &#125; LOCAL aTemp&#91;20&#93; nP-- nP&#58;=IF&#40;nP=0,20,nP&#41; ACopy&#40;aVals,aTemp,2&#41; aTemp&#91;20&#93;&#58;=aTmp&#91;nP&#93; aVals&#58;=AClone&#40;aTemp&#41; SysRefresh&#40;&#41; oGraph&#58;aData&#91;1&#93;&#58;=aVals oGraph&#58;Refresh&#40;&#41; RETURN &#40;NIL&#41;[/code:1r6fsed1]
Can change FONT in Tooltip ?
Dear all, I'm use FiveWin 2.1c, It's possible to change FONT in tooltip of TSButton ? Best Regrad, Peter
Can change FONT in Tooltip ?
Peter, in fw\source\classes\window.prg search for "DEFINE WINDOW oToolTip...", some lines below you find "DEFINE FONT oFont NAME GetSysFont() SIZE 0, -8". Change that font definition and use that window.prg recompiled.
Can change FONT in Tooltip ?
[quote="Antonio Linares":bozmvfw6]Peter, in fw\source\classes\window.prg search for "DEFINE WINDOW oToolTip...", some lines below you find "DEFINE FONT oFont NAME GetSysFont() SIZE 0, -8". Change that font definition and use that window.prg recompiled.[/quote:bozmvfw6] So, Can I get more detail of recompiled window.prg ?
Can change FONT in Tooltip ?
Hello Peter, You modify Window.prg and just recompile it within your link script file. That's all. Regards, Richard
Can change FONT in Tooltip ?
Deai Taiwan, Thank you for your suggestion, I'm got it. Best ReGrad <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Can change the caption of TButton ""on the fly""?
Can the caption of a Button be changed at runtime?. This example just does not do anything: [code:1egkle3l] #include "Ficewin&#46;ch" Function Main&#40;&#41; Define Window ownd from 0,0 to 200,200 pixel @ 10,10 Button oBtn Prompt "Hello" size 60,20 pixel of ownd action Change&#40;oBtn&#41; Activate window oWnd Return Nil Function Change&#40;oBtn&#41; oBtn&#58;cCaption &#58;= "Bye" oBtn&#58;Refresh&#40;&#41; Return nil[/code:1egkle3l] Thanks Rafael
Can change the caption of TButton ""on the fly""?
[code:jup0muoo]#include "Fivewin&#46;ch" FUNCTION MAIN&#40;&#41; LOCAL oDlg LOCAL oBtn DEFINE DIALOG oDlg @ 3, 1 BUTTON oBtn; PROMPT "&Original"; ACTION oBtn&#58;SetText&#40; "Changed" &#41; ACTIVATE DIALOG oDlg; CENTER RETURN NIL[/code:jup0muoo] EMG
Can change the caption of TButton ""on the fly""?
Enrico: Thank you once more!!! Rafael
Can not Print in Vista SP1.
[quote="Manuel Valdenebro":1u0cjiwx] I have now, in Vista, second time that I try to print, the message "There are not printer inst..." [/quote:1u0cjiwx] Manuel, as I said, vista does not allow to initialize the printer twice, if this error only occures on the second try to print the first printer object doesn´t seem to be finished. Did you correctly end your printer object ? BTW, to get all installed printers you can use the function GetPrinters() from xharbour. [code=fw:1u0cjiwx]<div class="fw" id="{CB}" style="font-family: monospace;">aPrinter := GetPrinters<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">IF</span> lPreview<br />  <span style="color: #00C800;">PRINT</span> oPrint <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Formular"</span> PREVIEW <span style="color: #0000ff;">TO</span> aPrinter<span style="color: #000000;">&#91;</span>xx<span style="color: #000000;">&#93;</span><br /><span style="color: #00C800;">ELSE</span><br />  <span style="color: #00C800;">PRINT</span> oPrint <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Formular"</span> <span style="color: #0000ff;">TO</span> aPrinter<span style="color: #000000;">&#91;</span>xx<span style="color: #000000;">&#93;</span><br /><span style="color: #00C800;">ENDIF</span> </div>[/code:1u0cjiwx] This is working fine for me.
Can not Print in Vista SP1.
Hello,In Windows Vista with Service Pack 1, I always get this message:[img:3tswl1ic]http&#58;//www&#46;winfakt&#46;be/downloads/pr_error&#46;gif[/img:3tswl1ic]Looking in printer.prg, I see it's because of this code:[code:3tswl1ic] elseif ComDlgXErr&#40;&#41; != 0 MsgStop&#40; "There are no printers installed!" + CRLF + ; "Please exit this application and install a printer&#46;" &#41; [/code:3tswl1ic]Is anyone else experience this problem. And if so, how can we solve it?Thanks!Patrick[/img]
Can not Print in Vista SP1.
Hi Patrick,is your printer a local or a network printer ?Windows Vista is not very fast to active the network connections at startup so you have to give the time to make this before start your app if only network printers are availables on your workstation.
Can not Print in Vista SP1.
[quote="Marco Turco":x7zepij3]is your printer a local or a network printer ?[/quote:x7zepij3]Local printer.Patrick
Can not Print in Vista SP1.
[quote="Patrick Mast":3l5o7qhg][quote="Marco Turco":3l5o7qhg]is your printer a local or a network printer ?[/quote:3l5o7qhg] Local printer. Patrick[/quote:3l5o7qhg]Hi, Patrick, I had this problem specially after updating to SP2. At the first time, it prints ok, but on the second time, it gives me this error. If you come back to SP1 there is no problem. So, it seems to be a Vista problem (and a serious problem!). Because of this I had to come back to XP.Regards,
Can not Print in Vista SP1.
[quote:11yy9keo]I had this problem specially after updating to SP2. At the first time, it prints ok, but on the second time, it gives me this error. If you come back to SP1 there is no problem. So, it seems to be a Vista problem (and a serious problem!). Because of this I had to come back to XP.[/quote:11yy9keo]But we have too many clients who are upgrading to Vista and I can not tell my customres to downgrade their OS.Antonio? Can you help us?Thanks!Patrick
Can not Print in Vista SP1.
Patrick,I have been through this one last weekThe problem comes from identifying the printerif you are printing to a specifief printer and just passing the printer's name before (as i was doing), you will get the message.You have to pass now the port also, and it will work ok.It works also as backward's compatibility (vista without sp1 and xp)Below is my printer selection functionFUNCTION GETIMPRI(ADEVICES)*----------------------------------------LOCAl cAllEntries, cEntry, I, cName, cPrn, cPort, JcAllEntries := STRTRAN( GetProfString( "Devices" ), Chr( 0 ), CRLF )FOR I:= 1 TO MlCount( cAllEntries ) cName := MemoLine( cAllEntries,,I) cEntry := GetProfString( "Devices",cName,"") J := 2 WHILE ! EMPTY(cPort := StrToken(cEntry,J++,",")) // AADD(aDevices,TRIM(cName)) AADD(aDevices,TRIM(cName) + "," + CENTRY) // CHIDIAK ENDDONEXTRETURN aDevicesHTHRichard[code][/code]
Can not Print in Vista SP1.
Hi,This error occurs, for example, when printing from PREVIEW?.Best regards,
Can not Print in Vista SP1.
This error occurs on vista sp1 when you print [u:bgwe60a3][b:bgwe60a3]without prompting the user [/b:bgwe60a3][/u:bgwe60a3]for the printer, to an identified printer by it's nameit occurs before previewRichard
Can not Print in Vista SP1.
[quote="Richard Chidiak":330ccxlg]I have been through this one last week The problem comes from identifying the printer if you are printing to a specifief printer and just passing the printer's name before (as i was doing), you will get the message. You have to pass now the port also, and it will work ok.[/quote:330ccxlg]You mean, instead of doing this:[code:330ccxlg]oPrn&#58;=TPrinter&#40;&#41;&#58;New&#40;"Testpage",&#46;f&#46;,&#46;f&#46;,"HP xyz"&#41;[/code:330ccxlg]We now have to do:[code:330ccxlg]oPrn&#58;=TPrinter&#40;&#41;&#58;New&#40;"Testpage",&#46;f&#46;,&#46;f&#46;,"HP xyz,winspool,LPT1&#58;"&#41;[/code:330ccxlg]Is this correct?Thanks!Patrick
Can not Print in Vista SP1.
Patrick,Yes , this is the way to go if you print without prompting the user to select a printer, if you prompt for printer selection, the old syntax works okgotta love vista !Richard
Can not Print in Vista SP1.
[quote="Richard Chidiak":2lufzb5x]Yes , this is the way to go if you print without prompting the user to select a printer, if you prompt for printer selection, the old syntax works ok gotta love vista ![/quote:2lufzb5x]Thank you Richard!Patrick
Can not Print in Vista SP1.
[quote="StefanHaupt":1trftdti] Vista does not allow, to initialize the same printer twice, then the error occurs.[/quote:1trftdti] Stefan, But if I use standard rpreview it is correct. Regards
Can not Print in Vista SP1.
[quote="Richard Chidiak":2atolie8] You have to pass now the port also, and it will work ok. Below is my printer selection function FUNCTION GETIMPRI(ADEVICES) *---------------------------------------- LOCAl cAllEntries, cEntry, I, cName, cPrn, cPort, J cAllEntries := STRTRAN( GetProfString( "Devices" ), Chr( 0 ), CRLF ) FOR I:= 1 TO MlCount( cAllEntries ) cName := MemoLine( cAllEntries,,I) cEntry := GetProfString( "Devices",cName,"") J := 2 WHILE ! EMPTY(cPort := StrToken(cEntry,J++,",")) // AADD(aDevices,TRIM(cName)) AADD(aDevices,TRIM(cName) + "," + CENTRY) // CHIDIAK ENDDO NEXT RETURN aDevices HTH Richard[code][/code][/quote:2atolie8] Richard, I have a function, including in the previeus, to change on line the printer. This is the code: func f_CamImpre (oDevice, cCbx ) local cPrinter // impresora predeterminada cPrinter := GetProfString( "windows", "device" , "" ) // instalamos la impresora elegida WriteProfString( "windows", "device", cCbx ) // refrescamos el sistema SysRefresh() //iniciamos impresora PrinterInit() DeleteDC( oDevice:hDC ) // Sugestion by Enrico M. Giordano // temporal printer oDevice:hDC := GetPrintDefault( GetActiveWindow() ) SysRefresh() // default printer again WriteProfString( "windows", "device", cPrinter ) RETURN nil I have now, in Vista, second time that I try to print, the message "There are not printer inst..." Can you help me to change that function to adding the port number? Thanks and regards
Can not Print in Vista SP1.
Manuel, I had a similar situation printing in Vista, did you read my post in this topic ? [url:2yybjyxb]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=3&t=15485[/url:2yybjyxb] Vista does not allow, to initialize the same printer twice, then the error occurs.
Can not create dialog 7.11
Hello, Last week we have made a upgrade to fwh7.11 From that moment we have many error's , 'can not create dialog', at random . Today , with 5 customers , +/- 10 This error occurs only after some time ( 30 min) , so i suppose it has something to do with memory management. How can i test memory and controle were it go's down ? Frank
Can not create dialog 7.11
Do you have this fix? This is a necesary fix for FWH 7.11 in Class TMsgBar: Code: METHOD SetMsg( cText ) CLASS TMsgBar DEFAULT ::cMsg := "" if ::l2007 ::cMsg = cText ::Refresh() return nil endif ::GetDC() // must be placed here!!! ... _________________ regards, saludos Antonio Linares <!-- w --><a class="postlink" href="http://www.fivetechsoft.com">www.fivetechsoft.com</a><!-- w -->
Can not create dialog 7.11
Otto , Yes , it is applyed. It seems to be very bad , since the previous thread , 3 other errors are reported , all 'cannot create dialog' , at random. Most off them occurs after +/- 1 hour Frank
Can not create dialog 7.11
Hello Frank, I don’t have FWH versions at my clients. In-house we use the program 7*24 hours with no problem on Vista PC's. I use Harbour what do you use? Sure you are a harbor expert but I mention what problems I faced: I had fieldnames and function names in clipper where sometimes from the 10 position on the names were not identically. Clipper does not care about but in harbor you get an error. Regards, Otto
Can not create dialog 7.11
Otto, From the moment we changed to fwh7.11 , we have at least 10 errors a day , all 'cannot create dialog' , at random 2 hours ago i went back to 7.7 , from then no errors. So i am convinced it is a memory problem from 7.11 Antonio ??? Frank
Can not create dialog 7.11
Do you use harbour or xHarbour? Regards, Otto
Can not create dialog 7.11
Frank, We haven't modified anything in 7.11 that could cause those "can't create dialog" errors. It has to be something else that you have recently changed in your application, or something related to Harbour/xharbour Do you use Borland controls in your dialog boxes ?
Can not create dialog 7.11
What controls do you use in those dialogboxes ?
Can not create dialog 7.11
HI, i use fwh 7.10 and 7.11, with fix, in 7*24, 15 workstations, 1000000 records without problems. xharbour cvs 1.00 30/10/2007 (compile myself) fwh 7.11 (compile myself) bcc 551 sp2 ads server (local to tests) windows server network with nt4 workstation and xp workstations are you using borland controls??
Can not create dialog 7.11
Antonio, I am working in a MDI environnement with dialog's. Each dialog is executed from xbrowse. The dialog's have in some cases a tsbrowse or xbrowse object , together with the common control's from fw (no borland controls). I am using xhb 1.01 How can i follow the memory ammount during execution ? Can i place some tracelog's to see which value it has ? Frank
Can not create dialog 7.11
Frank, > I am using xhb 1.01 Do you mean xHarbour commercial ? > How can i follow the memory ammount during execution ? The cannot create dialog box is a not a memory related issue. Anyhow you can open Windows's tasks manager and locate your application and check what memory amount is using
Can not create dialog 7.11
Antonio, Comercial version Compiling with fwh7.11 , i can reproduce the error : xbrowse is used to select a record (dialog) Opening the dialog , closing it and repeat this ( +/- 20 or more , unpredictable) , result in a error Error description: Error FiveWin/3 Cannot create Dialog Box: Title: Bijsluiters : 930920 /1 Aantal : 4800 BWB /MW Stack Calls =========== Called from: DIALOG.PRG => CREATEDLGERROR(0) Called from: DIALOG.PRG => TDIALOG:ACTIVATE(0) Called from: INVBEST.PRG => SHOWAOFB(3826) Called from: INVBEST.PRG => (b)INPDLGDOSA(1279) Called from: XBrowse.prg => TXBROWSE:LBUTTONDOWN(2408) Called from: => TWINDOW:HANDLEEVENT(0) Called from: CONTROL.PRG => TXBROWSE:HANDLEEVENT(0) Called from: window.prg => _FWH(3233) Called from: => WINRUN(0) Called from: window.prg => TMDIFRAME:ACTIVATE(900) Called from: HENMAIN.PRG => MAIN(149) During this test memory increases from 744 to 790 (maybe 50 cycles) The same test , after compiling with 7.7 , has not given an error After memory was 800 , and maybe 100 x openening and closing , i give it up Is it normal that memory increases during this test ? Frank
Can not create dialog 7.11
Frank, Thats a very little memory increase. Its not a problem, as Harbour calls the garbage collector from time to time Are you using Borland controls in that dialogbox ? How do you End() the dialog ? Please show us a portion of the source code, thanks