Print Preview
hi having problems with my print report program.. im only using the textbox to print the data. here comes the problem, want i wanted to do is to have a form that functions like a print preview in msword were i could see if the data xceeded the paper size, so i can change font size to be able to fit it to wat ever size i wanted.. is there a way to do this in VB WITHOUT using any report program such as crytal or others? ..thanks hopefully you could give me links or tutorials, THANKS again, SORRY if i missed posted just dont know were i could place this.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Problem With Print, Page Setup, And Print Preview In A Text Editor...
Yes, I have another question.
When I use these exact same functions (with WebBrowser.ExecWB in place of txtScrapbook.Text) in my web browser, it works perfectly. But when I use them in reference to a text box, it doesn't.
Can you tell me where the problem lies, or give me an alternative method? I have a common dialog box already for other functions, so feel free to make use of it if you need to. Thanks.
Code:Private Sub PageSetup_Click()
txtScrapbook.Text OLECMDID_PAGESETUP, OLECMDEXECOPT_DODEFAULT
'opens page setup dialog
End Sub
Private Sub Print_Click()
txtScrapbook.Text OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER
'opens common dialog box prompting user to print current web page/parts of current web page
End Sub
Private Sub PrintPreview_Click()
txtScrapbook.Text OLECMDID_PRINTPREVIEW, OLECMDEXECOPT_DODEFAULT
'opens print preview dialog
End Sub
Print Preview From Textbox And Print Function
I would like to add print button in my application so that user can print from information they enter in the textbox but then user also can view it first before it will print out. Can anyone give me an example regarding this, coz i sort of blur how to do this
Print, Print Preview...[RESOVLED]
Hello,
I have a main form that has two buttons. One is a "Print Setup" button that uses a commonDialog on the main form to show the printer setup. The other button, "Print Preview" shows a form with a picturebox which size is based on Printer.width and Printer.Height. It also uses it's on commonDialog to show the printer dialog before printing. Now the first button shows the printer setup and the second button shows the printer dialog.
So....before I start the program, if my printer settings are portrait then that is what my picturebox looks like on my preview form. If my printer settings are landscape then that is what it looks like.
Now to my problem.....When I run my program and click "Printer Setup" on the main form...and change the "portrait" and "landscape" settings...they do not change when I click on the "Print Preview" button. In other words, my picturebox on the Print Preview form does not change to the corresponding printer size.
I think I need to somehow load the new printer settings after I change them on the main form and before I click "Print Preview". I hope this is clear enough and I thank you for your help.
Print And Print Preview Option
hi,
Can any one tell me how can implement print and print preview option in my application.
Actually iam developing an application, in that iam opening images in picture box, so planning to give print and printview option in my application. can any one suggest me how should i implement this.
Regards
Santosh.K
Print And Print Preview Option
hi,
Can any one tell me how can implement print and print preview option in my application.
Actually iam developing an application, in that iam opening images in picture box, so planning to give print and printview option in my application. can any one suggest me how should i implement this.
Regards
Santosh.K
Print Preview
This below is the code I have, and I'd like to use the print preview method. But not sure how it works.
Private Sub cmdprint_Click()
Dim y As Integer
Set DatabaseWorkSheet = sheets("database")
y = bound3 + 11
DatabaseWorkSheet.Activate
Range(Cells(7, 1), Cells(y, 14)).Select
ActiveSheet.PageSetup.PrintArea = "$A$7:$N$" & y
ActiveWindow.PrintPreview ----> This crashes the program.
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
ActiveSheet.PageSetup.PrintArea = ""
Range("A12").Select
End Sub
Thanks,
TXK
Print Preview
Hi,
freaky one here... In Excel, when you Print Preview something and close the Print Preview, there is a line visible showing what is the "print area"... Is it possible to hide it?
Print Preview
is there anyway to make a print preview that looks exactly like the one used in notepad 5. something (the one that came with xp pro) im have a print preview but its really not that great. The print preview code i have right now is as follows;
Code:
Private Sub mnuPageSetup_Click()
On Error GoTo err
DCPrint.Flags = &H40
DCPrint.CancelError = True
DCPrint.ShowPrinter
err:
End Sub
thanks
MS Print Preview
I'm trying out this code here
http://support.microsoft.com/default...79&Product=vb6
It works and the preview looks centered in the picture box, but no matter what printer I try it on, it prints offset to the right.
Any ideas?
Thanks
Print Preview
Hi guys
I'm using some methods like:
Code:
Printer.Print "Hi !!"
Printer.CurrentX = 13
Printer.CurrentY = 12
Printer.PaintPicture Picture1.Picture, 1, 1
Printer.EndDoc
Is there a way to preview the page in a window ?
Maybe an OCX Control that takes whatever I'm sending to the spool, and show in a window or something like that ?
Just to have an idea of how it will be printed !
Thanx a lot for any help ! =D
Print Preview
Hey, I need to know how to create a print preview. I can get the text with its formatting onto the print preview form, but I need to make it change the text when the user clicks a button if there's more than 1 page's worth of text. I also don't know how to detect if there is more than 1 page's worth.
Thanks,
Kid
Print Preview?
I have a print preview function in my program and i would like it to display pictures from my richtextbox is there a way of doing this?
Print Preview..
hey all......
ive made an app in vb for accounting purposes.....using the printer object which lets me print the putput into the default printer...
is there any way i can let the user view the print preview before printing??
Print Preview
Also does anyone know how to add a print preview function in a VB App? I need to preview what the file in a Richtextbox look like when printed. Does anyone know how to add this print preview function?
Print Preview
Does anyone know how to write code in VB for a print preview button? I want the program to give me a preview of a richtextbox1, just like in Word.
Print Preview
Is there a way to make a print preview of a report in VB6...??
I use the printer object and i'd like to preview before printing...
Rufen
Print Preview
I would like to create form for preview the document before printing. My form name is "Preview". I want to show this form when I clicked command button "preview" from Form1 and will showed up the document extract from Form1 to thie form "Preview".
Ok, my Form1 have picturebox name "Picture1", How I can send the picture image to the the "Preview" form? In my preview form have picturebox also named as "Picture2"
Rtf Print Preview
Does anyone know of an accurate rtf print preview. I have tried a few, commercial and free without being accurate. When pictures are added to a mulitiple page print out the previews they are never accurate. They all print the pictures but leave half the page blank and start a new page.
Rtf Print Preview
Does anyone know of a good rtf print preview for vb6. Not looking for free
Vb6 Print Preview
i'm trying to do an application in vb 6, and what i want is, do a print preview of the form i'm gonna print.
any ideas about the code i should write?
thanks
Print Preview
Hey ,
i want to print my datareports
but before that i want to see Print Preview...
plz. help..
thanks in advance
Jicks
Print Preview
Hi All,
My little project reads in a word doc. I want to know how I can have that doc viewed as a print preview page and have all the options that a print preview page would. any help would be most gratefull.
Kind Regards
Loftty.
Print Preview
Does anyone out there know how i can get the exact print preview that is in notepad 5.1. I also have one more quick question i hope, does anyone know how i could call the notepad help topics. I really dont want to make one if i can use an already professionally made one. thanks alot
Print Preview
I was wondering, how can I call that "API" to show a print preview form?
Print Preview
quick question...
how do i show a print preview in a text box???
Print Preview
hi all,
how to print preview when using Printer.Print Object.....
Print Preview
Welcome!
(I use VB 6 EE)
I have a problem. I can't make print preview in my application, because when i zoom to 500%, my PictureBox is too big and system tell me: out of memory (PicBox: AutoRedraw=True). All operations i execute on API functions (DrawText, ...). Please help me.
Print Preview
hi all,
does any one can show me, how to perform print preview ?
Print Preview
Hi. Does VB provibe a built in print preview function for programmers? I'd like to show one in my program before printing. If not does anyone have any code?
Print And Preview
hello all,
can anyone tell me how i can preview and print my vb files ?
Print Preview With API
Hey Guys,
Is there any way to show print preview of a rich textbox's contents with the help of API ?
Or, is there any FREE print preview DLL/OCX ?
Please help me to make the most beautiful and featured VB wordpad.
Thanks!
Print Preview In VB
How can I show the print preview form? Like in PaintBrush or Microsoft Word... You know what I'm talking about right?
Thanks
---------------
AIM Screen Name: MBR5520
ICQ UIN: 65287451
E-MAIL: sx3000vbm@netscape.net
Web Page: http://www.sx3k.le-site.com
IMPORTANT: I'M RUNNING VB5 ENTERPRISE EDITION: Don't give me codes for VB6!
Looking For A Print Preview OCX
Does anyone know of any
print preview ocx's available as shareware ?
I've already checked out
Waty Thierry's Print Preview OCX
Print Preview
Hello All Memebers
How can i make print Preview for a border for the printed paper depending on the paper hight and width. this border contains 2 tables and 2 photos.i want the source code please.
thanks alot for advice.
Egyptian Man
Print Preview
Hello All Memebre
i want to make a command button to Show HP Preview which in the printer order, please check the attachment Photo.
thanks Alot for advice
Egyptian Man
Print Preview
i want take print from vb
so want make report from to print in printer
before print i want see the print preview so how
make print preview for msflexgrid, textbox,combobox etc...........
it shoul look as in the from
Print Preview
hye to all
i wana to make printing reports,,, I want that i should open the folder dailog box and then slect the .MPL(playlist) file and click on OK... and on this ok i get the saved playlist print previre. the information of the playlist is in database.... how can i read or load data from the databae or saved playlist to get print preview
I just wana to know about the loading data...
Plz help me i am really stuck in it
Set cmnDialog = Nothing
Set cmnDialog = New CdlgEx
cmnDialog.filename = ""
cmnDialog.DefaultExt = ".mpl"
cmnDialog.filter = "MOAEC Music Playlist (*.mpl)|*.mpl"
cmnDialog.flags = cmnDialog.flags Or cdlOFNOverwritePrompt
cmnDialog.hOwner = Me.hWnd
cmnDialog.ShowOpen
If file.filename = "" Then
'// Load data
Open Fname For Input As #FileId
'// Get First line if MOAEC 4.2x version
If bMoaec42 Then Line Input #FileId, buffer
buffer = Replace(buffer, """", "")
'// Load rest of data
While Not EOF(FileId)
i = i + 1
Set LVI = Lw.ListItems.Add
For x = 0 To sIdx
Line Input #FileId, buffer
buffer = Replace(buffer, """", "")
'fData.Add buffer
Select Case x
Case 0
LVI.Text = buffer
LVI.Checked = CBool(Val(buffer))
Case Else
If (x >= 3) And Not bMoaec42 Then
LVI.SubItems(x + 1) = buffer
Else
LVI.SubItems(x) = buffer
End If
End Select
Next
Wend
Close #FileId
Show_MediaReport "SELECT Music.PkID, Music.Filename, Music.Title, Music.Artist, Music.Album, Music.Time, Music.Year, MusicStyles.Label AS Mstyle, DanceTypes.Label AS Dtype, MusicSpeeds.Label AS Speed, IIf([Music]![Energy]=True,'T','F') AS Energy, Music.RatingOK, IIf([Music]![Favorite]=True,'T','F') AS Favorite, Music.Custom1, Music.Custom2, Music.Custom3, Categories.Category, MusicLookup.CategoryID FROM MusicStyles INNER JOIN (MusicSpeeds INNER JOIN (DanceTypes INNER JOIN (Categories INNER JOIN (Music INNER JOIN MusicLookup ON Music.PkID = MusicLookup.MusicID) ON Categories.PkID = MusicLookup.CategoryID) ON DanceTypes.PkID = Music.Dtype) ON MusicSpeeds.PkID = Music.Speed) ON MusicStyles.PkID = Music.Mstyle", "PlayList"
End If
End Sub
Private Sub mnuSCHEDULE_Click(Index As Integer)
If Index = 0 Then
frmScheduler.Set_Mode = 0
frmScheduler.Set_Command = "Create"
ElseIf Index = 1 Then
frmScheduler.Set_Mode = 1
frmScheduler.Set_Command = "Create"
ElseIf Index = 2 Then
frmScheduler.Set_Command = "Delete"
End If
frmScheduler.Show vbModal, Me
Print Preview Ocx
Where Can I find a free ocx for vb to give in a form a print preview from an excel file.
Or is there another way to do without downloading an ocx from the internet?
thx
Print Preview
For My reports I would like set print preview option Is there any easy process to do like that
please help mee....
Print Preview
Does anyone know if exist an Activex to capture a job sent to printer, to produce a Print Preview BEFORE to send effectively to a printer?
Thanks to all that will help me.
Print Preview
Hi
Can some help me for code to print preview from a text box or rich text box.
thanks
Print Preview
What's the easiest way to implement Print Preview for my application?
Do I have to devise my own form? If yes, what considerations should I make?
Print Preview
Hi Everyone,
I have cooked up some code to print everything that is on a form. The only problem though, is that I cannot see what I have done until I print the form. Is there any code out there that I can use to create a print preview? On the form I currently have some text boxes, a ListView control, labels and a few horizontal lines on the page. I would appreciate any help. Thanks.
Print Preview Problem
I really need help with this...I am attempting to insert a to date and a from date that needs to be printed for the MSProject file. evertything seems to work fine untile it gets to the printpreview window. The dates are not accurate and the only way that i get accurate dates is if i click on print and then preview. What should i do...i am using VB 6 and MSPROJECT 2003...
Any help is greatly appreciated....
Here's My Code....
Code:
Private Sub cmdPrint_Click()
Dim prjApp As MSProject.Application
Dim prjProject As MSProject.Project
Dim strStart, strFinish, As String
strStart = InputBox$("Enter a start date:")
strFinish = InputBox$("enter a finish date:")
Set prjApp = CreateObject("MSproject.application")
prjApp.FileOpen "C: est2.mpp", ReadOnly:=False
prjApp.Visible = True
Set prjProject = prjApp.ActiveProject
With prjapp
TableApply ("pdfTable")
FilePageSetupPage portrait:="false", percentscale:="95"
TimescaleEdit enlarge:="80"
FilePageSetupView repeatcolumns:="4"
FilePageSetupView bestpagefittimescale:="yes"
FilePrintSetup Printer:="adobe pdf"
ActiveSelection.Application.FilePrint fromDate:=strStart,_ toDate:=strFinish, preview:="yes"
end with
Set prjProject = Nothing
Set prjApp = Nothing
End Sub
|