473,657 Members | 2,397 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PrintPreviewCon trol taking focus away

Hi,

I have a PrintPreviewCon trol placed inside an inherited control (I am designing a wizard, and each wizard 'panel' is technically a control... The PrintPreviewCon trol is inside one of these panels). The problem is that when I place the control, and set its Document property to a PrintDocument class, it seems to 'steal' focus away from the main wizard dialog (the titlebar of the wizard actually becomes gray), and weird graphical glitches happen when I click inside of the PrintPreviewCon trol.

This happens with the most simple of printing, even previewing one line of text on the entire page.

Any idea why this would happen?

Thanks!

Yaron
Nov 16 '05 #1
0 1407

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
995
by: Chad Chisholm | last post by:
I have the PrintPreviewControl on a form, a custom print options dialog. When the user changes a print option (like gridlines) I set the Document property of the PrintPreviewControl, thereby forcine a redraw of the document. The problem is that when it redraws, the "Generating Preview..." dialog appears. When it closes, my app has lost the focus. Has anyone experienced this? Can anyone address this issue?
0
1312
by: s-galit | last post by:
hi, i created form1 with a printPreviewControl and from form2 im creating an reference to the form1 , but the printPreviewControl is empty thats the code from form2- Dim printPrevCtrl1 As New PrintPreviewControlForm printPrevCtrl1.PrintPreviewControl1.Document = PrintDocument1 whats my mistake ?
3
2548
by: Ramsey Schaffnit | last post by:
Context: I have to print personal information on a preprinted form I've never seen using a printer I've never seen. I want to use a control to overlay the PrintPreview to indicate where I've printed. I want to use a separate control in order to allow the user to drag the field to a different position on the form so it doesn't have to come back for me to change the code. I want to use the PrintPreview because it fits so naturally with...
0
1322
by: Sachin | last post by:
Hello, I am trying to make a customized PrintPreviewDialog using PrintPreviewControl. Can any one please explain how to change the cursor only on the document that is displayed in the Preview control? We can use the cursor property of the PrintPreviewControl, but that is not useful, as when you move in to the Preview control, the cursor changes even if you are not on the document. Is there any way to get the document area, so that we can check...
0
1094
by: Chad Chisholm | last post by:
I have the PrintPreviewControl on a dialog, and it's a great way to show the user what effect print settings have in somewhat real time. The only problem is when I set printPreviewControl.Document to a printdocument, a dialog pops up that it's generating the preview and when that goes away, my app has lost focus. I can't seem to find a way around this. Have ANY of you had luck with this?
2
1741
by: kenglish_hi | last post by:
hello, I have a form with a datagrid and combo box. When the form loads up, i want the focus to be on the combo box. however, whenever it loads up, the focus is always on the datagrid. in the Form.Load, i tried both combo.focus() and combo.select(), neither of them will take the focus away from the datagrid and put it on the combo box. Anyone know how to do this? Kevin
1
2461
by: Richard MSL | last post by:
I was using a PrintPreviewDialog, and it previewed the file nicely, I could page through it, etc. But I could not control the printing, so I made my own form with a PrintPreviewControl on it, and buttons to print as I want. The problem is that it no longer supports paging throught the preview, it just stays on the first page. I can write my own PageUp and PageDown buttons, but there does not seem to be a way to tell the...
3
8834
by: deciacco | last post by:
I'm trying to write a label printing SDI app with a small preview on the main form itself. Every time I run the InvalidatePreview event on the preview control to redraw the preview I get the "Generating Previews" dialog box while the preview is being generated. I want to suppress this. I've been able to find this from another forum: "The 'Generating Previews' dialog is shown while calculating the layout for pages in OnPaint(). One of our...
3
6490
by: IB | last post by:
... Can't get it to work. Whatever I do, I just get "document does not contain any pages". I am setting the document property to a valid document and if I just use the PrintPreviewDialog instead, my page appears fine (on the dialog). Any ideas? Thanks
0
8402
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8315
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8829
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8508
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7341
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6172
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5633
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2733
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1962
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.