-
Content Count
620 -
Joined
-
Last visited
-
Days Won
11
Everything posted by corneliusdavid
-
Yes, that's always the case: \\server\sharename or \\server\sharename\subfolder. Note that there doesn't necessarily have to be a folder added on to that as the "sharename" part already points to a folder--the shared folder. Also, for hidden shares, the sharename will end with a "$" (at least on Windows).
-
@Columbo, I had a few minutes and explored this technique of loading a TImageList dynamically a little more for my own curiosity and wrote a test program. The attached project loads a memory table with some local bitmaps, then as you scroll through the table, it pulls the image out of the table and clears/refreshes the image list which is associated with the page control. It should get you close to what you want. ImageListLoadTest.zip
-
Look at the help for TImageList.Add. There's a code sample that shows how to load a selected image file from disk. You can extend that to your database by either saving out the image to a temporary file or streaming it directly to a TImage.
-
Not with "#" but with a "$". Hex numbers in Delphi are prefixed with $. Label1.Font.Color := TColor($502F0F);
-
For controls like TLabel and TEdit, you can use color constants defined in System.UITypes or specify your own as hex numbers; the TColor type is simply a UInt32 in the range -$7FFFFFFF-1..$7FFFFFFF. For example, both of the following lines set a label's font color to navy: Label1.Font.Color := clNavy; Label1.Font.Color := TColor($800000); The TitleBar is a special case and you have to enable custom properties for it; watch this tutorial video on Creating Custom Title Bars from DelphiCon 2021.
-
And I've probably used it sometime in the past--and forgotten about it. (*head slap*)
-
Not sure how relevant this is or if it answers any of your questions but I switched form UniDAC to FireDAC last year. If I still used the Professional edition of Delphi, I'd still have UniDAC; if I needed Direct Oracle Access, I'd still use UniDAC. There are many other reasons to stay--this is just a short story of why I changed and what it took for my small apps.
-
Well isn't that handy? How long has that been around? Found it back to at least 10 Seattle...
-
Delphi 12: Install Packages inconsistency?
corneliusdavid replied to PeterPanettone's topic in Delphi IDE and APIs
That's why I changed the default Windows "open" action for .PAS files to just open them up in my text editor. I use Delphi to open projects and source files from within Delphi for programming and compiling but when just viewing something, I use a text editor. Most decent text editors (excluding Windows Notepad, of course) these days have syntax highlighting and while it may not be like what I have in Delphi, it's good enough for just looking at some code real quick. -
That's what I did. Then listed all of them I work with in my signature line. (Not that it really matters, of course, but I feel better more honest for declaring them.)
-
DOH! Corrected: value1 := random(250) + 1; value2 := random(250) + 251; value3 := random(250) + 501; value4 := random(250) + 751;
-
So you want 4 random values, one each in the ranges 1-250, 251-500, 501-750, and 751-1000, right: Try this: value1 := random(250) + 1; value2 := random(250) + 250; value3 := random(250) + 500; value4 := random(250) + 750; Each random number is restricted to a 250 range but adding a number to it puts it into different range brackets.
-
How should spaces after a comment be handled by the formatter
corneliusdavid replied to dummzeuch's topic in GExperts
Personally, I think a space after the comment makes it a little more readable. So I would opt for A1, B2, C2. But more importantly, I think comments should follow code or be on a separate line--I think comments before code on the same line break the vertical continuity of a block of code, causing the statement to be missed when the eye scans down a page. Therefore, like baka0815, I would much prefer a line-break option to move the statement to the next line. -
Prevent Multiple Instance from running at the same time
corneliusdavid replied to new_x's topic in Windows API
You might like using TMutex better: Preventing Multiple Application Instances in Delphi with TMutex -
If you have a large Delphi application with years of history and you want to add a REST server with as little learning curve as possible, RAD Server is fairly simple to get up and running--using existing skills. Scale? Did you know that RAD Server is deployed only as a module under the most popular web servers, IIS on Windows and Apache on Windows or Linux? I'm not sure what would scale more than that. There are many closed-source products on the market that are chosen because they are simpler to use or offer more features than open-source equivalents. I'm not saying RAD Server is the best but it's certainly an option that is worth looking at and will be a good solution for some people.
- 12 replies
-
It's just my read on it based on what I've seen. because they can make more money selling deployment licenses. I guess time will tell.
- 12 replies
-
I highly doubt that. There have been a lot of updates to RAD server recently. Also on https://blogs.embarcadero.com/, there has not been one single article about DataSnap since 2020 while there have been 15 on RAD Server in that same time-frame.
- 12 replies
-
DMVCFramework is a good way to build a REST server; it's open-source, well supported, and well documented but has a steep learning curve for newbies. RAD Server also allows you to build a REST Server but requires the purchase Delphi (or RAD Studio) Enterprise or higher, so it's not cheap if you don't already own that edition of Delphi. But neither of those solutions are explicitly "database in the cloud" products. They can be written to access databases and provide remote data but you can also host a database in the cloud and access it remotely from a standard Delphi app using database components. There are many reasons why building a REST server is a much better way to go but just thought I'd mention the option as I have done both.
- 12 replies
-
It's the "Options" button and takes you to another page that is usually skipped; on that page, you can set the destination for both RAD Studio and the Catalog Repository folder, and also determine whether it's installed for "all users" (the default) or just the current user and whether or not to add a shortcut on the desktop.
-
Software only creates an error in RemoteApp
corneliusdavid replied to Unktneemo's topic in General Help
Oh, some instances work fine? Then perhaps the users getting the error are accessing the one part of the program that doesn't work well with RemoteApp. It'd be interesting to know what the difference is between the ones that work and the ones that don't. One thing I remember from testing is that the software seemed to work fine while the user was in the main program; messages popped up, multiple windows, database access, fine (with permissions set properly). But the software was split into about four applications and when they needed to launch an ancillary program, there were problems getting to it. RemoteApp likes to be in control of the programs that are launched and, IIRC, this was the biggest hurdle we faced. -
Software only creates an error in RemoteApp
corneliusdavid replied to Unktneemo's topic in General Help
Yep, the software I was testing was very mature software, having run for hundreds of clients around the US for many years. And, like you noticed, some parts work fine, other parts raise errors. There may be simple software fixes to get around those--really depends on the program and what it needs to do. -
Software only creates an error in RemoteApp
corneliusdavid replied to Unktneemo's topic in General Help
I support some programs that are accessed via RDP and when I was first researching remotely running apps, I tried RemoteApp briefly but had a similar problem. While I don't recall what the exact cause of it was in that instance, it has to do with the application assuming resources are accessible in the same manner as they are when run from a standard Windows desktop--which RDP provides. It may have been something simple like checking for the screen size or something. In any case, we had to modify the program and even then only run it via RDP. I'm sure it would work through RemoteApp if it was a fairly simple program but when the Delphi code calls Windows API functions that are either not supported or return unexpected values and they aren't handled properly, weird things can happen. Sorry I don't have a better answer but yeah, you'll need to talk to the programmers. -
Ah Yes! I love it!
-
I agree it's not near as readable. But it was sure fun to see if I could do it!
-
Excellent! Glad that helped. I just found a similar property in a DevEx grid control a few weeks ago with a similar need/solution.