Losing main form content when switching screens

When I change the focus from my Visual C++ app to another app (I.E. Excel) and back again, the main form does not repaint the contents of the form.  It does repaint the background but not the content (I.E. text boxes).  Can anyone tell me why or how to fix this


0
anonymous (74718)
5/28/2004 12:31:03 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
472 Views

Similar Articles

[PageSpeed] 42

Define more about this. What is a "main form"? A CFormView? A CDialog app? I've never seen
this behavior, although misuse of UpdateData will certainly cause it. If you are using
UpdateData, you are at risk. One of the many reasons I try to avoid it.
					joe

On Fri, 28 May 2004 05:31:03 -0700, Robert <anonymous@discussions.microsoft.com> wrote:

>When I change the focus from my Visual C++ app to another app (I.E. Excel) and back again, the main form does not repaint the contents of the form.  It does repaint the background but not the content (I.E. text boxes).  Can anyone tell me why or how to fix this?
>

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
5/28/2004 9:04:30 PM
Reply:

Similar Artilces:

Outlook Client Is Losing Connection To Microsoft CRM While Online
Hi. I have Rollup 2 installed on both the Outlook Client and the server. On my laptop, I am running Win XP Pro with SP 2 and all the updates applied and Outlook 2003 with all the updates applied. I am noticing that I seem to be losing the connection to Microsoft CRM from the Outlook Client. Right after I boot my laptop I am able to access to Microsoft CRM from the Outlook Client for between 4 hours to a day. After that if I click on the Accounts, Contacts or Leads folders nothing seems to happen. I have waited up to 10 minutes after clicking and nothing. At this point I can still use...

Managing headers across forms and reports
I am creating a DB with several forms and reports and would like all the forms to have the same header section with a logo and nearly all the reports to have another one. The idea is that changes to the logo and title would only have to be made once and in one place (hope that makes sense!) I’m using Access 2003 and have not found anyway of creating master template to do this and am thinking the best way would be to define a common Word object and paste the same object to each form/ report. Is there a better way? "sevilla10" <u58162@uwe> wrote in message news:a38...

Converting form data to neutral numbers or text?
I have an Excel '02 project with a lot of form data stemming from both other work sheets and other excel files. I now wish to convert the calculated data to neutral values in a heck of a lot of cells. For sake of example, in a cell there is the form: =[OtherFile.xls]A1+B1 and it triggers out, say, the value 24.8. It could also be text, a name, etc. How do I now get converted to the pure value 24.8, in stead of the form, with a single shortcut? And for a heck lot of cells, perhaps a large selection all at once. I have forgotten which keystroke does it, and for some reason I can't loo...

Table-auto fit to contents?
HI, I see no auto fit to contents command in the table menu in Publisher '02. Is there a way to do this? Thanks Catt On Sat, 22 Apr 2006 18:34:01 +0100, Catt wrote (in article <D0C21016-ABAC-49A3-AAFC-BB3054161DAE@microsoft.com>): > HI, I see no auto fit to contents command in the table menu in Publisher '02. > Is there a way to do this? > Thanks > Catt Nope. ...

Why do I lose contacts?
I enter a contact and a few days later (after a reboot) it's gone? Sometimes I show 80 contacts. Sometimes 1518? What is up with that? On Sun, 29 Nov 2009 22:12:01 -0800, Davis Straub wrote: > I enter a contact and a few days later (after a reboot) it's gone? > > Sometimes I show 80 contacts. Sometimes 1518? What is up with that? Not a clue. I ran Windows Live Mail without signing in to Windows Live Services for three, or four days. My Contacts list never changed, or disappeared during that time. It is, however, different than the Contacts list I normally see ...

Standard form has been overwritten
Hi, one of my users overwrote her standard message form with something she wanted then, but not now (great!). This form when used doesnt force a spell check at the end of saving despite it being selected in options as a pre requite before sending. Besides tearing my hair out has anyone got any idea about this please thanks Matthew ...

Force user to click on Main Form First??
Hello - Is it possible to force a user to select a field in the Main form prior to inputing any info into the subforms? Or is it possible for the Main form to assign and ID to the record when a user begins filling out the subform? Thanks - Lee - -- Message posted via http://www.accessmonster.com One way is to use the Before Insert event of the subform. Private Sub Form_BeforeInsert(Cancel As Integer) If Me.Parent.NewRecord Then Cancel = True MsgBox "Please enter the main form record first." End If End Sub Another wa...

