×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

ThemedControl
3

ThemedControl

ThemedControl

(OP)
Hi All

Can I get the step by step procedure, how to create themed control.
I downloaded from VFPX but gives a lot of errors.

Please consider me as a beginner and let me know, how to implement this theme in my app.

Thanks

abbasaif

RE: ThemedControl

(OP)
Thanks

I didn't find anything there.

Abbasaif

RE: ThemedControl

(OP)
Thanks

Tamar

RE: ThemedControl

Well, and since that was removed, of course the VFPX project about themed controls isn't just documented by Doug Hennig's paper, it has its own documentation on Github as well.

First the overview page (readme.md - if you're unfamiliar with Github - is a file that contains markdown for exactly what is shown on the project home page):
https://github.com/VFPX/ThemedControls

It tells the help is a ThemedControlsHelp.htm file in the VCX folder, it only lacks documentation for the ribbon.

Did you find that ThemedControlsHelp.htm?

The easiest way to get at this is not by navigating online in the Github repository, click "clone or download" and then download the project as a zip, unzip and then start the ThemedControlsHelp.htm

Important!

One notice, very general about any download you do: Right click on the downloaded zip and follow these instructions: https://thirtysix.zendesk.com/hc/en-us/articles/20...

Microsoft introduced this mechanism of trust or better untrust of any file downloaded from the internet or getting on your computer from mail attachments. And if you don't unblock, every file extracted from the blocked zip inherits that blocking, that's even true if a setup.exe is marked that way and you run it, every file the setup.exe generates extracts is getting this mark. It's slightly related to why CHM files don't work from a network share, but let's not drift away into details, it's something Micorosft expects you to know and which after over 10 years still hasn't become general knowledge.

The consequence of this blocked files is very subtle, that's why it almost always stays unnoticed, you can run executables, you can watch images, you can read a text, you can work on most files despite that blocking, so calling it blocked seems wrong. But it does something, it starts the executable or the software associated with the file type in a low permission mode.

And indeed that also happens with VFP when you start a PRG marked that way via double click in Windows File Explorer you get a security question whether you trust that PRG and if you do VFP is started in low privilege mode, doesn't find some components and goes into repair setup mode trying to find its installer.

But if you first start VFP and then DO such a PRG it runs normal, which shows how weak this protection is, but also what would have made it much more known, if it can't slip your attention, if it would always hit you.

If you're serious about your system security you first check whether a downloaded file has the checksums as specified by a provider of a download sometimes. Even a platform like GitHub doesn't offer it as an automatic UI or API feature to be able to get eg the MD5 or SHA512 checksum, there are many tools computing this for the file, the point is they only do this for the file you have, not for the file that's online and which you downloaded and want to know whether it is exactly what is provided and wasn't modified.

It's a bit of pity how this all isn't ideal yet, as that checksum idea is even older than that of the trust zone marking of downloaded files.

It has the consequence of MSSQL Server or at least Management studio not working in all aspects when you don't unblock the setup.exe, I solved a problem for someone with linked servers by reinstalling some software from unblocked setups. The situation is as I already said those setups then generate blocked files. The setup itself runs elevated - otherwise you'd notice and the setup wouldn't install - but the installed software then runs with lowered privileges. IE's protected mode is based on this.

If you look in your user profile AppData folder you see besides a Local folder for local userprofiles and a Roaming Folder for domain profiles (most often in a company you can log in at any workstation and your profile then will use that folder) and there is a LocalLow folder there. If I open it at my desktop it contains folders for/from Adobe, Microsoft, Mozilla, Oracle, and Sun. Which shows only the real big software vendors know and use this feature to higher the security of their software.

So I won't blame anyone not knowing all this, but it's surely something at least developers should know about Windows. It adds to the topic of UAC and redirection and elevation of processes in the opposite direction.

So if you downloaded the ThemedControls.tip, unzipped and double clicked on something specific you might have got a security warning. I just experimented and you should still be able to double click and start the sample.pjx and then start main.prg from it and a demo of the themed controls starts and works. Which again shows how low the effect is. I may try further things, but likely everything works much better, if you delete the unzipped folder, go into zip file properties unblock it and the extract once more.

Oh, and last and perhaps not least it's much like anything from VFPX a VFP9 project, the system.app included is GDIPLUSX and also only works in VFP9. VFPX is a VFP9 extension, not any earlier VFP version, many things might work almost, as they are not all checking your VFP version and simply fail on VFP9 features, but it should be clear from the outset VFPX is meant as the community-driven VFP10 by means of extending VFP9 within the possibilities of VFP9 itself, there may be single developers who pay attention to downward compatibility with older VFP versions and API declarations of GDI+ functions also will work in older VFP as they mainly depend on Windows itself and even apply to Windows98, but you can't blame VFP developers to make use of newer language features only available in VFP9, so while themed controls mainly make use of GDI+ Windows feature independent of VFP, they likely also use VFP9 specific feature and don't work in VFP8 or lower.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: ThemedControl

Mr. Abbasaif,

Further to Olaf's kind en extensive instructions. There is an other one: be sure you install VFP9 Service Pack 2 and the latest Hotfix if you want to work with this class and GDIPlus

Regards,
Koen

RE: ThemedControl

(OP)
Yes, I have VFP9 Service Pack 2.

Thanks

Abbasaif

RE: ThemedControl

(OP)
Hi,

I copied the whole directory of ThemedControl in my current project as a part of project and compiled.
After compilation it gives the following errors:

Compiling k:\winfas\tc\themedcontrols\vcx\ctl32.prg
#DEFINE CCM_GETUNICODEFORMAT (0x2000 + 6)
Error in line 164: Constant is already created with #DEFINE.
#DEFINE CCM_SETUNICODEFORMAT (0x2000 + 5)
Error in line 166: Constant is already created with #DEFINE.

Compiling k:\winfas\tc\themedcontrols\vcx\ctl32_api.prg
#DEFINE CCM_GETUNICODEFORMAT (0x2000 + 6)
Error in line 164: Constant is already created with #DEFINE.
#DEFINE CCM_SETUNICODEFORMAT (0x2000 + 5)
Error in line 166: Constant is already created with #DEFINE.

Compiling k:\winfas\tc\themedcontrols\vcx\ctl32_classes.prg
#DEFINE CCM_GETUNICODEFORMAT (0x2000 + 6)
Error in line 164: Constant is already created with #DEFINE.
#DEFINE CCM_SETUNICODEFORMAT (0x2000 + 5)
Error in line 166: Constant is already created with #DEFINE.

Compiling k:\winfas\tc\themedcontrols\vcx\ctl32_functions.prg
#DEFINE CCM_GETUNICODEFORMAT (0x2000 + 6)
Error in line 164: Constant is already created with #DEFINE.
#DEFINE CCM_SETUNICODEFORMAT (0x2000 + 5)
Error in line 166: Constant is already created with #DEFINE.

Compiling k:\winfas\tc\themedcontrols\vcx\ctl32_structures.prg
#DEFINE CCM_GETUNICODEFORMAT (0x2000 + 6)
Error in line 164: Constant is already created with #DEFINE.
#DEFINE CCM_SETUNICODEFORMAT (0x2000 + 5)
Error in line 166: Constant is already created with #DEFINE.

Kindly let me know how to remove these..?

Thanks

Abbasaif

RE: ThemedControl

Looks like you're maybe including the same file twice somewhere.

Tamar

RE: ThemedControl

(OP)
Thanks for the reply!

I checked there is no duplication.

Abbasaif

RE: ThemedControl

Hi mr. Abbasaif

It stil looks like your project is trying to instantiate the define's in the header file ctl32.h twice.
This does not mean that you have two ctl32.h files in you project, it means one of the programs of your project is trying to instantiate ctl32.h a second time.
Since I don't know how your project nor installation looks like, I would advise you to install Themedcontrols first in a separate own directory, you will than find a Themedcontrols.pjx with which you can play. Please follow Dough's extensive document on the letter and also study the ThemedcontrolsHelp.html file.
If you than have played enough and understand how Emerson made this nice class you can subclass the class into your own and enhance your forms with it.

Regards,
Koen

RE: ThemedControl

(OP)
Thanks Mr. Koen for pointing out me to understand the concept of duplication.

I was not using Themedcontrol in my Project, as my project is almost finish, so I decided to change the old looking main menu with this beautiful creation.

I copied the whole themedcontrol directory (Which I was downloaded from VFPx) into my running directory and changed the name from "Themedcontrol" to "TC" and set the path according to it.

After that I compiled without doing nothing and found the above mentioned errors.

Please guide is there anything I am missing?

Thanks

Abbasaif

RE: ThemedControl

(OP)
Hi,

Quote:

It stil looks like your project is trying to instantiate the define's in the header file ctl32.h twice.
This does not mean that you have two ctl32.h files in you project, it means one of the programs of your project is trying to instantiate ctl32.h a second time.

I checked my Project Manager thoroughly and found that ctl32.h is already there in FoxyView (The directory which I am using for FoxyPreviewer).

Please let me know what to do, if I remove this, will it effect my running project.

Thanks

Abbasaif

RE: ThemedControl

Mr Abbasaif,
If you have two ctl32.h in your project, I would rename one in e.g. ctl32old.h and see what happens, if you encounter an error you should try to rename the otherone and rename ct32old.h back to ctl32.h
Please note,
I cannot oversee how your project is concepted so it is also for me a trial and error. I still believe what you are doing here is wrong.
Donot just copy the whole Themedcontrols directory into your present project. Themedcontrol consists of, I believe 5 different classes and it is very unlikely you will using them all 5. It is much better to delete that directory from your project and install Themedcontrols in a separate directory. Now you van open the Themedcontrols project file and play and learn how it works, what it does.
Regards,
Koen

RE: ThemedControl

(OP)
Thanks Mr. Koen, it works.

There are no errors now.

Abbasaif

RE: ThemedControl

(OP)
Hi,

Can anybody guide me how to put/insert image as shown in figure in themedcontrol?

Thanks

Abbasaif

RE: ThemedControl

(OP)
I tried a lot using power point given in example. But did not get through.

In Help it saying

"In the Properties window, activate each page and set the Caption and Picture16 properties"

Please guide.

Thanks

Abbasaif

RE: ThemedControl



Mr. Abbasaif,

In the form (the frmSample) you drill down in the properties window to
.ThemedOutlookNavbar
.Panes
.Pane1
.Picture16 or Picture24 property
and
.Pane2 etc

Koen

RE: ThemedControl

(OP)
Thanks Mr. Koen

I will do that.

Abbasaif

RE: ThemedControl

(OP)
Hi,

Please guide me how to increase the size of splitter and overflowpanel which is circled as shown in image.

Thanks

Abbasaif

RE: ThemedControl

Hi,
The screenshot you show, is that after you increased the panel manualy, or does it appear like that when you start?
Regards,
Koen
P.S. I dont like your icon on the bar ...Records

RE: ThemedControl

(OP)
Thanks for the reply!

I increase the panel manually, because the treeview which I am going to create is lengthy one!

So I increase the width in order to show as much as possible.

Please advise

Thanks

Abbasaif

RE: ThemedControl

Mr. Abbasaif,

To increase the picture on the pane you will have to increase the pane itself according to the by you introduced new width.

Regards,
Koen

RE: ThemedControl

I have a question regarding "SimpleChart" and using it is Windows 10 vfp9.
(I read that it needs a special driver download, do I have that right?
and if so what is the driver. . . *.dll? ActiveX)
thx Lui

RE: ThemedControl

Quote:

I have a question regarding "SimpleChart"

You should start a new thread for that question. And you should give the thread a title that indicates what the question is about.

That way, more forum members will see it, and you are more likely to get a good range of answers. Putting it in its own thread will also make it easier to find by other people with the same or similar question.

By asking your question at the end of a different, unrelated, thread, you are cluttering up that thread and making it harder for other people to use.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close