OberonPlace.com Forums

OberonPlace.com Forums (http://forum.oberonplace.com/index.php)
-   Macros/Add-ons (http://forum.oberonplace.com/forumdisplay.php?f=21)
-   -   Watermarks (http://forum.oberonplace.com/showthread.php?t=9615)

grzjanik 02-10-2012 01:35


Do you know how to display a watermark in the script.

For example, if the action is great script that appears for 3 seconds, the message "Script author: John Wayne. Call 31 000 00 00"
or maybe some form with this info?

How do I show and then automatically hide the string after 3 seconds?

Thanks for your help.

PS I need a code for the Corel 12 version.

shelbym 02-10-2012 01:40

How do you want the message to display? Is it a dialog, or just a text label on the dialog of your macro?


grzjanik 02-10-2012 01:43

Only text label. Info about author and phone number.

Thx for reply. :)

Something like this:


grzjanik 02-10-2012 05:14

or small form like this:

Can you help me? :)


grzjanik 04-10-2012 15:31

This can be a useful tool tip or other temporary information.
I just do not know what will be the code when an object appears and disappears after 3 seconds.
Do you have any ideas?

runflacruiser 05-10-2012 08:43

You can save a hidden artistic text shape in the document. It can be a string with a certain number of lines.
A special character for the starting line like "**RR**"
For each info line a different character like "_&@2_" proceeded with the info needed.

Use the DocumentOpen event. Place code to look for an artistic shape that has it's first characters "**RR**". So every time a document is opened, pending you has delay load vba unchecked and the events enabled this shape will be found and used.

If it finds this string in a document it will take the .Text.Story.Characters.All string and parse it for the needed info. Then simply place in a MsgBox.

You can also create a tiny macro that makes and places the hidden shape on a non visible layer. A simple form with text field and a command button.

Or, Maybe you can use document properties for the info storage instead.

grzjanik 08-10-2012 15:45

Thank you John for your reply.

I meant more for advice on how to show some information and after 2 seconds to automatically be removed.
Something just like this:

Sub Info()
ActiveDocument.Unit = cdrMillimeter
ActiveDocument.ReferencePoint = cdrCenter
On Error Resume Next
Dim si As Shape, x As Double, y As Double, txt As Shape, x1 As Double, y1 As Double

'How display this object in center screen not page?

x = ActivePage.SizeWidth / 2 - 50
y = ActivePage.SizeHeight / 2 - 30
Set si = ActiveLayer.CreateRectangle2(x, y, 100, 60)
si.Fill.ApplyUniformFill CreateCMYKColor(0, 0, 0, 100)
si.Outline.SetProperties 0#
si.Transparency.ApplyUniformTransparency (30)
    With si.Next.Transparency
    .AppliedTo = cdrApplyToFillAndOutline
    .MergeMode = cdrMergeMultiply
    End With
x1 = si.SizeWidth / 2
y1 = si.SizeHeight / 2
Set txt = ActivePage.ActiveLayer.CreateArtisticText(x, y, "This is" & vbCr & "very important" & vbCr & "information" & vbCr & "for user.", , , "Arial", 24)
txt.Text.Story.Alignment = cdrCenterAlignment
txt.AlignToPageCenter (cdrAlignHCenter)
txt.AlignToPageCenter (cdrAlignVCenter)
txt.Fill.ApplyUniformFill CreateCMYKColor(0, 0, 0, 0)
txt.Transparency.ApplyUniformTransparency (30)
    With txt.Next.Transparency
    .AppliedTo = cdrApplyToFillAndOutline
    .MergeMode = cdrMergeMultiply
    End With

'How using Timer function in Corel 12 for countdown ex. 2 seconds?
'After this 2 seconds info be deleted.

End Sub



runflacruiser 09-10-2012 18:45

I would use a simple delay function like this.


Function Wait(sngWaitMax As Single) As Boolean
    Dim sngStartTime As Single
    sngStartTime = Timer
    Do While (Timer - sngStartTime) < sngWaitMax
End Function

You can make a small modeless form appear with all info, and then the form will close after a few seconds.


grzjanik 11-10-2012 01:39


Thanks John.

This is what I needed.
You can pausing the other scripts. Good job.

This is what I had in mind but he did not know how to write. :(
Yet I'm still learning. :)
Thank you for your lesson about functions.

Thank you very much.
Best regards.


runflacruiser 11-10-2012 08:08


Originally Posted by grzjanik (Post 22626)

Thanks John.


Hi GrzJanik.
Glad it helped! Glad you liked the videos too!

All times are GMT -5. The time now is 12:36.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com