|
Although legacy codes do run on Windows for sake of backward compatibility. But why would you even want to use such an old language on a new platform?
You may want to upgrade your current application to Windows Runtime. Windows Runtime and .NET framework are separate, Windows Runtime is the native framework provided with Windows 10, where as .NET framework is a separate product that you install.
Read this API[^] for Visual Basic on Windows Runtime.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
As I said, it's an old application I wrote for a client way back in the early 90's which I still need to maintain occassionally. It was originally written in VB3, but apart form a minor update to VB5 in the mid 90's has remined pretty much teh same, and is still in use to day - a fact I am ever so slightly proud of Of course it should be rewritten for a modern OS, but it's no small task, and the client likes it as is, so there is a certain amount of "if it ain't broke, don't fix it" going on. It will have to eb done day, but in the meantime....
|
|
|
|
|
Then the client should not switch operating system. If the OS updates and he breaks the application, then it IS broken.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I think the coder is the one who wants to switch in this case, and the IDE's compatibility is the primary concern. That client doesn't particularly sound like the sort of person who's likely to have ever ventured beyond windows XP.
|
|
|
|
|
The coder is heading for problems; an unsupported IDE on an OS that was created years later. It is not just that it will be a 32-bit environment in a 64-bit OS, there will be more recent versions of COM-controls, something VB leans on. Those would be different on XP, generating a error if not compiled on XP.
"Unsupported" really means it could stop working tomorrow. It is never a good strategy to build on something that can be gone tomorrow.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Yes, you're right, and I realise this - but it's a large job to re-write the code, and I don't feel like doing it for free. So until the client is prepared to fork out for it, we'll just have to struggle on with the current code. As the earlier poster pointed out, this client is a tech dinosaur... I have pointed out to them the dangers of the path they are currently on.
|
|
|
|
|
Wombaticus wrote: So until the client is prepared to fork out for it, we'll just have to struggle on with the current code. The client will be going this path until something bad happens. You need to prevent that, as YOU are the one that knows more about the risk of continuing this path than he has.
At least make sure you are not liable if the thing collapses; because that WILL happen at one point in time.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I know you want info on VB5 specifically, but have you just tried installing it? (Or perhaps copy an installed directory from another older PC)
I had VB6 installed on Win8.1 and after the upgrade to 10 it still works like a charm, had no problems.
Screenshot[^]
modified 21-Aug-15 2:45am.
|
|
|
|
|
Well, that's the obvious thing - but I don't want to risk upgrading and then finding VB5 won't run. Mind you, I believe the W10 upgrade offers a rollback to W7 if wanted, so I guess I could just go that route...
|
|
|
|
|
Personally, I didn't trust that roll-back feature and would strongly suggest you make a disk image ( Clonezilla[^] ) before upgrading if you want to be certain that the rollback is 100% effective.
|
|
|
|
|
I have seen other people's solution to the rather small, obscured 'power off' button in Windows 10 - by making a link to shutdown.exe. Unfortunately, as far as I can see, shutdown.exe will not check to see if there are any unsaved documents and will close the computer whether data is saved or not. Also, although you can delay shutdown.exe - this, I think, is made almost completely pointless by the fact that there is no way to cancel it (that I can see).
My idea is to write a small program which will call shutdown.exe after a delay but which can be cancelled. This bit, I'm pretty sure I can do. The part I have no idea how to do is to check to see if there are any unsaved documents so I can give the user the option to quit shut down.
Is it possible to check to see if there are unsaved documents? How would I do this?
Thanks.
|
|
|
|
|
That is almost impossible, since each application will have its own way of keeping track of whether open documents need to be saved.
|
|
|
|
|
I thought there would be some way of centrally registering if a document is unsaved. After all, doesn't then main 'Power Off' button in Windows prompt you with an 'You have unsaved data. Are you sure you want to close down?' type message? - which suggests that this is the case for at least some applications.
|
|
|
|
|
Ben Aldhouse wrote: I thought there would be some way of centrally registering if a document is
unsaved. No. You simply keep a dirty-flag somewhere in your application.
Ben Aldhouse wrote: 'You have unsaved data. Are you sure you want to close down?' type message? It will say that some applications aren't responding and that you might lose data if you close them anyway.
In WinForms you get a closing-event that is fired when Windows shuts down; the application should then shut down, but some applications show a dialog asking the user whether or not to shut down. Meaning Windows asks them to close, and they simply refuse and hang around.
Next question from Windows; do you want to terminate the applications that did not shut down?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thanks for your replies Richard and Eddy. I think I may have discovered a 'feature' of Windows 10 here. I have just done some experiments with Notepad++ v6.7.7 and Inkscape v0.91. Notepad is so advanced that an unsaved document gets saved anyway and opened up next time you open Notepad++. I think Visual Studio tends towards this level of foolproofness, too. It will give a message when you open it up asking if you would like to 'recover' unsaved files from the last session. Inkscape, however, will lose what you were working on if you haven't saved it.
When I try and close Inkscape with an unsaved document it will produce a dialog asking me if really want to close it. However, when I close Windows 10 with an unsaved Inkscape document the document is lost. I think that this dialog would have caused the shutdown process to ask for user feedback in older versions of Windows. Not so in the current version of 10.
Is it Windows policy now that all applications should save documents on the fly or users be more careful? Is it an oversight in Windows 10? May be it will be fixed soon and I won't have to write my little program...
|
|
|
|
|
When you close an application (Inkscape for instance), it will receive a WM_CLOSE[^] message form the OS and as response to it it will ask you to save (or not to save) the unsaved documents...
When you close the whole OS the messages to send is WM_QUERYENDSESSION[^] and WM_ENDSESSION[^].
If those messages are not handled the application will lost data...
So it is entirely up to the application...
However you may replace the standard shutdown process with your own, where before any other messages you send a WM_CLOSE to each (top-level) window...If the window returns 0 (means, it handled the message), you continue to the next, but if not you can pop a message to alert the user and bring the window to focus...If you got to the end of the list, you can shut down the OS...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
This looks interesting. May be I'll get around to having a look at what is going on with these messages eventually. It would be an interesting exercise.
However, now I have seen that it isn't just short cuts to shutdown.exe that cause Windows to close down in a way that can cause unsaved work to be lost I've come to the conclusion that this is a possible oversight by Microsoft and I'll probably leave it for a while to see if they change it back themselves before I attempt to write my own fix.
Oh for just a little bit more time per day to get things done...
|
|
|
|
|
Ben Aldhouse wrote: Notepad is so advanced that an unsaved document gets saved anyway and opened up
next time you open Notepad++. That is not exactly advanced, just a choice. One usually copies the document to the temp-folder and have the user edit that, saving each edit. Or when the application shuts down - without blocking that process, if it does, it will be terminated and all data will be lost.
Ben Aldhouse wrote: Is it an oversight in Windows 10? Probably more a reaction to applications blocking/preventing Windows from shutting down.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: Probably more a reaction to applications blocking/preventing Windows from shutting down.
Windows not closing down is actually useful to me, though, seeing as I am often daft enough to try and close down my computer before I have saved my work!
|
|
|
|
|
I have properly set the formats for these, but no matter how wide I make the Taskbar, only the short form for these shows. I cannot figure out how to make it show the long form.
Thanks in advance.
|
|
|
|
|
That's the same as in Windows 7.
BTW These forums are for programming questions.
|
|
|
|
|
No, it doesn't work the same as for Windows 7.
I thought this was a forum for any Windows question. if it is possible, I can move it to The Lounge, where I usually post general how-to questions.
|
|
|
|
|
swampwiz wrote: I can move it to The Lounge
Please don't. Pick an appropriate forum to post in. IMHO, this fine here.
You can lead a developer to CodeProject, but you can't make them think.
The Theory of Gravity was invented for the sole purpose of distracting you from investigating the scientific fact that the Earth sucks.
|
|
|
|
|
OK, I've just done the big upgrade to Windows 10. One thing that is bugging me is that the the windows (forms) now have a white top and no border. I'd like to get the regular color & border like I had it for Windows 7. I can't figure out how to do this.
Thanks in advance.
|
|
|
|
|
Applications that run on Windows 10 will generally take on the appearance of Windows 10 - so, the Aero interface is gone (it went in Windows 8).
|
|
|
|