It is currently Thu Jun 04, 2020 5:49 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: RTF Based Help Composer and Viewer
PostPosted: Wed Jan 16, 2019 8:13 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Apr 26, 2003 2:15 pm
Posts: 875
Location: Cuernavaca, Mexico
One of the things "I've always wanted" in PureBaisic is a way to create Help files
that show users how to use the programs I've written.

I created a 'Builder' for the programmer and a 'Viewer' for your users.

Because it has Icons, etc. I've zipped it all together, and placed it in my DropBox account:

NOTE: Windows only at the moment.
https://www.dropbox.com/s/pspw2iibpiwkiui/HelpSystem.zip?dl=0

Total Freeware... All EXE's, source code and images are included. :)

_________________
- It was too lonely at the top.

Current Machine: Win 10 Pro 64-bit, Dual Xeon E5-2670, 64 gigs ram, Geforce GTX 1660 Ti w/6 gigs ram


Top
 Profile  
Reply with quote  
 Post subject: Re: RTF Based Help Composer and Viewer
PostPosted: Thu Jan 17, 2019 7:35 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon May 10, 2010 4:02 pm
Posts: 153
Unpleasant effect when scrolling text:
Image
Win7 x64


Top
 Profile  
Reply with quote  
 Post subject: Re: RTF Based Help Composer and Viewer
PostPosted: Fri Jan 18, 2019 11:55 am 
Offline
Addict
Addict
User avatar

Joined: Sat Apr 26, 2003 2:15 pm
Posts: 875
Location: Cuernavaca, Mexico
:(
Works well on my system (Win 10). I spent some time looking in the Event Loop, but

I'm not familiar enough with the Win API SendMessge function to spot the differences between Win 10 and Win 7.

Perhaps an API guru could take a look at the source and spot the problem in the event loop?

_________________
- It was too lonely at the top.

Current Machine: Win 10 Pro 64-bit, Dual Xeon E5-2670, 64 gigs ram, Geforce GTX 1660 Ti w/6 gigs ram


Top
 Profile  
Reply with quote  
 Post subject: Re: RTF Based Help Composer and Viewer
PostPosted: Fri Jan 18, 2019 1:18 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat May 05, 2007 5:31 pm
Posts: 733
Location: Linz, Austria
kvitaliy wrote:
Unpleasant effect when scrolling text
Works well on my Win7... (also tested on VirtualBox, both with or without desktop composition)
What sets your Win7 apart from a vanilla installation? I recognized the sharp corners on Min/Max/Close, that do not meet the standard.


Top
 Profile  
Reply with quote  
 Post subject: Re: RTF Based Help Composer and Viewer
PostPosted: Fri Jan 18, 2019 7:49 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Nov 05, 2006 11:42 pm
Posts: 4684
Location: Lyon - France
Works very well on W10 X64, no problem scrolling :wink:
Thanks for sharing your nice software and his source 8)

_________________
ImageThe happiness is a road...
Not a destination


Top
 Profile  
Reply with quote  
 Post subject: Re: RTF Based Help Composer and Viewer
PostPosted: Sat Jan 19, 2019 12:44 pm 
Offline
PureBasic Expert
PureBasic Expert

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 10587
Location: Beyond the pale...
The editor gadget can behave very poorly I'm afraid. Bugs that have been reported in the past are still not fixed.

Your help viewer suffers with a similar problem that you can see with the following :

