Exemplo n.º 1
0
        public event dlgEventHandler evPrint;                           //接続要求ありイベント
        //===============================================================================
        #endregion

        //コンストラクタ
        public PrintOut()
        {
            pd            = new PrintDocument();
            pd.PrintPage += delegate(object sender, PrintPageEventArgs e) {
                PrintOutEventArgs poea = new PrintOutEventArgs(e, this.bIsLandscape);
                evPrint(this, poea);                                                    //イベントを起こす
            };
            pd.QueryPageSettings += delegate(object sender, QueryPageSettingsEventArgs e) {
                e.PageSettings.Landscape = bIsLandscape;        //印刷方向の設定
            };

            //余白をなしにする
            pd.DefaultPageSettings.Margins.Top    = 0;
            pd.DefaultPageSettings.Margins.Bottom = 0;
            pd.DefaultPageSettings.Margins.Left   = 0;
            pd.DefaultPageSettings.Margins.Right  = 0;
        }
Exemplo n.º 2
0
        private PrintDocument pd; //����̃h�L�������g

        #endregion Fields

        #region Constructors

        //�R���X�g���N�^
        public PrintOut()
        {
            pd = new PrintDocument();
            pd.PrintPage += delegate(object sender, PrintPageEventArgs e) {
                PrintOutEventArgs poea = new PrintOutEventArgs(e, this.bIsLandscape);
                evPrint(this, poea);							//�C�x���g��N����
            };
            pd.QueryPageSettings += delegate(object sender, QueryPageSettingsEventArgs e) {
                e.PageSettings.Landscape = bIsLandscape;	//��������̐ݒ�
            };

            //�]����Ȃ��ɂ���
            pd.DefaultPageSettings.Margins.Top = 0;
            pd.DefaultPageSettings.Margins.Bottom = 0;
            pd.DefaultPageSettings.Margins.Left = 0;
            pd.DefaultPageSettings.Margins.Right = 0;
        }