How to solve - The Window Previewer could not display the window

What to do when you get this error message? First, DO NOT close this message or the preview files are deleted…

Window Previewer

The Window Previewer could not display the window.
Please report this problem to SoftVelocity.
Include a copy of the Window structure in the bug report.


Look at the errors list there may be something helpful like missing icons:


If clicking Preview you get nothing, no preview window, no error message window, then try installing .NET 2.0 and 3.5 .

You can check if you have it with: dir %WINDIR%\Microsoft.Net\Framework\v*


In DiscussSV Ray Rippey reported Preview would not work without a Printer Driver installed:

I had a problem the other day with the program just didn’t go anywhere
when trying to preview. Turned out the printer driver disappeared when
the guy unplugged his printer. Installed the Microsoft xps document
driver and the preview worked. Just throwing this out there.

1 Like

With the Window Previewer error Message displayed (not closed) open Windows Explorer to your project folder and you’ll will find WinPreview### CLW SLN CWPROJ files. This is window code generated for preview.


Copy these WinPreview### files to a subfolder, e.g. folder WinPreviewFailed.
All you need is the CLW so just rename it “_Failed.clw” and skip the copy.
Close the Message which will delete the files

I create a Win32 EXE Project (no APP) I call WinPrvFail
That must build in your project folder or will not have icons, etc.
I paste in the WinPreview###_Failed.CLW code
I build it and the error will be identified by the compiler.
Most typical is using an Equate in a window.

You can try to use the generated WinPreview SLN CwProj and build it, but that has NOT worked for me.

You can create a Preview failure any time by adding a control with a VALUE() that is an Equate.

CHECK('Preview Failure'),value( UndefinedEquate )

if you can’t figure it out post the code that errors and attach the CLW to this thread.

1 Like

If you want to use Equates/Variables in your Window and still be able to use the Window Previewer sometimes you’ll need to create a WindowPreviewer.INC file in your project folder. It is a choice on the new file dialog:


The initial code is below.

!Variable and equate declarations here
!Code executed after Open(Window)
!Code executed at top of the ACCEPT loop
!Set windowPreviewerCanExit__=FALSE or button press exits preview

In the Includes section you can define equates, or INLCUDE(‘MyEquates.INC’) your own equates.

If you look at a generated WinPreview###.CLW file this will make sense. Again… the CLW is deleted unless you get an error. You can cause an error with a control like this:

CHECK('Preview Failure'),value( UndefinedEquate )

I find it handy that I can take any window declaration and make a running program. I can modify that CLW to do prototyping, try revising the window in various way, test a window posted in a message. I can post that EXE for someone else to try, e.g. font changes. So I insert check('x'),value(xxx) get the error and grab the WinPre CLW.


In PTTS 43145 on 12/20/2020

Summary: Won’t display Window Previer [sic] “Window Previewer”

While in IDE, I select a window then select Window Previewer and a dialog pops up stating that it can’t display the window and contact SoftVelocity. Include the window structure. I am using the Getting Started Examples - but have tried other apps as well and still cannot preview window.

Steps To Reproduce Loaded Selected Main(Frame) then Window Button. Once window is displayed, I go to task bar under Window Designer and select Window Previewer.

Under “Additional Information” Robert Rickets posted the below.

Possible cause:

  1. Missing or corrupted VC++ runtime(s) (need C++ 2013 and 2017 redistributables)

  2. Missing or corrupted .Net assemblies (need to ensure .Net 2.x thru to .Net 4.0 are installed)

The installer detects for both requirements, and will install them, but a) user has to ‘agree’ to the installs b) corruption can occur in either the win32 or .Net files, or they can be overwritten by some other installer.

It is also possible that some obscure security setting in Windows is causing the previewer to hang. Do other (simpler or non-frame) Clarion windows preview correctly?

Note #2 missing .Net - When I have seen this there is nothing displayed i.e. no message “Preview could not display”

