|
post it in free tools forum
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Have you tried right-clicking on the desktop, selecting 'Display Settings', scrolling to the bottom of that page and clicking 'Graphic settings' and overriding your app's preference there? (I've never played with that setting, so I don't know what it does. It is just the first thing I'd try.)
|
|
|
|
|
All that offers for me is a choice of 'power saving' or 'high performance' (for a desktop app, IrfanView).
Most programs I tried in compatibility mode only offered back to Vista (no visual change I could see), but another old program (c 2007) can be set to XP-mode and shows the same visual style as above - but it was noticeably slow to load in XP mode. I get the impression that it is Windows doing the extra work.
modified 21-Aug-20 6:14am.
|
|
|
|
|
It was worth a shot. Good luck with it! You can also sometimes play with compatibility settings by right-clicking on the executable file (or shortcut link) in Explorer and then choosing 'Properties' and changing to the compatibility tab.
|
|
|
|
|
How it is supposed to look?
|
|
|
|
|
I am not familiar with the application,
so I don't know what the normal look and feel is like.
Howeve, to the best of my knowledge, this UI look and feel is created by a controls library called ctl3d, or something similar.
It was introduced initially in windows 3.11g and later was carried over to windows 95.
You may want to check if such a DLL exists in the effective PATH when the program displays this UI.
Adar Wesley
|
|
|
|
|
Did you try running it as admin? It might be the case that when you run it in compatibility mode it tries to reproduce the look of the version you are emulating, but might require elevation to actually change the look.
|
|
|
|
|
Something else I noticed just last night : I run several rather old applications, one of which is the Windows File Manager from XP. Microsoft open-sourced the code so I downloaded it, massaged it a little, and compiled it in 64-bit mode. For the most part, it runs just fine in W10. Well, the weird thing with it is it's an MDI app and the client windows appear with a Win7-style non-client area as shown in the screen shot but the mainframe window appears with a W10-style non-client area. It looks really odd.
I would sure like to know what's up with this. I haven't read anything about this anywhere. Has anyone?
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
I don't known what application properties you can set to get the old style theming.
However you can call the DwmSetWindowAttribute function[^] with dwAttribute set to DWMWINDOWATTRIBUTE.NCRenderingPolicy and pvAttribute set to DWMNCRENDERINGPOLICY.DWMNCRP_DISABLED to disable the modern theming on the window's nonclient area.
|
|
|
|
|
Ah! Very interesting! Thank you for pointing this out to me. I was not aware of this API. I need to experiment with this.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
At a guess, I'd say it's likely that the video cards of the two systems don't implement the same features.
When I used to do video processing on Windows, we did a lot with DirectX and found every system we tried, our software on needed some tweak to our video processing. The video in some systems didn't implement features, others did, but using feature B was faster than feature A on it (on most other systems, A was faster than B), and others implemented a feature, but it just didn't work right.
Honestly, I don't know how games worked at all.
This was about 10 years ago.. a lot has probably changed. However, it may be that your old software is using features that some systems still implement, or implement well, and others dropped.
|
|
|
|
|
I write docs and grab screenshots and paste them into Google Docs.
Sometimes those documents end up being articles I post to CodeProject.
Images
However, CP wants the images to be uploaded to CP servers as separate image files.
Google Doc HTML Creator (Save as...)
You can download the document as a zipped HTML and Google Docs will pull out every image from your document and save them in a \images directory. That's very cool.
That's very nice because now you have all of the images saved as PNGs and you didn't have to do any work.
The Problem With The Images
The problem is that the images are all out of order.
They're named like: imageXXX.png in consecutive order (image1.png, image2.png).
Not Same Order As Your Document
However, the order that they are numbered in is not the order they appear in your Google Docs document. I have no idea why that would be true. What is wrong with some devs' minds?
Finally, i haz teh Codz!!
Here are the steps.
1. Download your Google Doc as a zip html
2. unzip it to a local directory
3. Open in your favorite browser (It's FireFox, right? Mine too.)
4. Hit F12 to open dev tools / console.
5. Run the following script**:
document.querySelectorAll("img").forEach((s, counter=1) => (console.log("mv " + s.src.substring(s.src.lastIndexOf("/")+1,s.src.length) + " 0"+counter++ + ".png")))
This will generate output on your console that looks like the following:*
mv image38.png 00.png
mv image3.png 01.png
mv image36.png 02.png
mv image28.png 03.png
mv image9.png 04.png
mv image29.png 05.png
mv image11.png 06.png
mv image37.png 07.png
etc...
6. Copy all of those lines, go to your images folder and run it.
Now all of your images are renamed in order that they appear in the Document.
This will make it far easier when you copy your Google document to CP and upload the images.
You can insert them back into your document in order. It's much easier.
* If you are on a Windows machine (sorry for you ) then simply use the following script (changes mv to ren).
Windows Version
document.querySelectorAll("img").forEach((s, counter=1) => (console.log("ren " + s.src.substring(s.src.lastIndexOf("/")+1,s.src.length) + " 0"+counter++ + ".png")))
** Yes, you can make the script even better by cleaning up some things, but this gets you there and is good enough for what I need.
|
|
|
|
|
Writing a simple console app.
I wrote this to insure there is at least one argument provided by user.
if (args.Length < 1){
Console.WriteLine("Need at least one arg.");
return;
}
Interesting thing is that Visual Studio Code has these little helpers that pop up at various times which state [Show fixes]. This one says, "invert if"[^].
If you click, it changes the code to:
if (args.Length >= 1){
return;
}
Console.WriteLine("Need at least one arg.");
return;
Do you find that clearer?
I don't.
In my case, the if statement occurs at the top and if it is not fulfilled then the app exits.
In that case there is no need to think about other code.
Plus, the code that executes normally will not be wrapped in any outer if statement, instead it will simply following the if statement in a normal reading flow.
Inverted Case
In the inverted if then when there is at least one argument then all of your base code is now wrapped in the if statement and you have to think backwards. It's weird.
AI you have failed me.
|
|
|
|
|
I use yoda conditionals all the time (due to cutting my teeth on C++ back before the compiler was smart enough to warn on accidental assignment). I stuck with it due to the fact that it's a habit I spent so long at that it would take me at least as long to unlearn. At least I'm consistent about it.
So I can see it being at least a little bit helpful sometimes for a confusing condition, but that's me.
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: I use yoda conditionals all the time
Haven't heard that term before, but seems to apply, it does.
|
|
|
|
|
This is not a true case of yoda conditionals or at least not in the sense I've heard the term.
For me, yoda conditionals are written like:
if (1 >= args.Length)
{
Console.Write ("Not enough arguments");
return;
}
The inversion refers to the order of terms in the if and the reason for it is that a construct like:
if (1 = args.Length)
(note the missing equal sign)
will get you slapped with a big fat error message ('1' is not a l-value). The "normal" order might or might not produce a warning depending on compiler's whims.
In your case it's just a case of compiler being annoying. Sometime I feel it's becoming almost like Clippy: "It seems you want to write an if statemenet. Do you need help with that?".
Here is a random example taken straight out of some code:
assert (str);
while (*str > 0 && *str <= ' ')
str++;
And it flags the while statement with an IntelliSense warning: "Dereferencing NULL pointer". Heck no! That's why I put the assert right before it.
Mircea
|
|
|
|
|
I use the "first the constant" rule (I didn't know it was called "yoda conditionals", nice name hehehe) in comparisons for equality.
But for greater / lower than I don't use it for readability.I find it easier to read when it is "var <= value " than "value >= var " in a check_lower_limit()
Same thing I try to make my conditions to be read as if (true)
I mean, I don't like "if (!var) ", I prefer to write "if (false == var) " this way is 100% clear on the first sight.
Or naming the variables in a way that they meaning is "true". This is something that comes from working in industry PLCs. I have had sensors called "part_exist" where the "1" was meaning "empty" (security against cable breaks), to look an "if (part_exist_x == true) PutPartInPlace(x); "
I always renamed such sensors to follow the rule "name means true" so that the same condition check as above would read "if (place_empty_x == true) PutPartInPlace(x); "
Just personal taste...
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
If there's a var called part_exist, and 1 (or true) means the part does not exist, then that's not personal taste, it's just plain bad programming! The entire reason for selecting a variable name is to accurately convey the data stored within...Some day I imagine AIs will be smart enough to warn us for those type of code smells
|
|
|
|
|
When the electronic planer does the eplan in the office and never goes to the production hall, and just copy paste things from other projects that never saw in person... it happens more often than it should.
At the end I had an agreement (after several discussion he logically didn't win). Once I got to the machine and did my IO-Tests... I would give him my variables list and he would accept it and correct the E-Plan without complaining.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
asserts( ) can be removed entirely based on compiler settings. That would explain the warning.
|
|
|
|
|
I know, but I didn't have NDEBUG defined in that configuration so assert was active.
Don't get me wrong, I agree with having Intellisense looking over my shoulder and flagging potential issues but sometimes it gets annoying just like sometimes a coworker can be annoying when you do pair programming. And just as with a coworker, it feels good to bitch from time to time
Mircea
|
|
|
|
|
They are hints. (resharper C++ also do that)
Sometimes they work, sometimes they don't.
In that case, it is not useful
I'd rather be phishing!
|
|
|
|
|
Maximilien wrote: They are hints.
I agree. Just suggestions.
Maximilien wrote: In that case, it is not useful
Thanks for the confirmation. That's what I thought, but was wondering if I missed something.
Also, it really is just a matter of opinion on this one since either would work.
|
|
|
|
|
raddevus wrote: AI you have failed me. Problem found.
BTW... I am with you in this case.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Nelek wrote: Problem found.
Nelek wrote: BTW... I am with you in this case.
Thanks. I thought all sane devs would be. The rest are not devs or are not sane or both.
|
|
|
|