-=-
.
.....
  
 
RSS
Direkomendasikan menggunakan brower Opera/Chrome/Firefox. Resolusi minimal 1024x768 | Powered by ____ |
 
  
 
Nikmati Delphi-ID dalam berbagai versi tampilan :
Basic View (LOW Bandwidth)
Default View (Full)
Mobile Edition
Main Menu
..:: onWebTools ::..
..:: onLastPosts ::..
goto Postjumlah komponen maksimal dalam sebuah project(6)
 by d4mnf1y32
 on 21.May at 12:16
goto Posttanya grayscale to biner dengan scanline(1)
 by luckynvic
 on 20.May at 20:44
goto Posttanya looping biner to matriks(1)
 by luckynvic
 on 20.May at 20:10
goto Postsql error:acces denied for user....(2)
 by nasbms
 on 19.May at 16:54
goto Postpemanggilan frame(4)
 by nasbms
 on 19.May at 16:14
goto Posttanya AvLock(0)
 by azuriza
 on 19.May at 11:24
goto PostGet TDBEdit Value Menggunakan LookUp Grid(10)
 by henry_sys
 on 18.May at 11:27
goto Postmenghitung record dalam perulangan(4)
 by idhiel
 on 16.May at 13:53
goto Posttanya ascii(4)
 by mas_kofa
 on 16.May at 12:11
goto PostRawPrint Untuk Delphi XE2(0)
 by adewijaya
 on 15.May at 22:34
goto Postdatabase error..(4)
 by idhiel
 on 15.May at 15:57
goto Postbekasi, pt arila putra mahkota(3)
 by mas_kofa
 on 15.May at 15:37
goto Postbagaimana cara membaca file *.doc dg delphi?(0)
 by ficky
 on 15.May at 06:14
goto Posttanya biner to matriks(13)
 by diandewi
 on 14.May at 20:30

..:: onLast Articles ::..
..:: New Download ::..
Pascal-id.Org
Feeds -  Popular -  Latest
RE: The Longue
8 months, 3 weeks ago
RE: belajar pascal
8 months, 3 weeks ago
RE: The Longue
8 months, 3 weeks ago
RE: belajar pascal
8 months, 3 weeks ago
RE: Perkenalan dan Absen
8 months, 3 weeks ago
RE: Alhamdulillah Buka Puasa Bersama
8 months, 4 weeks ago
RE: تَقَبَّلَ اللهُ مِنَّا وَمِنْكَ - Selamat Hari Raya Idul Fitri
8 months, 4 weeks ago
Lintas Situs
«
free web site stats and visitor tracking

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
radhutzOffline
Location:
Post subject: mencetak / print form  PostPosted: 19/Sep/2009 09:55
onIntermediate


Joined: 02-Sep-2009
Posts: 33

Status: Offline
dear, delphiers..

saya mau tanya caranya ngeprint form delphi gimana??
jadi beserta image2nya..
karna yg saya tau mencetak database dengan RAV tapi nggak bisa gambar..

terima kasih atas bantuannya..
 
 View user's profile Send private message Send e-mail Yahoo Messenger  
Reply with quote Back to top
mas_kofa
Location: New York Arto
Post subject: RE: mencetak / print form  PostPosted: 20/Sep/2009 18:42
onElite


Joined: 18-Mar-2006
Posts: 1753
Location: New York Arto
pertanyaan kurang jelas, silahkan diperjelas...

_________________
Pay Per Day | Pesbuk
Me isn't mine
Aku Ini adalah satu

Cerdik seperti ular, Tulus seperti merpati
 
 View user's profile Send private message  
Reply with quote Back to top
PenjahatOffline
Location:
Post subject: RE: mencetak / print form  PostPosted: 23/Sep/2009 19:46
onIntermediate


Joined: 10-Nov-2007
Posts: 35

Status: Offline
Yups... pertanyaan kurang jelas

