|
-
Jul 27th, 2006, 07:20 PM
#1
Thread Starter
New Member
Printing Problem!
Hello,
I want to print Form5 in my project but printing operation is slow!
I used the following code:
.
.
.
Form5.PrintForm
.
.
.
Please help me.
Thank's.
-
Jul 27th, 2006, 07:30 PM
#2
Re: Printing Problem!
Welcome to the Forum 
How about printing the Components values of that Form, opposed to the Form (face) itself?
Ie printing off all the TextBox's.Text etc.
-
Jul 27th, 2006, 08:31 PM
#3
Thread Starter
New Member
Printing Operation is slow!
Hi.
I have in my Project a MSFlexGride ,two Labels(in Form5) and want to print Form5.
Printing operation is slow and MSFlexGride's Cells in my print are black!
I used the following code in a CommandButton :
.
.
.
Form5.PrintForm
.
.
.
Do i can print Form5 in my project by PrintForm method?
Thank you.
-
Jul 27th, 2006, 08:42 PM
#4
Re: Printing Operation is slow!
Instead of double posting, continue on your previous thread.
-
Jul 28th, 2006, 06:00 AM
#5
Re: Printing Operation is slow!
 Originally Posted by Joacim Andersson
In the future, please follow this advice.
Duplicate threads merged.
 Originally Posted by HFlash
I have in my Project a MSFlexGride ,two Labels(in Form5) and want to print Form5.
Printing operation is slow and MSFlexGride's Cells in my print are black!
I used the following code in a CommandButton :
.
.
.
Form5.PrintForm
.
.
.
Do i can print Form5 in my project by PrintForm method?
PrintForm has issues with a number of controls with the Flexgrid being one of them. Try this
VB Code:
Option Explicit
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _
ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Const VK_MENU As Byte = &H12
Private Const VK_SNAPSHOT As Byte = &H2C
Private Const KEYEVENTF_KEYUP = &H2
Private Sub cmdPrintForm_Click()
Dim lWidth As Long, lHeight As Long
Clipboard.Clear
Call keybd_event(VK_MENU, 0, 0, 0)
Call keybd_event(VK_SNAPSHOT, 0, 0, 0)
DoEvents
Call keybd_event(VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0)
Call keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0)
Printer.Print
If Width > Printer.ScaleWidth Then
lWidth = Printer.ScaleWidth
lHeight = (Printer.ScaleWidth / Width) * Height
Else
lWidth = Width
lHeight = Height
End If
Printer.PaintPicture Clipboard.GetData, 0, 0, lWidth, lHeight
Printer.EndDoc
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|