Things I've tried:
On Win 7 computer - it's a home network (not public), advanced sharing settings all set as permissively as possible, shared folders have the following groups set to "FULL CONTROL" for both sharing and security: everyone, network, guest, anonymous. Disabled IPv6. IPv4 is set to static IP. Left homegroup (since win 10 doesn't care about this anymore and it wasn't working with it on). Verified it's connected to the same 5G network as my Win10 computer. Both use wireless.
I found advice that seemed sensible to enable the "Function Discovery Resource Publication" so I set both machines to load the service automatically.
On win10, pinging the machine by name returns the right address. NSlookup returns an address on the Internet for some reason instead of the local machine (non-authoritive answer 220.127.116.11). No idea why or how to fix it. If I look in the router settings, it shows the computer with the right name and IP in the list of connected devices.
EDIT: I almost forgot; if I type \IPADDRESS into Windows Explorer on Win10 where IPADDRESS is the ipv4 of the Win 7 machine, it gives me a username and password login (which it shouldn't do) and if I type "guest" with no password, it lets me connect.
Also, during all of my testing and changes, using VNC with just the hostname has worked flawlessly. Apparently my VNC client is able to get the right IP somehow.