DCHTMLVIEWER

This forum is for eXpress++ general support.
Message
Author
Victorio
Posts: 621
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

DCHTMLVIEWER

#1 Post by Victorio »

Hi,

What limit for file size is with DCHTMLVIEWER ?
I want use it for open Ascii text files. But if file is small, all is ok,then if file has about severam MB, fine not open, show only "clock".
What is better for show ascii text files (reports) ?
I need in it function for search, and print, also for print blocks of text.

I know, can generate PDF, but I have many many existing files in archive, and do not want convert it to PDF.

Thanks.

Victorio

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCHTMLVIEWER

#2 Post by rdonnay »

DCHTMLVIEWER creates a web browser control.

This is not appropriate for your needs.

How large is one of your ASCII files?
The eXpress train is coming - and it has more cars.

Victorio
Posts: 621
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: DCHTMLVIEWER

#3 Post by Victorio »

Ascii files has several MB, for example 12MB, but can be also 50-100MB.

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCHTMLVIEWER

#4 Post by rdonnay »

A file that large could be loaded into an array and then you could use DCBROWSE to view the array. You can set the presentation parameters so it will look like a text viewer.
The eXpress train is coming - and it has more cars.

Victorio
Posts: 621
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: DCHTMLVIEWER

#5 Post by Victorio »

Thanks, I look at it.

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCHTMLVIEWER

#6 Post by rdonnay »

Use the DC_Txt*() functions.

Here is an example:

Code: Select all

aText := {}
nHandle := DC_TxtOpen('MyFile.Txt')

DO WHILE !DC_TxtEof(nHandle)
  cLine := DC_TxtLine(nHandle)
  AAdd(aText,{ cLine })
  DC_TxtSkip(nHandle)
ENDDO

DC_TxtClose(nHandle)
The eXpress train is coming - and it has more cars.

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: DCHTMLVIEWER

#7 Post by Auge_Ohr »

Victorio wrote:What is better for show ascii text files (reports) ?
I need in it function for search, and print, also for print blocks of text.
what you want is not a simple Function :lol: ... you want something like WORD (or Wordpad) ...

Code: Select all

RunShell( cFile, "Wordpad.exe", .T. )
Victorio wrote:Ascii files has several MB, for example 12MB, but can be also 50-100MB.
who does "read" 50 MB ASCI Text ... :o
greetings by OHR
Jimmy

Victorio
Posts: 621
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: DCHTMLVIEWER

#8 Post by Victorio »

Roger: I used DC_Txt function in my source in other place for read file and processing, and work fine.
I will try it .

Jimmy : :oops: yes, notepad, or wordpad I can use, I am looking for a complicated solution and simple exist...
But some problem exist :
1. notepad or wordpad is in language Windows installation, but I need every dialogues in Slovak language (many users do not understand english :( )
2. notepad or wordpad allows editation, and in my application I can not allow this (I do not know, maybe wordpad or notepad can run with parameter to restriction edit .
Because I need text viewer with my full control in my application,

In old Clipper programs I have used Fileview, (uses FView.obj), that has several basic function listing, print, select block, search.

First I examine wordpad, notepad,... or some other viewers, but must be 32 and 64bit, can set code page,.
And also DCBROWSE.

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: DCHTMLVIEWER

#9 Post by c-tec »

Hello Victorio,
The Windwos editor has always the installed language, so Slovak language should not be a problem. And when you writeprotect the file bevor opening, the user cannot save changes to the content,
regards
Rudolf
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

Victorio
Posts: 621
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: DCHTMLVIEWER

#10 Post by Victorio »

Rudolf: yes I tryed change read only atribute, it is not problem.
Language : If user has Windows set to english, or slovak dialogues, I always want to my dialogues will be all in slovak. User for example know "switch on" computer, login, and click to icon on screen.
Yes, it is only problem, if :
1. user has "english" windows and do not know, how to switch to Slovak, or cannot switch to slovak (some installations)
.and.
2. user do not understand english

Other problem is, that I have two type of ASCII files, coded with DOS LAtin 2 and coded in Windows 1250.
Then I must control it and show Ascii files in two modes. In Alaska I can use SET CHARSET TO ANSI, or OEM, but if I run for example wordpad, is is problem (must first convert large file...)

Also I test DCPRINT, but I must set it to best settings to show better readable text.

Post Reply