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

Watermarks
 
Hi,

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.
Regards.

PS I need a code for the Corel 12 version.

shelbym 02-10-2012 01:40

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

-Shelby

grzjanik 02-10-2012 01:43

whatermark
 
Only text label. Info about author and phone number.

Thx for reply. :)

Something like this:
http://grzjanik.ovh.org/oberon/author_demo.gif

:)

grzjanik 02-10-2012 05:14

watermark
 
or small form like this:
http://grzjanik.ovh.org/oberon/author_demo2.gif

Can you help me? :)

Regards.

grzjanik 04-10-2012 15:31

Hi.
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

Hi.
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.
~John

grzjanik 08-10-2012 15:45

Info
 
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:
Code:

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.


    'txt.Delete
    'si.Delete
End Sub

Regards.

~GrzJanik

runflacruiser 09-10-2012 18:45

HI
I would use a simple delay function like this.

Code:

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

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

~John

grzjanik 11-10-2012 01:39

Pausing...
 
Revelation!

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.

~GrzJanik

runflacruiser 11-10-2012 08:08

Quote:

Originally Posted by grzjanik (Post 22626)
Revelation!

Thanks John.

~GrzJanik


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


All times are GMT -5. The time now is 11:35.

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