kalo yang dimaksud adalah nge-print form, itu sangat simpel. Perintahnya cuma Print; that's all.

kalo yg dimaksud menggunakan Report, anda harus menjelaskan menggunakan report apa. Karena walau setiap report metodenya hampir sama, tapi tetep aja beda. Hampir semua report mendukung blob image.

"mencetak database" --> saya kurang paham dengan maksud anda
"dengan RAV tapi nggak bisa gambar" --> saya juga kurang paham dengan yg ini

saya akan senang sekali kalo anda mau menjelaskan lebih detail apa itu RAV
 
 View user's profile Send private message  
Reply with quote Back to top
jimbot
Location:
Post subject: RE: mencetak / print form  PostPosted: 23/Sep/2009 23:22
onKnowledgeable


Joined: 14-Oct-2007
Posts: 135

di tunggu ke-jelasannya @radhutz Laughing
 
 View user's profile Send private message  
Reply with quote Back to top
radhutzOffline
Location:
Post subject: RE: mencetak / print form  PostPosted: 24/Sep/2009 11:42
onIntermediate


Joined: 02-Sep-2009
Posts: 33

Status: Offline
maaf baru reply..

mksud saya bagaimana mencetak form yang ada di aplikasi delphi, kao form itu terdiri dari gambar?!

karna setau saya sampai saat ini, saya hanya taui coding untuk mencetak laporan yang berhubungan dengan database/access sedangkan apabila dalam satu form itu ada image yang membaca data, seperti grafik, saya tidak tau codingnya untuk mencetaknya..

sebagai contoh, apabila dalam satu form aplikasi delphi, terdapat gambar grafik, string grid, listbox, dan image tambahan, apabila saya menekan tombol "Print" maka akan terhubung dengan printer yang akan mencetak apa yang terdapat dalam form, baik gambar, grafik, maupun komponen lainnya..

semoga keterangan saya ini lebih jelas..
terima kasih atas bantuannya..
 
 View user's profile Send private message Send e-mail Yahoo Messenger  
Reply with quote Back to top
heriy4nt0Offline
Location:
Post subject: RE: mencetak / print form  PostPosted: 24/Sep/2009 11:44
onKnowledgeable


Joined: 25-Jul-2008
Posts: 145

Status: Offline
Untuk nge-print seluruh form, hanya buat apa ya..,bukannya lebih bagus dari report ?
- tambahkan unit printers di clause Uses

---print seluruh form termasuk image gambar(termasuk dari timage component)---

var r:trect

Printer.BeginDoc;
r:=Rect(0,0,printer.PageWidth,Printer.PageHeight);
Printer.Canvas.Rectangle(r);
Printer.Canvas.CopyRect(r,Canvas,ClientRect);
Printer.EndDoc;
 
 View user's profile Send private message  
Reply with quote Back to top
radhutzOffline
Location:
Post subject: RE: mencetak / print form  PostPosted: 25/Sep/2009 11:10
onIntermediate


Joined: 02-Sep-2009
Posts: 33

Status: Offline
karna ada gambarnya..
kalo report setau saya,, hanya tulisan ya?!
thanks for the reply..
 
 View user's profile Send private message Send e-mail Yahoo Messenger  
Reply with quote Back to top
DelphiExpert
Location:
Post subject: RE: mencetak / print form  PostPosted: 28/Sep/2009 18:32
onMage


Joined: 06-Feb-2006
Posts: 2401

saya tidak ingat sejak Delphi versi berapa, namun yg jelas ada method Form.Print yg bisa digunakan untuk mencetak form.

code : pascal
  1. // property AForm.PrintScale utk set pensekalaan pencetakan
  2. AForm.Print;
Parsed in 0.001 seconds, using GeSHi


