Results 1 to 6 of 6

Thread: How to pass PaperSize and Print Landscape to a vb function?

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2006
    Posts
    4

    How to pass PaperSize and Print Landscape to a vb function?

    Dear All:
    I am new in here and just start programming and have faced this hard problem and wish everyone kindly help me

    I am currently using c writing a program to generate a report , and the report is compile to exe. Within the exe there is a vbprinring fuction has called.
    Something like :
    .
    .
    font(font_size,font_type);
    return (abc_vbprinting(Font Size,Font Type));
    .
    .
    The vb_printing is a procedure called a vb function to print. Actually it only accept the font size and font type. I am trying very hard to
    add 2 more parameter, papersize =A4 and Orientation = Landscape.

    Is there anyway, or any methods can simply do it??
    Thanks for your help guys since I was stuck in this problem for almost a week >_<

    From
    Erwin, a programmer newbie

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,692

    Re: How to pass PaperSize and Print Landscape to a vb function?

    You want to add parameters to a VB function? The function looks something like this?
    VB Code:
    1. Private Function VB_Function(FontSize As Integer, FontType As Font) As Boolean
    2. ...
    3. End Function

    Just add the parameters to the declaration, and write the code to handle them:
    VB Code:
    1. Private Function VB_Function(FontSize As Integer, FontType As Font, PaperSize As PaperSizeType, Orientation As Boolean) As Boolean

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2006
    Posts
    4

    Re: How to pass PaperSize and Print Landscape to a vb function?

    Dear AL42:
    Thanks for your help
    Unfortunately I am abit curious because I am using a C program to call this vb function, is that mean your vb code has to put in the my vbprinting function? So need to to pass any parameter to the vbprinting function by c(shown below )

    return abc_vbprinting(reportID[1], FONT_SIZE,FONT_TYPE,??);

    May I add something like PaperSize =A4 to ?? above?

    Thank you for your sincerely help

    From Erwin

  4. #4

    Thread Starter
    New Member
    Join Date
    Apr 2006
    Posts
    4

    Re: How to pass PaperSize and Print Landscape to a vb function?

    I have to make it a bit clear

    I have a library using vb program for printin.
    And I am using a c programmin language to call this vb program to print.
    The vb function called abc_vbprinting()

    Once I called I may pass parameter to abc_vbprinting()
    something like abc_vbprinting(reportid, font_size, font_type);

    Is there any simplest way just pass a parameter to this vbprinting program so can set the paper size to A4 and orient to landscape?

    Thanks

  5. #5
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926

    Re: How to pass PaperSize and Print Landscape to a vb function?

    Not without changing the function.
    Frans

  6. #6

    Thread Starter
    New Member
    Join Date
    Apr 2006
    Posts
    4

    Re: How to pass PaperSize and Print Landscape to a vb function?

    RRR.....

    Is that mean I have to change the my vbprinting function ?

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width