|
|
The one from System.Windows.Forms says this in the docs;
Implements a timer that raises an event at user-defined intervals. This timer is optimized for use in Windows Forms applications and must be used in a window. Meaning it won't fire if it doesn't get to process the message.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
So , the only solution remain to manually calculate the time inside the loop.
|
|
|
|
|
..which is not that hard; there's an example a few posts below.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
No, they haven't "solved" it. What they've done is gotten around the warning message without actually fixing the problem.
|
|
|
|
|
If you think you have to use Application.DoEvents, this is a sign you're doing something very wrong.
modified 5-Dec-18 22:10pm.
|
|
|
|
|
Solution? Ignore it. The message only shows up when debugging the app.
And you're wrong about the BackgroundWorker not having access to the controls. Technically, you don't have access to them, but you can get at the controls if you supply method to update the controls and Invoke calls to them. Using the BackgroundWorker, or some other threading/Task model, will free up the UI thread to pump messages. This will also make the warning message you're seeing disappear.
Also, if you're doing everything in this long-running operation on the UI (startup) thread, then your controls are not getting repainted anyway. If the UI thread is busy with your operation, it can't respond to all the WM_PAINT messages that are piling up in the message pump. So, during this operation, what could you possibly be updating in the controls since nobody can see those changes?
If you're going to do a long-running operation with control interactions, you have to do it correctly, otherwise you run into little issues like what you're seeing.
|
|
|
|
|
I could install visual studio 6.0 on my windows 10 system as per the article of this code project and my Visual Basic package worked very well for six months.Two months back I found the package is not working and I tried to reinstall number of times, but it couldn’t be installed. I find that VB98 folder exists and VB6.exe is starting and displaying form, but form code screen will not be displayed and closes the project screen.
I could install visual studio community 2017 (for Home) on my windows 10 system and I find conversions of my Visual Basic package is likely to take long time. Can someone help me how do I proceed for installation of visual studio 6 on my windows 10 system.
|
|
|
|
|
Just what is your expectation here, you are asking how to install a product that is no longer supported onto the current OS. Nobody without a REALLY compelling reason will be doing this and it is highly unlikely that anyone is gong to be able to help.
I'm sure you have heard it before... Rewrite your application into a current language if you expect to get any help.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
It may very well be due to some Windows 10 updates. I managed to install it following the CP article but it was on a LTSB machine, with no Cortana, Store nor updates (there were few of them and I axed them altogether).
GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
Hi,
Visual Basic 6 is no longer supported. Many of the VB6 ActiveX control CLSID have been set to COMPAT_EVIL_DONT_LOAD because of security issues.
Best Wishes,
-David Delaune
|
|
|
|
|
Well, I can tell you that VS 6.0 works fine on all of my Windows 10 systems. (desktop is build 17134.407) That's a really strange problem you are describing and one that I've never encountered in 20 years with VS 6. You could try event viewer or procmon to find what's failing. One other suggestion is setting up a VM with an older OS. I do seem to recall that on the first startup, you have to uncheck the add-in for Visual Component Manager.
As for migration to .NET, I'd suggest finding VB 2008 Express which is the last version to include a VB6 migration utility. I have found the best results have come from stripping all the code and letting the migration tool upgrade the forms, then go back and paste in/rewrite the code block by block. It's tedious, but better than dealing with hundreds or thousands of migration notes/errors at a time. Good luck!
"Go forth into the source" - Neal Morse
|
|
|
|
|
After porting to windows 10 my VB6 project worked fine. Most probably updations for windows 10 must have effected. On windows 10 it worked only on windows XP compatible mode only.Normally windows 10 updates should not affect. Now I do not have an XP system with me. I will try to convert the project to VB2017. Thanks to all for answering my query
|
|
|
|
|
Member 14075516 wrote: Normally windows 10 updates should not affect.
Oh, the naivety.
The updates have a habit of breaking something all the time. We have found that nearly every pack of updates this year has broken something. The older the app, the better the chance of something breaking in it.
|
|
|
|
|
Hello !
I'm using vb.net 2017
In my form I have 1 panel and 3 datagridview.
The panel should be docked at the left , and this is can be done easily.
I want to dock the 3 datagridview , one at the top of the form and 2 other at the bottom left and bottom right , in order that when the form is resized by width or height all the 3 datagridview should be resized. ( Please look this image :https://imgur.com/gallery/aduZ1g9 )
I've tried too many combinations setting the dock at top ,bottom ,fill , changing the Z-order but nothing worked.
How can i do ?
Thank you !
modified 1-Dec-18 15:06pm.
|
|
|
|
|
Drop a panel first, dock to left.
Drop another panel (!), dock to bottom.
Drop DGV1 in new panel, dock to left.
Drop DGV2 in new panel, dock to fill.
Drop DGV3 in open space above panel, dock to fill.
--edit
You don't want the new panel to be recognizable as a panel; set its border to none.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
modified 2-Dec-18 7:02am.
|
|
|
|
|
Or you could use the TableLayoutPanel.
It sounds like you want two columns, one for the Panel on the left and one for the DGV's on the right, and three rows, one for each DGV.
For the Panel, you can set it up so that the Panel spans three rows, while the DGV's each get there own Row in Col 1.
Once that's setup, you can change the Panel and DGV's to Dock Full and they'll all take up the full space in their own cell.
|
|
|
|
|
Hello !
I'm using vb.net 2017.
I have a code where I should use CTypeDynamic.
With other types everything is ok , but if the target type is System.DateTime , I want to detect if the expression can be converted to a Date with the format "dd/mm/yyyy.
How can I do that with CTypeDynamic?
Thank you !
|
|
|
|
|
Convert it to a string, tryparsing it as a date?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
I have it as a string ,
But if I use CTypeDynamic(str, type1) , and str="11/26/2018" , it shows as correct , but it shouldn't be because is not correct with the format dd/MM/yyyy
|
|
|
|
|
The correct date-format is determined by the system settings, and thus, by the user. You choose a date where it is easy to see which is the day-part and which is the month-part. Now, how about 3/4/2001?
The computer isn't allowed to guess, and you can't guess the "correct" place of day's and month within that date.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
I want that my program works regardless of how user configure the system date format.
So I choose the format dd/MM/yyyy , and the user should input the date in this format.
3/4/2001 should be interpreted as April 3 2001.
26/11/2018 is November 26
11/26/2018 - is invalid
|
|
|
|
|
desanti wrote:
3/4/2001 should be interpreted as April 3 2001.
26/11/2018 is November 26
11/26/2018 - is invalid
So, any date that can be interpreted as M/D/Y should be. Anything that fails is to be assumed D/M/Y, and if that fails, it is invalid.
No, I will not participate. Your data is all in the same format, or the entire dataset must be considered invalid.
There's a good reason why DateTime.TryParse Method (System) | Microsoft Docs[^] only accepts a single provider. If you don't know what the format is, and start guessing like you do, you're bound to end up with multiple small disasters.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Maybe we are misunderstanding each other.
The situation is simple :
The user write a date in a textbox.
I want that the user write the date in the format : day/month/year.
So I want a way to check if what the user has wrote can be converted to a date in that format :
- 01/05/2015 - is ok because 01 is a valid for day number , 05 is ok because is valid for month number , 2015 is ok because is valid for year number.
- 25/12/2018 - is ok because 25 is a valid for day number , 12 is ok because is valid for month number , 2018 is ok because is valid for year number.
- 12/25/2018 - is wrong because 12 is a valid for day number , 25 is wrong because is not valid for month number , 2018 is ok because is valid for year number. So it's wrong !!!
What is the problem with this logic ?????
|
|
|
|
|