berikut sy cantumkan code Form.Print:
code : pascal
  1. procedure TCustomForm.Print;
  2. var
  3. FormImage: TBitmap;
  4. InfoSize: DWORD;
  5. ImageSize: DWORD;
  6. Bits: HBITMAP;
  7. DIBWidth, DIBHeight: Longint;
  8. PrintWidth, PrintHeight: Longint;
  9. {$IF DEFINED(CLR)}
  10. LBuffer: IntPtr;
  11. Info: TBitmapInfo;
  12. Image: TBytes;
  13. {$ELSE}
  14. Info: PBitmapInfo;
  15. Image: Pointer;
  16. {$IFEND}
  17. begin
  18. Printer.BeginDoc;
  19. try
  20. FormImage := GetFormImage;
  21. Canvas.Lock;
  22. try
  23. { Paint bitmap to the printer }
  24. with Printer, Canvas do
  25. begin
  26. Bits := FormImage.Handle;
  27. GetDIBSizes(Bits, InfoSize, ImageSize);
  28. {$IF DEFINED(CLR)}
  29. LBuffer := Marshal.AllocHGlobal(InfoSize);
  30. try
  31. SetLength(Image, ImageSize);
  32. GetDIB(Bits, 0, LBuffer, Image);
  33. Info := TBitmapInfo(Marshal.PtrToStructure(LBuffer, TypeOf(TBitmapInfo)));
  34. {$ELSE}
  35. Info := AllocMem(InfoSize);
  36. try
  37. Image := AllocMem(ImageSize);
  38. try
  39. GetDIB(Bits, 0, Info^, Image^);
  40. {$IFEND}
  41. with Info.bmiHeader do
  42. begin
  43. DIBWidth := biWidth;
  44. DIBHeight := biHeight;
  45. end;
  46. case PrintScale of
  47. poProportional:
  48. begin
  49. PrintWidth := MulDiv(DIBWidth, GetDeviceCaps(Handle,
  50. LOGPIXELSX), PixelsPerInch);
  51. PrintHeight := MulDiv(DIBHeight, GetDeviceCaps(Handle,
  52. LOGPIXELSY), PixelsPerInch);
  53. end;
  54. poPrintToFit:
  55. begin
  56. PrintWidth := MulDiv(DIBWidth, PageHeight, DIBHeight);
  57. if PrintWidth < PageWidth then
  58. PrintHeight := PageHeight
  59. else
  60. begin
  61. PrintWidth := PageWidth;
  62. PrintHeight := MulDiv(DIBHeight, PageWidth, DIBWidth);
  63. end;
  64. end;
  65. else
  66. PrintWidth := DIBWidth;
  67. PrintHeight := DIBHeight;
  68. end;
  69. {$IF DEFINED(CLR)}
  70. Marshal.StructureToPtr(TObject(Info), LBuffer, True);
  71. StretchDIBits(Canvas.Handle, 0, 0, PrintWidth, PrintHeight, 0, 0,
  72. DIBWidth, DIBHeight, Image, LBuffer, DIB_RGB_COLORS, SRCCOPY);
  73. finally
  74. Marshal.FreeHGlobal(LBuffer);
  75. {$ELSE}
  76. StretchDIBits(Canvas.Handle, 0, 0, PrintWidth, PrintHeight, 0, 0,
  77. DIBWidth, DIBHeight, Image, Info^, DIB_RGB_COLORS, SRCCOPY);
  78. finally
  79. FreeMem(Image, ImageSize);
  80. end;
  81. finally
  82. FreeMem(Info, InfoSize);
  83. {$IFEND}
  84. end;
  85. end;
  86. finally
  87. Canvas.Unlock;
  88. FormImage.Free;
  89. end;
  90. finally
  91. Printer.EndDoc;
  92. end;
  93. end;
Parsed in 0.026 seconds, using GeSHi

_________________
Dude, if you don't understand the basics and just want to get someone else write the code for you, it means you really shouldn't study computer science. Find a different field.
http://delphiexpert.wordpress.com
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic





Powered by PNphpBB2 © 2003-2009 The Zafenio Team
Credits


| Register | Lost Password ? |