logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Post a reply
From:
Message:

Maximum number of characters in each post is: 32767
Bold Italic Underline   Highlight Quote Choose Language for Syntax Highlighting Insert Image Insert an existing Attachment or upload a new File... Create Link   Unordered List Ordered List   Left Justify Center Justify Right Justify   Outdent Indent   More BBCode Tags
Font Color Font Size
Security Image:
Enter The Letters From The Security Image:
  Preview Post Cancel

Last 10 Posts (In reverse order)
fmotsch Posted: Tuesday, March 6, 2018 2:23:14 AM(UTC)
 
Perfect thanks !!!! :)
Paul Rayman Posted: Monday, March 5, 2018 8:57:57 PM(UTC)
 
Hi,

You should provide an instance of your pdfViewer to static method (as well as all other non-static objects).

Code:

public static void zoomRecherche(List<Point> coordSearched, int iSearch, PdfViewer myViewer)
{
    myViewer.Zoom = 1.5f;
    myViewer.ScrollToPoint(myViewer.CurrentIndex, coordSearched[iSearch]);
}


Now you can call your method

Code:

YourClass.zoomRecherche(coordSearched, iSearch, this.pdfViewer);
fmotsch Posted: Monday, March 5, 2018 5:28:49 AM(UTC)
 
Hi,

I'm trying to get this function in static but it doesn't seems to be the solution:

Code:
 private void zoomRecherche(List<Point> coordSearched, int iSearch)
        {

            this.pdfViewer.Zoom = 1.5f;
            pdfViewer.ScrollToPoint(pdfToolBarPages.PdfViewer.CurrentIndex, coordSearched[iSearch]);
            //pdfViewer.CurrentIndex = pdfToolBarPages.PdfViewer.CurrentIndex;
			//pdfViewer.ScrollToPage(pdfToolBarPages.PdfViewer.CurrentIndex);
			//pdfViewer.ScrollToChar(coordSearched[1]);
            
                  
        }



But when i put public void zoomRecherche(List<Point> coordSearched, int iSearch), and delete the first this
i get errors messages with pdfViewer and pdfToolBarPages (which depend on pdfViewer).
How can i do to use this function on an other form?

Thanx.