Code:
If OpenWindow(0, 0, 0, 400, 400, "EditorGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_SizeGadget | #PB_Window_MaximizeGadget)
  EditorGadget(0, 10, 10, 380, 380)
  For a = 0 To 30
    AddGadgetItem(0, a, "Line "+Str(a))
  Next
  Repeat
    event = WaitWindowEvent()
    Select event
      Case #PB_Event_SizeWindow
        ResizeGadget(0, #PB_Ignore, #PB_Ignore, WindowWidth(0) - 20, WindowHeight(0) - 20)
    EndSelect
  Until event = #PB_Event_CloseWindow
EndIf


Scroll down a bit in the editor gadget and then maximize the window. On my system (Win 7x64) the scrollbar has not been properly erased. Only happens if the maximised window is large enough to remove the need for a scrollbar.
You can get around this with some strategically placed HideGadget() calls, but it makes for some very flickery resizing!

If it were me, I would abandon the editor gadget in favour of either a canvas gadget or a web gadget.

_________________
I may look like a mule, but I'm not a complete ass.


Top
 Profile  
Reply with quote  
 Post subject: Re: RTF Based Help Composer and Viewer
PostPosted: Sat Jan 19, 2019 2:39 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Apr 26, 2003 2:15 pm
Posts: 875
Location: Cuernavaca, Mexico
srod wrote:
The editor gadget can behave very poorly I'm afraid.

...Scroll down a bit in the editor gadget and then maximize the window. On my system (Win 7x64) the scrollbar has not been properly erased. Only happens if the maximised window is large enough to remove the need for a scrollbar.


Thanks for the info srod.

I tried your sample and my Win 10 system behaved like it should (unlike Fangbeast in a flock of sheep) :mrgreen:

But I will keep your suggestions in mind.

_________________
- It was too lonely at the top.

Current Machine: Win 10 Pro 64-bit, Dual Xeon E5-2670, 64 gigs ram, Geforce GTX 1660 Ti w/6 gigs ram


Top
 Profile  
Reply with quote  
 Post subject: Re: RTF Based Help Composer and Viewer
PostPosted: Sat Jan 19, 2019 3:00 pm 
Offline
PureBasic Expert
PureBasic Expert

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 10587
Location: Beyond the pale...
blueb wrote:
I tried your sample and my Win 10 system behaved like it should (unlike Fangbeast in a flock of sheep) :mrgreen


Any kind of flock or herd really. He just can't help himself I'm afraid... though not as afraid as any flock of sheep should be who happened to be wandering by his neighbourhood!

_________________
I may look like a mule, but I'm not a complete ass.


Top
 Profile  
Reply with quote  
 Post subject: Re: RTF Based Help Composer and Viewer
PostPosted: Sat Jan 19, 2019 3:01 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Apr 26, 2003 2:15 pm
Posts: 875
Location: Cuernavaca, Mexico
:mrgreen:

_________________
- It was too lonely at the top.

Current Machine: Win 10 Pro 64-bit, Dual Xeon E5-2670, 64 gigs ram, Geforce GTX 1660 Ti w/6 gigs ram


Top
 Profile  
Reply with quote  
 Post subject: Re: RTF Based Help Composer and Viewer
PostPosted: Sat Jan 19, 2019 3:35 pm 
Offline
PureBasic Expert
PureBasic Expert

Joined: Sun Apr 12, 2009 6:27 am
Posts: 3612
Hi blueb
- Avoiding what srod mentioned
- Eliminate flickering
Code:
Procedure SizeCB(windowID, Message, wParam, lParam)
     Define *SizeTracking.MINMAXINFO
     
     If Message = #WM_GETMINMAXINFO       ; To limit the smallest dimension
          *SizeTracking = lParam
          *SizeTracking\ptMinTrackSize\x = 750
          *SizeTracking\ptMinTrackSize\y = 550
          *SizeTracking\ptMaxTrackSize\x = GetSystemMetrics_(#SM_CXSCREEN)
          *SizeTracking\ptMaxTrackSize\y = GetSystemMetrics_(#SM_CYSCREEN)
          ResizeGadget(#RichEdit, 270, 40, WindowWidth(#MainWindow)-280, WindowHeight(#MainWindow)-85)
          ResizeGadget(#ListGadget, 10, 40, 250, WindowHeight(#MainWindow)-85)
     ElseIf Message = #WM_SIZE
          HideGadget(#RichEdit,1)
          Protected p.POINT
          SendMessage_(GadgetID(#RichEdit), #EM_SETSCROLLPOS, 0, @p)
          ResizeGadget(#RichEdit, 270, 40, WindowWidth(#MainWindow)-280, WindowHeight(#MainWindow)-85)
          ResizeGadget(#ListGadget, 10, 40, 250, WindowHeight(#MainWindow)-85)         
          HideGadget(#RichEdit,0)
     ElseIf Message = #WM_ENTERSIZEMOVE
          SendMessage_(GadgetID(#RichEdit),#WM_SETREDRAW,0,0)
     ElseIf Message = #WM_EXITSIZEMOVE
          SendMessage_(GadgetID(#RichEdit),#WM_SETREDRAW,1,0)
          ;RedrawWindow_(GadgetID(#RichEdit), 0, 0, #RDW_ERASE | #RDW_FRAME | #RDW_INVALIDATE | #RDW_ALLCHILDREN)         
     EndIf     
     
     ProcedureReturn #PB_ProcessPureBasicEvents
EndProcedure


_________________
Egypt my love


Top
 Profile  
Reply with quote  
 Post subject: Re: RTF Based Help Composer and Viewer
PostPosted: Sat Jan 19, 2019 3:59 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Apr 26, 2003 2:15 pm
Posts: 875
Location: Cuernavaca, Mexico
RASHAD wrote:
Hi blueb
- Avoiding what srod mentioned
- Eliminate flickering


I tried your changes on my Win 10 system with no visible differences that I could tell.

So I made the changes to the source, rezipped the files to my DropBox account. (use first post)

I would appreciate Win 7 Users retrying the program.

Thanks Rashad... much appreciated. :D

_________________
- It was too lonely at the top.

Current Machine: Win 10 Pro 64-bit, Dual Xeon E5-2670, 64 gigs ram, Geforce GTX 1660 Ti w/6 gigs ram


Top
 Profile  
Reply with quote  
 Post subject: Re: RTF Based Help Composer and Viewer
PostPosted: Sat Jan 19, 2019 7:49 pm 
Offline
PureBasic Expert
PureBasic Expert

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 10587
Location: Beyond the pale...
Yep, Rashad's workaround works fine here and eliminates the problems I saw with Win 7.

_________________
I may look like a mule, but I'm not a complete ass.


Top
 Profile  
Reply with quote  
 Post subject: Re: RTF Based Help Composer and Viewer
PostPosted: Sun Jan 20, 2019 6:39 am 
Offline
PureBasic Protozoa
PureBasic Protozoa
User avatar

Joined: Fri Apr 25, 2003 3:08 pm
Posts: 4552
Location: Not Sydney!!! (Bad water, no goats)
Quote:
I tried your sample and my Win 10 system behaved like it should (unlike Fangbeast in a flock of sheep) :mrgreen:


You utter, umitigated, conscienceless bastard!!! I just saw this post!!

If it hadn't been for the fact that they were wearing srod's unwashed, steaming, fetid, rancid underpants, I would have have stayed true to form and gone with goats but well, I thought they were goats!!

I know you stole Idle's sheep and put srods shameful underpants on them to trick me, I just know it!

Oh, the humiliation, I will be known as a closet sheep shagger in the forums now (My goat mayleen will never forgive me!! Sob, sob, sob)

_________________
Amateur Radio, D-STAR/VK3HAF


Top
 Profile  
Reply with quote  
 Post subject: Re: RTF Based Help Composer and Viewer
PostPosted: Fri Jan 25, 2019 4:14 pm 
Offline
Enthusiast
Enthusiast

Joined: Fri Jan 07, 2005 7:17 pm
Posts: 119
RTF Based Help Composer and Viewer - it is interesting idea. However, the program does not behave properly. I'm using Windows XP. If I move the program window out of the screen area of the monitor the EditorGadget window is decreasing - only re-clicking the window restores the proper size. Please check if the program behaves the same in other versions of Windows. Here is an illustration of the problem.
http://www.lokus.com.pl/pr1.jpg
http://www.lokus.com.pl/pr2.jpg


Top
 Profile  
Reply with quote  
 Post subject: Re: RTF Based Help Composer and Viewer
PostPosted: Fri Jan 25, 2019 4:25 pm 
Offline
PureBasic Expert
PureBasic Expert

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 10587
Location: Beyond the pale...
That doesn't happen on my Win 7 system. However, the entire contents of the editor gadget sometimes disappears!

_________________
I may look like a mule, but I'm not a complete ass.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye