Click here to Skip to main content
15,881,898 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Listbox event, ItemSelectionChanged, how to wait for last event, or cancel events Pin
Dave Kreskowiak24-Oct-19 15:35
mveDave Kreskowiak24-Oct-19 15:35 
GeneralRe: Listbox event, ItemSelectionChanged, how to wait for last event, or cancel events Pin
jkirkerx25-Oct-19 10:56
professionaljkirkerx25-Oct-19 10:56 
Questionhow i create a video conference program Pin
Member 1462143013-Oct-19 8:09
Member 1462143013-Oct-19 8:09 
AnswerRe: how i create a video conference program PinPopular
Dave Kreskowiak13-Oct-19 16:05
mveDave Kreskowiak13-Oct-19 16:05 
QuestionStepper Motor control code Pin
Member 1462018511-Oct-19 12:10
Member 1462018511-Oct-19 12:10 
AnswerRe: Stepper Motor control code Pin
Eddy Vluggen11-Oct-19 12:44
professionalEddy Vluggen11-Oct-19 12:44 
AnswerRe: Stepper Motor control code Pin
CHill6021-Oct-19 5:37
mveCHill6021-Oct-19 5:37 
QuestionMove to Windows 10 on HP messes up display Pin
Todd (10789346)9-Oct-19 4:30
Todd (10789346)9-Oct-19 4:30 
Hello!
What is the code to force Windows to refresh the display settings?
I have a VB .NET Forms application that has been steadily updated long enough that it has moved through multiple .NET versions and deployed across Windows XP, Windows 7, and now Windows 10 (we were able to avoid Vista and 8).

Now, on Windows 10 running on an HP, I have a display problem. The problem in the HP, but there is a work around that I would like to trigger from the application.

To fix the problem, after launching the app (from DEV or EXE):
1) Dock / Undock (switching between native and attached displays)
2) Open display settings and change something (resolution, scale, etc.)
3) Perform some other, similar display adjustment that requires the OS to update all of the resolution/scaling constants.

In each case, when change the display or display settings, the problem is resolved, and when I change back, things continue to work fine. It also does not matter if I start on the laptop display or the attached displays. I can duplicate the behavior and fix on multiple HPs running windows 10.

What I need is code to force Windows to refresh the display settings.
Background:
The problem is clearly in the OS, likely the display driver. However, HP has been having issues with display drivers ever since the rush to market with the Thunderbolt and they have yet to fix most of those problems. HP blames Microsoft, Microsoft blames HP, nothing gets fixed.

Using app level functions, such as Refresh, and PerformAutoScale do not do the trick. The problem appears to be that windows is reporting different values to the application on container size, and usable size. The app initially draws the controls to the correct container size, but then only repaints a smaller usable size.

Making the window smaller (reducing the container size to below the apparent usable size) and then bigger again, does not make the problem go away - there is a fixed "usable size" that the app will not repaint beyond the borders of, even when the container goes beyond that size. What is interesting about this is that the app will update the data in the controls beyond this "usable size" - it just doesn't properly repaint, instead it adds the new text on top of the old text. It also leaves behind the drawn window edges as the container is sized larger.

Another interesting tidbit is that I can run the app, perform the work around to "fix" the problem, and then close the app. Upon reopening the app, the problem returns, and the work around is again required.

Please help with both a code driven work around, or even better, an OS level fix.

The particulars:
1) VB .NET in Visual Studio 2017 (version 15.9.16)
2) Windows 10 (up to date per Microsoft)
3) HP ZBook Mobile Workstation "Bang & Olufsen" with i7, lots of memory (has no problem with Solid Works 2017)
4) Display drivers for both laptop internal, and Thunderbolt dock external up to date
5) Behavior duplicated on second HP (same config) with Windows 10; same app continues to run just peachy on second HO (same config) running Windows 7.
Todd

AnswerRe: Move to Windows 10 on HP messes up display Pin
Gerry Schmitz9-Oct-19 9:18
mveGerry Schmitz9-Oct-19 9:18 
GeneralRe: Move to Windows 10 on HP messes up display Pin
Todd (10789346)17-Oct-19 6:25
Todd (10789346)17-Oct-19 6:25 
GeneralRe: Move to Windows 10 on HP messes up display Pin
Gerry Schmitz17-Oct-19 15:26
mveGerry Schmitz17-Oct-19 15:26 
GeneralRe: Move to Windows 10 on HP messes up display Pin
Eddy Vluggen17-Oct-19 23:10
professionalEddy Vluggen17-Oct-19 23:10 
AnswerRe: Move to Windows 10 on HP messes up display Pin
jkirkerx10-Oct-19 14:11
professionaljkirkerx10-Oct-19 14:11 
GeneralRe: Move to Windows 10 on HP messes up display Pin
Todd (10789346)17-Oct-19 6:32
Todd (10789346)17-Oct-19 6:32 
GeneralRe: Move to Windows 10 on HP messes up display Pin
Dave Kreskowiak17-Oct-19 13:12
mveDave Kreskowiak17-Oct-19 13:12 
AnswerRe: Move to Windows 10 on HP messes up display Pin
Todd (10789346)18-Oct-19 7:31
Todd (10789346)18-Oct-19 7:31 
PraiseBuffer Not Retreive English language Pin
Member 118036078-Oct-19 4:37
Member 118036078-Oct-19 4:37 
AnswerRe: Buffer Not Retreive English language Pin
Richard MacCutchan8-Oct-19 5:18
mveRichard MacCutchan8-Oct-19 5:18 
GeneralRe: Buffer Not Retreive English language Pin
Member 118036078-Oct-19 5:28
Member 118036078-Oct-19 5:28 
GeneralRe: Buffer Not Retreive English language Pin
Richard MacCutchan8-Oct-19 6:16
mveRichard MacCutchan8-Oct-19 6:16 
GeneralRe: Buffer Not Retreive English language Pin
Member 118036078-Oct-19 7:12
Member 118036078-Oct-19 7:12 
GeneralRe: Buffer Not Retreive English language Pin
Richard MacCutchan8-Oct-19 7:56
mveRichard MacCutchan8-Oct-19 7:56 
QuestionToolTip Does not display(WIN32-API) Pin
Member 118036077-Oct-19 4:51
Member 118036077-Oct-19 4:51 
Questionassing arguments in vb6.0 ? Pin
Member 24584676-Oct-19 23:55
Member 24584676-Oct-19 23:55 
AnswerRe: assing arguments in vb6.0 ? Pin
Mycroft Holmes7-Oct-19 12:40
professionalMycroft Holmes7-Oct-19 12:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.