نمایش نتایج 1 تا 7 از 7

نام تاپیک: نحوه کار باprint preview dialog , printpreviewcontrol

  1. #1
    کاربر دائمی آواتار anahita6
    تاریخ عضویت
    شهریور 1387
    محل زندگی
    tehran_shemiran
    پست
    143

    نحوه کار باprint preview dialog , printpreviewcontrol





    سلام بچه ها
    نحوه کار باprint preview dialog , printpreviewcontrol چه جوریه اگه کسی میدونه یا مقاله ای داره بی زحمت کمکم کنه
    آخرین ویرایش به وسیله anahita6 : سه شنبه 08 اردیبهشت 1388 در 14:18 عصر

  2. #2
    کاربر دائمی آواتار anahita6
    تاریخ عضویت
    شهریور 1387
    محل زندگی
    tehran_shemiran
    پست
    143

    نقل قول: نحوه کار باprint preview dialog , printpreviewcontrol

    یعنی کسی کار با این کنترل رو بلد نیست؟

  3. #3
    کاربر دائمی آواتار captain_black81
    تاریخ عضویت
    فروردین 1387
    محل زندگی
    تهران
    پست
    231

    نقل قول: نحوه کار باprint preview dialog , printpreviewcontrol


    private void InitializePrintPreviewControl()
    {

    // Construct the PrintPreviewControl.
    this.PrintPreviewControl1 = new PrintPreviewControl();

    // Set location, name, and dock style for PrintPreviewControl1.
    this.PrintPreviewControl1.Location = new Point(88, 80);
    this.PrintPreviewControl1.Name = "PrintPreviewControl1";
    this.PrintPreviewControl1.Dock = DockStyle.Fill;

    // Set the Document property to the PrintDocument
    // for which the PrintPage event has been handled.
    this.PrintPreviewControl1.Document = docToPrint;

    // Set the zoom to 25 percent.
    this.PrintPreviewControl1.Zoom = 0.25;

    // Set the document name. This will show be displayed when
    // the document is loading into the control.
    this.PrintPreviewControl1.Document.DocumentName = "c:\\someFile";

    // Set the UseAntiAlias property to true so fonts are smoothed
    // by the operating system.
    this.PrintPreviewControl1.UseAntiAlias = true;

    // Add the control to the form.
    this.Controls.Add(this.PrintPreviewControl1);

    // Associate the event-handling method with the
    // document's PrintPage event.
    this.docToPrint.PrintPage +=
    new System.Drawing.Printing.PrintPageEventHandler(
    docToPrint_PrintPage);
    }



  4. #4
    کاربر دائمی آواتار anahita6
    تاریخ عضویت
    شهریور 1387
    محل زندگی
    tehran_shemiran
    پست
    143

    نقل قول: نحوه کار باprint preview dialog , printpreviewcontrol

    متشکر
    حالا اگه بخوام یه فیلد رو از پایگاه داده بخونم و توی قسمتی از print preview قرار بدم چیکار باید بکنم

  5. #5
    کاربر دائمی آواتار captain_black81
    تاریخ عضویت
    فروردین 1387
    محل زندگی
    تهران
    پست
    231

    نقل قول: نحوه کار باprint preview dialog , printpreviewcontrol

    امیدوارم این کمک کنه

    private void docToPrint_PrintPage(
    object sender, System.Drawing.Printing.PrintPageEventArgs e)
    {

    // Insert code to render the page here.
    // This code will be called when the control is drawn.

    // The following code will render a simple
    // message on the document in the control.
    string text = "In docToPrint_PrintPage method.";
    System.Drawing.Font printFont =
    new Font("Arial", 35, FontStyle.Regular);

    e.Graphics.DrawString(text, printFont,
    Brushes.Black, 10, 10);
    }


  6. #6
    کاربر دائمی آواتار anahita6
    تاریخ عضویت
    شهریور 1387
    محل زندگی
    tehran_shemiran
    پست
    143

    نقل قول: نحوه کار باprint preview dialog , printpreviewcontrol

    نقل قول نوشته شده توسط captain_black81 مشاهده تاپیک
    امیدوارم این کمک کنه

    private void docToPrint_PrintPage(
    object sender, System.Drawing.Printing.PrintPageEventArgs e)
    {

    // Insert code to render the page here.
    // This code will be called when the control is drawn.

    // The following code will render a simple
    // message on the document in the control.
    string text = "In docToPrint_PrintPage method.";
    System.Drawing.Font printFont =
    new Font("Arial", 35, FontStyle.Regular);

    e.Graphics.DrawString(text, printFont,
    Brushes.Black, 10, 10);
    }

    مرسی اما این کد چه ربطی به ترنزکت گرفتن از sqlداره . من میخوام یه فیلد رو از یه پایگاه داده بگیرم و اون رو در printpreviewچاپ کنم

  7. #7
    کاربر دائمی آواتار captain_black81
    تاریخ عضویت
    فروردین 1387
    محل زندگی
    تهران
    پست
    231

    نقل قول: نحوه کار باprint preview dialog , printpreviewcontrol

    خب میتونید او text رو از sql بیارید

قوانین ایجاد تاپیک در تالار

  • شما نمی توانید تاپیک جدید ایجاد کنید
  • شما نمی توانید به تاپیک ها پاسخ دهید
  • شما نمی توانید ضمیمه ارسال کنید
  • شما نمی توانید پاسخ هایتان را ویرایش کنید
  •