RotateView suppress messagebox
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
-
- User
- Posts: 49
- Joined: Tue Dec 28, 2004 9:49 am
RotateView suppress messagebox
Hello,
I want to rotate the view of the opened pdf-document (pdf_ax) with commands 33079 rotateCCW/33078 rotateCW.
Is it possible to suppress the messagebox "Note: this function will rotate pages for this work-session only....".
I've tried PXCVA_Flags.PXCVA_NoUI and PXCVA_Flags.PXCVA_None in doVerb and also in openDocument, but this doesn't work.
Is there another way to do this?
Greetings
Hans-Peter
I want to rotate the view of the opened pdf-document (pdf_ax) with commands 33079 rotateCCW/33078 rotateCW.
Is it possible to suppress the messagebox "Note: this function will rotate pages for this work-session only....".
I've tried PXCVA_Flags.PXCVA_NoUI and PXCVA_Flags.PXCVA_None in doVerb and also in openDocument, but this doesn't work.
Is there another way to do this?
Greetings
Hans-Peter
- Tracker Supp-Stefan
- Site Admin
- Posts: 17948
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: RotateView suppress messagebox
Hi Hans Peter,
You will need to handle a PXCVA_OnDisplayPrompt prompt event, and the event name is:
Prompts.RotatePagesViewWarn
In pseudocode it could look like:
You will need to handle a PXCVA_OnDisplayPrompt prompt event, and the event name is:
Prompts.RotatePagesViewWarn
In pseudocode it could look like:
Code: Select all
...
function OnEvent(Type, Name, DataIn, DataOut, Flags)
{
...
if (Type == PXCVA_OnDisplayPrompt)
{
if (Name == "Prompts.RotatePagesViewWarn")
{
// skip original dialog display
SetProperty("Prompts.RotatePagesViewWarn.UserChoice",
DataIn("OK"), 0);
...
}
}
...
}
...
-
- User
- Posts: 49
- Joined: Tue Dec 28, 2004 9:49 am
Re: RotateView suppress messagebox
Hi Stefan,
this is a really quick reply
Thank you very much.
Ok, I'll try this way.
Greetings
Hans-Peter
this is a really quick reply
Thank you very much.
Ok, I'll try this way.
Greetings
Hans-Peter
- Tracker Supp-Stefan
- Site Admin
- Posts: 17948
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
-
- User
- Posts: 49
- Joined: Tue Dec 28, 2004 9:49 am
Re: RotateView suppress messagebox
Hi Stefan,
I've tried it, but it does not work?
There is no eventtype "PXCVA_OnDisplayPrompt" send if I catch and print the events.
Example after sending 33078 / RotateCW:
Private Sub AxCoPDFXCview1_OnEvent(ByVal sender As System.Object, ByVal e As AxPDFXCviewAxLib._IPDFXCviewEvents_OnEventEvent) Handles AxCoPDFXCview1.OnEvent
Debug.Print("Eventtype: " & e.type.ToString & ", Eventname: " & e.name)
If e.type = PDFXCviewAxLib.PXCVA_EventTypes.PXCVA_OnPropertyChanged Then
OnPropertyChanged(e.name)
End If
End Sub
Debug.Print of OnEvent:
Eventtype: 4, Eventname: Global::BeginModal
=> MESSAGEBOX DISPLAYS HERE => after closing see below.
Eventtype: 4, Eventname: Global::EndModal
Eventtype: 1, Eventname: Documents[#4095].Pages.DisplayRotation
...
I've tried it, but it does not work?
There is no eventtype "PXCVA_OnDisplayPrompt" send if I catch and print the events.
Example after sending 33078 / RotateCW:
Private Sub AxCoPDFXCview1_OnEvent(ByVal sender As System.Object, ByVal e As AxPDFXCviewAxLib._IPDFXCviewEvents_OnEventEvent) Handles AxCoPDFXCview1.OnEvent
Debug.Print("Eventtype: " & e.type.ToString & ", Eventname: " & e.name)
If e.type = PDFXCviewAxLib.PXCVA_EventTypes.PXCVA_OnPropertyChanged Then
OnPropertyChanged(e.name)
End If
End Sub
Debug.Print of OnEvent:
Eventtype: 4, Eventname: Global::BeginModal
=> MESSAGEBOX DISPLAYS HERE => after closing see below.
Eventtype: 4, Eventname: Global::EndModal
Eventtype: 1, Eventname: Documents[#4095].Pages.DisplayRotation
...
- Tracker Supp-Stefan
- Site Admin
- Posts: 17948
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: RotateView suppress messagebox
Hi Hans-Peter,
Hmm - there is a prompt so this event should be fired, but I also had some problems when testing here on my end.
However setting directly in the code of the C# full demo (without waiting for an event first) properly suppresses the notification from appearing. So please just set that directly after initializing the control and all should be well.
Regards,
Stefan
Hmm - there is a prompt so this event should be fired, but I also had some problems when testing here on my end.
However setting
Code: Select all
axCoPDFXCview1.SetProperty("Prompts.RotatePagesViewWarn", "false", 0);
Regards,
Stefan
-
- User
- Posts: 49
- Joined: Tue Dec 28, 2004 9:49 am
Re: RotateView suppress messagebox
Hello Stefan,
this solves my problem.
this solves my problem.
- Tracker Supp-Stefan
- Site Admin
- Posts: 17948
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: RotateView suppress messagebox
Glad to assist Hans-Peter!
Cheers,
Stefan
Cheers,
Stefan