Had the Window Preview error today and followed the steps to build the WinPre*.clw source which showed the below “Label duplicated” warning for ?DescActions. Also shown in below capture is the Designer Window … source. Note the preview source has USE( Question Mark Variable) while the original was USE( Variable )

The problem was someone used the same USE(DescActions) variable for an OPTION and a CHECK but that had USE(,,?DescActions:2) so a unique FEQ. The Previewer generated code for Option and Check simply changes USE(var) to USE(?var) which works fine, unless … it seems USE(?EquateNotVariable,,?Alternate) is not allowed by the compiler, only Use(var,?alt)

I deleted the Check because it was obsolete and replaced by the Option. If I wanted to keep the Check I could have assigned the Use Variable at runtime: USE(?DescActions:2) ... ?DescActions_CB{PROP:Use}=DescActions

I tired to reproduce this on my machine but it worked. If I grab the generated preview CLW and compile that I get the dup error.

Window WINDOW('Dup Use Test'),AT(,,395,224),GRAY,FONT('Segoe UI',9)
        CHECK('Repeat Last Desc.'),AT(5,15),USE(DescActions,, ?DescActions:2),VALUE('R','N')
        OPTION('Desc. Actions'),AT(2,36,59,41),USE(DescActions),BOXED
            RADIO('Repeat Last'),AT(5,46),USE(?DescActions:Radio1),TRN,VALUE('R')

I did all of that and it compiled and ran just fine showing me my window. Must be something else.

I know I’ve run into that but do not recall a solution. Maybe close and reopen Clarion.

I’d review the generated Preview CLW and CwProj to see if anything jumped out at me.

Try to narrow it down to a few lines of Window code by deleting lines and testing Preview. Delete half and preview. If that works delete the other half and test, if that fails then delete another half.

I need to figure out how to build that project the way the IDE does so I can see the error list.

You can attach a file (or private message) with your Window Source and I’ll take a look.

In sv.clarion.clarion11 topic “Window Previewer not working.” there were some posts …

On Tue, Aug 10 2021 11:11 am, “Jorge A. Lavera” said:
I found that changes to the redirection file can cause this [preview error] as well.
I also found that if you use it a lot, the window previewer can suddenly
stop working, and if you exit Clarion and enter again it is fixed.

On Wed, Aug 11 2021 2:40 am, Bostjan said:
This is strange. I occasinally had these problems but closing and reopening IDE
always helped.

After installing CW 11.13758, previewer won’t work at all. I’ve tried the below
link, recompiling previewer clw, editing cwproj etc, everything works, no
errors - previewer makes .exe and runs that way.

But not when running from IDE inside my app.

Any idea what could be the cause that previewer files seem ok on their own but
won’t compile to exe from my apps? I’ve closed and reopened IDE many times
already, no luck.

One thing is true though: the clarion generated cwproj (of the previewer) does
not include GUID field (which you need to add as per Carl’s instructions to
manually compile previewer code).
If that’s the case then it’s a CW bug?

I have not tried 13758 yet

1 Like

I just had a simple Browse Window that would error trying to preview from the IDE. I followed my steps to put the WinPreviewxxx.clw into a test project and that test would build and display without the preview error.

What finally worked was closing the APP and IDE then reopening. Ray did that work for you? Not very satisfying.

