For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
You're not going to get a direct answer to such a broad question.
"How" is going to be understanding the problem and all the sub problems that make it up, such as interacting with cameras, video clients, transferring data over TCP and UDP, writing what amounts to a media server, ... and there's LOTS and LOTS of problems to solve that make up those problems.
Frankly, this is a huge undertaking and if you're even asking this question, you're not ready to tackle it.
Good afternoon. I have an issue with a stepper motor where I need to control it via an RS232 connection. The motor and control board are very old (circa 1993) and they came with code in Basic language meant to control the motor. I am trying to use that code in the Vintage BASIC interpretor available online, but I'm getting an error code telling me there is an unexpected end of the file. Is there anywhere I can go to debug a simple BASIC program and try and find out where the error is coming from? This, unfortunately, is not something I do (I don't really have any coding experience, at least not since I was very young). The code is pretty short, it's only 90 lines long, so there really isn't all that much to check.
Thanks to anyone who might be able to help.
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.
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.
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.
Windows 10 does not "default" the same as previous versions.
In some cases, it will set a "minimum" height or width which any attempt to override, without changing the "minimum", will be defeated.
In other case, a property that was expected to return a number in ALL cases, will now return a NAN except in certain cases, and another property should be used (e.g. "actual" size versus simply some other dimension).
I suggest you "prototype" some "new" forms under Windows 10 and get familiar with the "live property" inspector before concluding it's hardware, drivers, etc.
And upgrade to VS 2019, insuring you understand what it means to select a particular "Windows 10 Build" version.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
Maybe a dumb reply by me, but did you set your anchor points?
Like a control on the top left of a form anchors to the top left.
I don't like talking about this subject because it's sort of voodoo here, but I'm pretty sure with VB Winforms, when a form changes size, or a label changes text, it sends a message to the Windows OS message pump just like in Win32, and the message pump queues the screen change or update. I was told to never use "Application.DoEvents()" because it very bad but I suspect it's purpose is to pause your program execution and let the message pump catch up and process it's queue so that the screen can update.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
listBox created in window class #32770 as OWNERDRAW when i want to retrieve itemdata , give me some strange character examle i use addstring and character : "D"
pdis as DRAWITEMSTRUCT
Select Case pdis.itemaction
if no use listbox ( Style : Drawitem ) it gives me right character as i see in listbox but when use drawitem to draw my listbox charaters change and only one item of it showed me
The return value is the length of the string, in TCHARs, excluding the terminating null character.
So you need to allocate a buffer at least this length plus 1. The LB_GETTEXT message will fill the buffer with the text of the control, followed by a NULL character (hence the +1 in the previous part).
The EM_SETCUEBANNER message also needs to be sent with SendMessageW. In fact you should use the W suffix on all Win32 calls, as all your text will be Unicode. Unless, of course, you add some text manipulation to make it ASCII.
Assuming I have truyen.exe file, I want to give notice to truyen.exe file to output the message with the syntax: Drive:\truyen.exe "example communication", I want to pass the file to truyen.exe. how to declare exe yourself ?