Make(cnet) ver(4.04 build 185) Add(EntryPoint,2953706,154,21) { Width=545 Height=382 } Add(InfoTip,11646323,357,28) { Info=#41:The code performs the following actions: |0:|70:Creates a string to measure and a font object set to Arial (16 point) |0:|43:Sets the maximum layout size of the string.|0:|79:Creates a string format object and sets its format flags to DirectionVertical. |0:|104:Creates the integer variables charactersFitted and linesFilled and a size object to measure the string. |0:|179:Measures the size of the string and determines the number of characters fitted and lines filled, using the string, the font object, the maximum layout size, and the string format.|0:|60:Draws a red rectangle using the measured size of the string.|0:|44:Draws the string within the drawn rectangle.|0:|69:Draws the values of the number of characters fitted and lines filled.|0:|63:The result is a vertical rectangle enclosing a vertical string.| Frame=1 Transparent=1 HAlign=0 Width=372 Height=305 } Add(Hub,10450106,56,189) { OutCount=5 link(onEvent1,1975379:doClear,[(80,195)(80,174)]) link(onEvent2,3973390:doMeasureString7,[(153,202)(153,139)]) link(onEvent3,4759871:doDrawRectangle,[]) link(onEvent4,3985092:doDrawString2,[(102,216)(102,251)]) link(onEvent5,6639917:doDrawString,[(77,223)(77,279)]) } Add(Button,15721421,14,189) { Left=205 Top=65 Point(onClick) link(onClick,10450106:doEvent1,[]) } Add(StringFormat,12227597,280,63) { Constructor=2 Point(options) link(options,8148940:StringFormatFlags,[]) } Add(TextBox,1234617,196,63) { Left=285 Top=65 Width=200 Height=95 Text="Measure String" Lines=[] Multiline=0 Point(doText) Point(Text) Point(Data) } Add(MeasureString,3973390,224,126) { Font="fnt" Graphics="gr" Point(doMeasureString7) Point(layoutArea) Point(format) link(onResult,4842494:doSizeF,[]) link(Text,6886868:Var3,[(237,115)]) link(layoutArea,15197765:SizeF,[]) link(format,16302703:Var2,[(251,116)(286,116)]) } Add(SizeF,15197765,238,63) { Height="1024" Width="1280" } Add(Graphics,1975379,91,161) { Name="gr" Color=-16777201 Constructor=1 Point(doClear) } Add(DrawRectangle,4759871,161,203) { Graphics="gr" Pen="pen" Point(x) Point(y) Point(width) Point(height) link(x,3566254:Var1,[(181,190)]) link(y,3566254:Var2,[]) link(width,4842494:.Width,[(195,190)(279,190)]) link(height,4842494:.Height,[(202,195)(286,195)]) } Add(Pen,585918,196,21) { Name="pen" Color=255 CompoundArray=[] DashPattern=[] Width="1" } Add(Memory,12828858,182,147) { Default=Integer(0) } Add(GetDataEx,3566254,182,185) { link(Data,12828858:Value,[]) } Add(DrawString,3985092,112,238) { Graphics="gr" Brush="br" Font="fnt" X="0" Y="0" Point(format) Point(doDrawString2) link(Text,6886868:Var1,[(132,115)]) link(format,16302703:Var1,[(146,103)]) } Add(GetDataEx,6886868,196,110) { link(Data,1234617:Text,[]) } Add(SolidBrush,10057948,175,238) { Name="br" } Add(GetDataEx,16302703,280,98) { link(Data,12227597:StringFormat,[]) } Add(DrawString,6639917,217,273) { Graphics="gr" Brush="br" Font="fnt" X="200" link(Text,4292653:Result,[]) } Add(FormatStr,4292653,231,203) { Mask="chars {0}, lines {1}" link(Str1,3973390:CharactersFitted,[]) link(Str2,3973390:LinesFilled,[]) } Add(SizeF,4842494,266,126) { Point(sz1) Point(.Width) Point(.Height) } Add(Font,11271586,238,21) { Name="fnt" FamilyName="Arial" EmSize="16" Style="style" } Add(StringFormatFlags,8148940,280,21) { StringFormatFlags=2 } Add(FontStyle,11797390,154,63) { Name="style" FontStyle=6 }