QuickWindow WINDOW('Browse the Pay Check History'),AT(,,526,272),FONT('Microsoft Sans Serif', |
          LIST,AT(8,20,510,218),USE(?Browse:1),VSCROLL,FORMAT('26C|FM~Payroll<0DH,0AH>N' & |
            '[email protected]@34R(2)|FM~Check<0DH,0AH>Date~C(0)@[email protected]|[email protected][email protected]|[email protected]' & |
            '[email protected](2)|M~Description~L(1)@[email protected](2)|M~Amount~C(0)@[email protected]|M~Flex~' & |
            '@[email protected]|[email protected]@19C|[email protected]@31C|M~Dir. [email protected]@[29C|[email protected]@4C|M~' & |
            '[email protected]@]|M~Repayment~'),FROM(Queue:Browse:1),IMM,#FIELDS(HSTDED:PayrollNo,HSTSUM:CheckDate, |
            HSTDED:Timing,HSTDED:Code,PRD:Desc,HSTDED:Amount,HSTDED:Flex125,HSTDED:Annuity, |
            HSTDED:DepCare,HSTDED:DirectDeposit,HSTDED:TrsRepay,HSTDED:ImrfRepay),#ORIG(?List), |
          BUTTON('Insert'),AT(434,248,31,12),USE(?Insert:3),HIDE,#LINK(?Change:3),#ORIG(?Insert), |
          BUTTON('Change'),AT(462,248,31,12),USE(?Change:3),DEFAULT,HIDE,#LINK(?Delete:3), |
          BUTTON('Delete'),AT(487,247,31,12),USE(?Delete:3),HIDE,#LINK(?Insert:3),#ORIG(?Delete), |

A frustration is the generated WinPreview CwProj will NOT open in the IDE … nothing happens and the SLN pad is empty so you cannot build. That’s why my steps require making a Win32 Prv_Failed project.

I found what was missing. If I edit the CwProj and add a <ProjectGuid>{hhhh}</ProjectGuid> line then it will open in the IDE and create a SLN. The WinPreview file name contains a GUID so I copied that as shown below:

The <Project > line did not have DefaultTargets="Build" so I added that because its in projects made by the IDE, but it works without it so that’s optional.

Based on the above here are revised steps for figuring out what is causing Window Preview to show an error.

  1. With the Window Previewer error message displayed (not closed) open Windows Explorer to your project folder and you’ll will find WinPreview### .CLW .CWPROJ .Manifest files. There may also be a WinPreview###.FileList.XML in Obj\Release that will show you the files read and written.


  1. Copy these WinPreview###.* files to another folder to save them, e.g. folder WinPreviewFailed.

  2. Close the Window Previewer error message (click Ok), that will delete the files

  3. Copy the saved WinPreview### files saved in step 2 back into your Project folder.

  4. Edit the WinPreview###.CWPROJ file so under <PropertyGroup> you add <ProjectGuid>{00000000-0000-0000-0000-000000000000}</ProjectGuid>. Paste the GUID from the file name, or some editors will generate a GUID.


  1. Open the WinPreview###.CWPROJ in the IDE and build it to see what is causing the error.

After opening the CWPROJ if the SLN pad does not show the project tree then something is wrong with the CWPROJ edited in step 5. Revert to the original method of creating a Win32 Exe Project and pasting the CLW source.

If Step 6 builds and shows the window preview without an error then try the classic “close and reopen the IDE”. Repeat trying to preview from Designer in the APP.

1 Like

New report in comp.lang.clarion that new Windows 11 computer with a new install of 11.0.13505 PE will NOT show a Window Preview. You get no message, no files, no nothing. This will also be a problem in Windows 10.

comp.lang.clarion (comp.lang.clarion) - Subject: Window Preview
On Wed, Nov 24 2021 9:13 pm, “Bob Campbell” <[email protected]…> said:

I have a new Windows 11 computer and Window Preview doesn’t work. It does
nothing. No error or anything.

I did some looking in these newsgroups, because I sort of remember something
about needing to install .NET 2.0 and/or .NET 3.5.

I couldn’t find what I was looking for. Partly it was hard to find Window Preview.
Anyway, I wanted to install Windows Live Mail, which I use to view these newsgroups.
Installing WLM installed .NET 2.0 and .NET 3.5 automatically.

Now my Window Preview button works.

This is covered in my first post that you need to install .NET 3.5 that will also install 2.0 It also shows the that the command dir %WINDIR%\[Microsoft.Net ](\Framework\v* will list you versions… see Post 1.

Bob installed Windows Live Mail that installed the older .NET and his Previewer now works. You can to run the .Net 3.5 installer from Microsoft. Or checkout this 3.5 Install Blog Post that has nice instructions.