|
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).
|
|
|
|
|
We're looking at developing a new instrument control and analysis UI as Windows Universal Apps running on Windows 10 (desktop).
We're expecting marketing to push back and say that the software (analysis, at least) must be able to be run on Windows 7.
Is there any way to be able to do this?
A back-compatibility API/SDK?
Even recompiling for Windows 7 would be acceptable. (It doesn't need to be the exact same executable FILE, just the application functionality.)
Doing parallel development of two otherwise identical applications for Windows 7 and Windows 10 is not sensible.
Would our only option be to forego the Windows Universal Platform completely, and develop as regular WPF/MVVM for Windows 7 and then just run it in Windows 10?
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G.K. Chesterton
|
|
|
|
|
AFAIK, a W10 "universal app" won't even run on W8/8.1; you'd have to specifically target 8.0/8.1 to have it run on those platforms, which would restrict the APIs you could use.
I haven't seen any way to get a "universal app" / "store app" to run on W7.
If you need to support W7, and don't want to write multiple applications, WPF is the way to go - so long as you don't need it to run on a Windows phone, or a Windows RT device.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks, That's what I expected, but asking the "collected wisdom" of CP seemd to be a good idea.
Retargeting for W7 would be acceptable if there was an SDK/API that could be used for the W7 version that provided the "universal app" (desktop flavor) functionality.
I'm hoping for the ability to do a single development that lets me use the universal app features (of course, only some would even be relevant...). This would make possible future tablet/phone app versions (subset functionality) easier to implement.
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G.K. Chesterton
|
|
|
|
|
Matt T Heffron wrote: I'm hoping for the ability to do a single development that lets me use the universal app features
No such luck. You can't even "retarget" for Windows 7 because Universal Apps live in a sandbox and use their own special sandboxed API to talk to the OS. There is nothing you can do other than write two different apps or use WPF or Windows Forms or Win32.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I wanted to learn Windows 10 applications, and sadly it uses Windows Runtime. I have been working with .NET framework (specially WPF) and there is a very much simple way to update the title of the Window (which does not exist as a Control in Windows Runtime, instead is just a component of Application object), in Windows Runtime I am unable to change the Title of the application. It remains same as it was, initially; for example Win10Test.
I have not found any member of Application [^], Window [^] or CoreWindow [^] object that might let me update the Title for the application. I have also tried to tinker with Assembly attributes and changed their values but they also don't work.
Is there any way to update the title of the application, or would I need to name the application while creating the project? I have yet not found anything at all so I thought maybe WinRT developers might know what to do.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Double click on package.appxmanifest to open up the manifest editor in Visual Studio. Select the first tab (application). The top textbox (Display Name) is where you change the title of the application.
|
|
|
|
|
Thank you very much for your reply Pete, I did try that one but that is not the solution in Windows 10 applications. Also, Visual Studio doesn't open the manifest editor (I am using Visual Studio 2015), it instead opened up XML editor.
Now, if you didn't know it before. I would give you the How-to of changing the application's name in Windows 10. In the manifest, there is another node Applications, which contains the UAP (Universal application platform) and other properties that each of the application under the project holds.
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="Win10App.App">
<uap:VisualElements
DisplayName="My App"
Square150x150Logo="Assets\Logo.png"
Square44x44Logo="Assets\SmallLogo.png"
Description="Win10App"
BackgroundColor="#464646">
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>
The DisplayName property of this Application was to be edited, not for the project (that was of project, or application... I am not sure, can you clear me?)
Anyways, the solution of yours is still applicable, because indeed it is the DisplayName property, but the child node was having some troubles.
Thank you.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|