Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by Joe Crescenzi

  1. Joe Crescenzi

    Window displaying differently outside VFP environment

    Since every user can have different screen dimensions and resolutions, it's best to design user interfaces with forms and avoid absolute screen coordinates entirely. Forms can make things quite a bit easier, but we still need to be mindful of whether they will fit on a user's screen and what...
  2. Joe Crescenzi

    Window displaying differently outside VFP environment

    I agree, if it's a new project, so I assume he is trying to just maintain something written before Windows, so there are a bunch of @ SAY/GET or ? lines. As for me, I still define Windows from time to time when I want a BROWSE window or a REPORT FORM to take up a specific space.
  3. Joe Crescenzi

    Window displaying differently outside VFP environment

    As a rule of thumb, I don't define windows using absolute coordinates for both dimensions, especially when they're on the screen because the FROM and TO coordinates are dependent on the font size of the screen itself. So, to ensure the window is large enough for whatever you are putting into it...
  4. Joe Crescenzi

    website URL validation in a text box

    We're used to finding ways to work with depreciated products, after all, VFP was discontinued ages ago. The funny thing is Microsoft has a lot of products that use VBScript, including Excel, so it will probably take a while before they pull the plug entirely. Microsoft suggests a few...
  5. Joe Crescenzi

    website URL validation in a text box

    The Swiss Army Knife is definitely the better tool, by a wide margin. That said, since the original request was for a potential RegEx solution, it's potentially more than the OP needed. I've used similar approaches to validate just email addresses, where I need not know if the mailbox exists...
  6. Joe Crescenzi

    website URL validation in a text box

    Valid points. I'd be more inclined to use your suggestion of IsValidURL to just confirm the formatting, but the bored developer inside of us finds it fun to build something that does more than it needs to. It's like asking an engineer to make a flathead screwdriver and they build you a Swiss...
  7. Joe Crescenzi

    website URL validation in a text box

    That's probably all that's needed. If Ravi's goal was just knowing a URL is formatted correctly, the function should return true even if the domain doesn't even exist.
  8. Joe Crescenzi

    website URL validation in a text box

    It's not up to me, it's up to the OP. Remember, all Ravi asked for is validating that it's a valid URL format. If that's the only criteria, even a redirected, unavailable, or Bad Gateway means the URL was formatted correctly.
  9. Joe Crescenzi

    website URL validation in a text box

    Good idea. By reading just the HEAD, you have the potential to speed it up if the URL returns a lot of data. My only suggestion is that if the main objective is knowing if the URL is good, I wouldn't return loException.Message, I'd make it a consistent value such as "* INVALID *", or simply...
  10. Joe Crescenzi

    website URL validation in a text box

    The basic structure of a URL is pretty basic, so I'd start by using what Chriss said, checking to see if http://, https:// are at the start (you can add ftp:// if you want to support it). Beyond that you can check to see if there is at least one period before the presence of either a slash or...
  11. Joe Crescenzi

    How to supply filename when doing SET PRINTER TO NAME "Microsoft Print to PDF"

    As I mentioned, I use XFRX these days, but as far as I know it will just follow whatever dimensions are in the report file. They have a free version, so give it a try and you may not need to explore other options. That said, I've been using XFRX for decades and it's never let me down. What...
  12. Joe Crescenzi

    How to supply filename when doing SET PRINTER TO NAME "Microsoft Print to PDF"

    FoxyPreviewer is actually the easiest compared to XFRX. Basically you just call it once and it creates a bunch of objects that you don't even need to understand or use directly to get it to work. You can just call it like this: DO FOXYPREVIEWER WITH "CLEAN" REPORT FORM YourReport.Frx TO FILE...
  13. Joe Crescenzi

    How to supply filename when doing SET PRINTER TO NAME "Microsoft Print to PDF"

    There are quite a few PDF libraries out there, including FoxyPreviewer and XFRX. I have paid versions of both, but the one I use in my actual projects is XFRX because it's super flexible and gives me consistent results. FoxyPreviewer is easy to implement and has a ton of features too. It it...
  14. Joe Crescenzi

    List Out Missing Numbers of a Number Range

    Performance for reporting is subjective based on how often you need to run the report, Keep in mind that even when the range varies, a permanent table can still be used because although I didn't mention it, you would be using a range in your query so it's still optimized for current and future...
  15. Joe Crescenzi

    List Out Missing Numbers of a Number Range

    My two cent... If this is something you will do often, you can improve the performance by creating a permanent table instead of a temporary cursor so it doesn't have to keep creating it and deleting it on the fly. The other advantage is that you can also place an index on the serial column...

Part and Inventory Search

Back
Top