-
September 21st, 2018, 09:21 AM
#1
Graphic Problem
I have MDI app where the Project Coordinator form is displayed inside of MDI form:
Due to forum limitation for number of files (no more than 5) I had to combine files.
The user opens the folder with files:
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
-
September 27th, 2018, 03:55 PM
#2
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.
-
September 27th, 2018, 03:59 PM
#3
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
-
September 27th, 2018, 04:08 PM
#4
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.
-
September 27th, 2018, 04:17 PM
#5
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
-
September 27th, 2018, 04:39 PM
#6
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.
-
September 27th, 2018, 04:57 PM
#7
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.
-
September 27th, 2018, 06:03 PM
#8
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.
-
September 27th, 2018, 06:23 PM
#9
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.
-
September 27th, 2018, 06:47 PM
#10
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.
-
September 27th, 2018, 07:09 PM
#11
Re: Graphic Problem
Refresh methods were used. OS is Win 7 64 bit Ultimate with SP 1:
VB:
Thank you.
-
September 27th, 2018, 07:39 PM
#12
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.
-
September 27th, 2018, 07:46 PM
#13
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.
-
October 17th, 2022, 01:08 PM
#14
Re: Graphic Problem
I'd wait for others' feedback but I don't have good news for you. Activate events fire when you move from one form to another within the same project. There is no event that VB provides to let you know your app lost/gained focus to/from another application. Other than using a timer to check which thread/process has the current focus; subclassing would be a solution but that is not a minor thing
-
October 19th, 2022, 02:59 PM
#15
Re: Graphic Problem
I'm still looking for solution new
Last edited by 2kaud; October 20th, 2022 at 03:08 AM.
Reason: Advertising URL removed
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
|