Firing Change event from popup form
Hello, This code is on the AfterUpdate event of a list box on a popup form. Private Sub Company_AfterUpdate() Dim frm As Form Set frm = Forms![LoadSheetsMain]![LoadSheetsST].Form frm.Controls(OpenArgs) = Me.ActiveControl End Sub It assignes a value to a textbox on the calling form. I need to fire the change event of that textbox, but don't know the method. Thanks for any help. God Bless, Mark A. Sam The change event of the textbox must be Public. You can then call it from a different control or form: Forms!FormName.PublicSub Mark A. Sam wrote: >Hello, > >Th...

Copy contents of a cell into a blank cell
How do I copy the contents of cell B2 into cell D2 only if D2 is empty Hi It cannot be done with a formula - only with VBA. The following code should achieve what you described Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Address = "$D$2" Then If Range("D2") = "" Then Range("D2") = Range("B2").Value End If End Sub To Use Copy Code above Right click on sheet tab>View Code Paste code into white pane that appears Alt+F11 to return to Excel -- Regards Roger Govier "fire9...

Modify CRM Forms
We have a client that would like to add a command button on a CRM form that would start an event. He is doing this to reduce keystrokes. We can not use workflow rules for him. Can we customize the Forms in HTML etc. Thanks Mike; Certain forms in the CRM allow for buttons to be placed on the toolbar on the detail form. This is documented in the SDK, but basically you specify the details of your button (text, image, url) in the isv.config file, and the CRM will just open the specified url in a new browser. Dave "MikeB" <anonymous@discussions.microsoft.com> wrote in mess...

Control Form form a Sub Form
How do I activate a command button on the main form when I double click on the sub form? "TonyAntique" <u59027@uwe> wrote in message news:a5a6118d13dbf@uwe... > How do I activate a command button on the main form when I double click > on the sub form? The code would be like this: Me.Parent!Command99.Enabled = True But you'll need to define "double-click on the subform" more precisely. It's probably the dblClick event of the subform's Detail section you want to use. -- Allen Browne - Microsoft MVP. Perth, Western Australia T...

form based on table data help
I have a table that has ID field which is (autonumber); Procedure-Number, which is a lookup field from Procedure_list table; and Procedure-Name which is also a lookup from Procedure_list table. What I want to do is have a form that once the procedure number is selected then the procedure name is automatically pops in to the field for it. How can I do that? Can anyone help me on this task? Thank you, ...

Set the focus to the top of the form that has a tabcontrol
Hi I have a form which consists of a tab control. When users switch between tabs, I want to set the focus of the entire form to the top of the form each time instead of where they let the form on their previous visit. Is this possible? I tried to set the focus to the top of the form by using the following: Me.StudentID.SetFocus But it doesn't work. I'm not sure of where I should put the code. Is this the right one to use or would something else be better? I also read somewhere in one of the forums I can set the focus first to the mainform by using Forms...

