Cobol Code

Hi All,

I'm using the system.drawing.font property and i want to print bold and underlined.

Ive found how to do it in VB or C# see:-

http://stackoverflow.com/questions/2186810/how-can-i-use-multiple-combinations-of-font-styles-in-vb-net

So Ive got the following COBOL code:-

invoke e::"Graphics"::"DrawString"(ws-string, type System.Drawing.Font::New("Arial", ls-FontSize, type System.Drawing.FontStyle::Bold) , type System.Drawing.SolidBrush::New(typeSystem.Drawing.Color::FromArgb(ls-Alpha, ls-Red, ls-Green,  ls-Blue)), ls-x, ls-y, ws-cStringFormat)

Can you pls advise how to Cobol code BOLD UNDERLINED

Thanks in advance

Neil.

Parents
  • Verified Answer

    Hi Neil,

    You need to OR the values together so use code such as:-

              set myFont to new System.Drawing.Font("Microsoft Sans Serif"

                                                    , 18

                                                    , type System.Drawing.FontStyle::Bold

                                                                    b-or

                                                      type System.Drawing.FontStyle::Underline)

    Regards

    David

Reply
  • Verified Answer

    Hi Neil,

    You need to OR the values together so use code such as:-

              set myFont to new System.Drawing.Font("Microsoft Sans Serif"

                                                    , 18

                                                    , type System.Drawing.FontStyle::Bold

                                                                    b-or

                                                      type System.Drawing.FontStyle::Underline)

    Regards

    David

Children
No Data