dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 13 of 13

Thread: Graphic Problem

  1. #1
    Join Date
    Jan 2013
    Posts
    72

    Graphic Problem

    I have MDI app where the Project Coordinator form is displayed inside of MDI form:
    Name:  001.jpg
Views: 118
Size:  106.9 KB

    Due to forum limitation for number of files (no more than 5) I had to combine files.
    The user opens the folder with files:

    Name:  002.jpg
Views: 114
Size:  101.2 KB


    How can I prevent this? Is it related to the layered design, one form on the top of another plus dialog on the top of the second form? Or it is something else?

    Thank you

  2. #2
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,277

    Re: Graphic Problem

    Not sure what you are trying to prevent or what issue you are seeing. It looks like you are popping up an open file dialog or something of the sort and yes if that be the case it will always pop to the front doesn't matter if mdi or not.

    I think you should go into a little more detail and describe what you think should happen, what you want to happen vs what does happen and how you are going about getting the result you are seeing.
    Always use [code][/code] tags when posting code.

  3. #3
    Join Date
    Jan 2013
    Posts
    72

    Re: Graphic Problem

    As you can see there are gray areas covering real info. Everywhere I used a red pencil the gray "cover" should not hide the subjects.

    Thank you

  4. #4
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,277

    Re: Graphic Problem

    Ok so you are talking about the places with the squiggly red semi circles I guess.

    It almost looks like either auto redraw is off or that the program is busy and unable to properly refresh the display.
    Always use [code][/code] tags when posting code.

  5. #5
    Join Date
    Jan 2013
    Posts
    72

    Re: Graphic Problem

    I played with AutoRedraw property of the form and it did not help.
    After the dialog is open or closed (doesn't matter what causes the gray cover to appear) the program does nothing. The processor and memory of the PC are not busy.
    Some of those gray parts I removed by adding the Timer:
    Private Sub tmrRefreshWindow_Timer()
    tmrRefreshWindow.Enabled = False
    Me.Refresh
    wbDocumentPreview.Refresh
    End Sub
    But it doesn't remove all gray areas.

    Thank you

  6. #6
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,277

    Re: Graphic Problem

    What about the autoredraw for the other area(s) that show the problem? Looks to be a grid, flex grid or listview?
    Have you tried specifically refreshing that area(s) as well?
    Always use [code][/code] tags when posting code.

  7. #7
    Join Date
    Jan 2013
    Posts
    72

    Re: Graphic Problem

    There are 1 big multiline text box, one listbox, one RichTextBox and one Sheridan Grid.
    None of those controls have autoredraw property.

  8. #8
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,277

    Re: Graphic Problem

    Which control is it that is actually showing the issue there on the right? Is that the sheridan grid? Never used that control myself, most of the Sheridan stuff is pretty outdated. I did use some of there stuff in VB3 and 4 and still have one project that uses their calendar control but would like to remove it.

    I just looked up the properties on the grid, apparently there is a redraw property, you might want to make sure that is set to true. Also if you have not tried it already try adding a line to explicitly refresh that control and see what result you get.

    Personally I would suggest phasing out those SS controls if possible and using the MSHFlexGrid instead or one of the other alternatives. Looks like most of those SS controls were last updated about 20 years ago.
    Always use [code][/code] tags when posting code.

  9. #9
    Join Date
    Jan 2013
    Posts
    72

    Re: Graphic Problem

    Sheridan is not covered by gray. ListBox from MS and WEB Browser. Later fter posting this topic I added a standard combobox and it is problematic as well.
    WEB control is fixed by the code I showed you, listbox is still with problems.

  10. #10
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,277

    Re: Graphic Problem

    Still not sure if you actually tried refresh on those controls or not.

    Are you running SP6 on VB/
    What OS and OS SP are you using. Looks like XP with classic themed taskbar

    Also what is the source of that popup dialog? Is that an API call or OCX control?
    Always use [code][/code] tags when posting code.

  11. #11
    Join Date
    Jan 2013
    Posts
    72

    Re: Graphic Problem

    Refresh methods were used. OS is Win 7 64 bit Ultimate with SP 1:

    Name:  01.jpg
Views: 17
Size:  29.2 KB

    VB:

    Name:  02.jpg
Views: 17
Size:  25.6 KB

    Thank you.

  12. #12
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,277

    Re: Graphic Problem

    Well..... Am at a bit of a loss. I can't recall ever seeing this happen in a VB program other than when something covers the form while it is processing data and then the display always returned to normal once the processing was done.

    I have saw this happen in web browsers numerous times. Typically I do not use the web control in any of my apps so I can't say if that may be the source of the issue. I do not think it has anything to do with MDI of the dialog. I have many MDI apps that I have coded and many of them have open file dialogs, never had any such issues with them.
    Always use [code][/code] tags when posting code.

  13. #13
    Join Date
    Jan 2013
    Posts
    72

    Re: Graphic Problem

    I said about MDI just to give as much info as I could. Gray covers appear on some other screens where no WEB controls exist. It is always after some other window covers some area and then is closed. In most cases one or several mouse clicks on different parts of gray areas remove those grays. The most existing screens in the application work fine, some new forms which are not included yet in the production version behave that bad way. I'm still looking for solution.

    Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)