Unbound Form
I want to create a form to be used by Data Entry as a worksheet. When customers call they would be able to work the costs and totals on existing product. I tried to use a bound continuous form that uses the "tblProducts" to supply basic product information. Of course it doesnt allow me to enter an existing product because I would create a duplicate product code(Key). I suppose I need an unbound form but I want to make use of the exsting prod. information (Codes, description, price, etc) and I would like to open a "new record" (Although I know its not really a re...

how can I send all my messages from Hotmail to my main inbox
how can I send all my messages from Hotmail to my main inbox automatically, is there any way to do it in Outlook 2003? thanks On Tue, 21 Sep 2004 22:15:02 -0700, "sess" <sess@discussions.microsoft.com> wrote: >how can I send all my messages from Hotmail to my main inbox automatically, >is there any way to do it in Outlook 2003? > No. -- <<<SgtRich>>> Email Client: Microsoft Office Outlook 2003 News Client (Text): Fort� Agent 2.0 www.forteinc.com News Client (Binaries): News Rover 9.2 www.newsrover.com Try OE6. "sess" <sess@di...

Run time error in form
I have a form that has been working fine. However, today I went in to enter data and I get a Run Time error -2147352567 - This recordset is unupdateable. Can someone please explain. Can this be fixed? Any help will greatly appreciated. For a thorough explanation of recordsources that are not updateable have a look here http://www.allenbrowne.com/ser-61.html Jeanette Cunningham "TotallyConfused" <TotallyConfused@discussions.microsoft.com> wrote in message news:496903C6-6026-43F0-BE7D-3EA703EC83A1@microsoft.com... >I have a form that has been working fine. Howev...

Auto Complete a form
Hello, I have two tables, one contains product information (Code and Name) the other containes the bulk of infomration. This is variable depending on situation. What I want to happen, is that I select a code # from a drop down list. Once the code is selected, it automatically completes the name of the product, I then just update the variable information. How can I do this in laymans terms? -- Thank you for your time! John Hi, First of all, if your database is well normalized, you probably don't need to populate those data. But, in any case, if that's what you want to accompli...

publisher 2002-media content
I have been using publisher2002 for some time now, but have never loaded the media content cd-rom that came with it. What are the extra facilities with this utility please. -- brevit Clipart -- JoAnn Paules MVP Microsoft [Publisher] "brevit" <brevit@discussions.microsoft.com> wrote in message news:21705949-4E40-4077-9819-053E05752306@microsoft.com... >I have been using publisher2002 for some time now, but have never loaded >the > media content cd-rom that came with it. What are the extra facilities with > this utility please. > -- > brevit Ho...

SS#'s lose lose formatting in .csv
Hi, I have a user who is entering a list of ss numbers. She has to have them in this format: 024574882 712894748 First off, we can't get the leading 0 to stay, it just disappears. I have tried formatting the column as text, as numbers, as custom #########, and like '983474744. No matter what we do, after saving and opening it again, the leading 0's are gone and some number turn in exponential notations. Can someone please help?? This should be an easy fix, but it seems the formatting I put on this does not hold!! thanks in advance.....Bill Select the column Either cl...

losing pictures
I had produced a 3 fold brochure and printed it successfully for months. Then one day 2 of the jpg files stopped printing. I have reloaded Publisher, done everything I can think of, but can not get those files to print on the office color printer. They will print on the Black and white. The brochure will print from someone else's computer!!!! if I save the file on a CD and print it from someone who has Publisher. I talked to Gateway and they said it was my problem, this is a new 2003 computer, with 2002 Publisher. Can anyone help Update your printer driver from the website of your prin...

Set form dirty through unbound control
Dear all, I have an unbound listbox (multiselect) on a bound form. The listbox and its selection are populated via vba from a table. I have an invisible helper txt field which is bound to a table. The helper txt receives whatever is selected in the listbox by setting its value property to the list box elements. Unfortunately this does not make the form dirty. Apparently changing the value property of a txt field does not trigger the dirty event but only changing the text property of a text field does. I can not set the text value of my little helper txt field because it has to have focus ...

Changed a form to have two tab control
Code was writtten on the original form, but form is still named the same, the only thing that has changed is the control for the form changed to tabbed control and then I moved the individual controls to the appropriate tabbed sheets. Having a problem with the cmd buttons exiting to a main form, so I am thinking that I need to change the syntax on the code properites somehow. The main form is called "POCheck", the individual tabs are called "PO Form" and "Checkbook Form". I am not sure how the snytax needs to refer to the tabs? Here is an example: ...

Lose Focus
Env: VC++6.00 I want a control on a Dialog to be losed focus after it is disabled by EnableWindow(FALSE). I don't care who will get the focus, so I don't want to use SetFocus(). Is there a way? TIA William >I want a control on a Dialog to be losed focus after it is disabled by >EnableWindow(FALSE). >I don't care who will get the focus, so I don't want to use SetFocus(). > >Is there a way? William, Try using CDialog::NextDlgCtrl or maybe PostMessage WM_NEXTDLGCTL to the dialog. Dave Thanks Dave. That is exactly what I want. William > Try using CDial...

Interactive form
I am trying to create a form that is fully interactive using Access 2007. I would like a person to be able to choose their department from a drop down list. Once selected, I would like to have a new element on the form display the positions within that department. When a position is selected, I would like the form to display a list of responsibilities for that position. I already have a table for departments, positions and respnsibilities, but I'm not sure where to go from there. Thanks in advance for the advice! ...

Outlook 2003
I am using Outlook 2003 and it is connected to our company's Lotus Notes (one of many other accounts I am connected to). I am able to read the mails headers sent to Lotus Notes but when I try to open the mail, it shows a blank screen. However on the preview panel, the contents can be read Can someone help? Thank you. What type of AV are you using? --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the Swen virus, all e-mails sent to my actual account will be deleted w/out reading. After searching google.groups.com and finding no answe...