Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
K

kedarrkulkarni

@kedarrkulkarni
About
Posts
11
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to validate user using Active directory
    K kedarrkulkarni

    I m trying to create an application which takes login-Name of user on his computer (which is active directory login). using following syntax

        Dim userAPAC As String
        userAPAC = Request.ServerVariables("LOGON\_USER").Trim()
    

    I dont have admin username and password of Active directory, neither i want to validate user (i dont want to provide password but only username). can i pass only username to DirectoryEntry() class and get information about that user? Thanx !

    ASP.NET windows-admin tutorial question

  • How to use single MDI Child Form for all Crystal reports
    K kedarrkulkarni

    Hello all, I have MDI Application in which i am displaying crystal reports. For that i have created a mdi child form. in which ReportViewer control is used to display reports. Now in my app, there would be many reports. so, do i need to create that many chile mdi forms and add reportviewer in all these forms? or else can i use single form and reportviewer to disaply all forms? and if yes.... how? because it is MDI application, it wont allow me to open multiple instances of single form. but, user may want to view multiple reports without closing other. any idea? Thanx.......!

    Visual Basic tutorial question

  • How to add New row datagridview with checkboxcell in all columns
    K kedarrkulkarni

    Hello all, I want to add a row in datagridview at zeroth index. its not difficult.... i know but this new row should have all cells as checkbox. and datagridview is databound. so, my grid will have checkbox row at first line and rest of the line as textboxcells... is there any way to do it? Thanx !

    Visual Basic css database json tutorial question

  • Printing text file in vb.net - Formatting issue
    K kedarrkulkarni

    how can i mention the width of space betwwen the two characters while drawstring() Any idea? Thanx for reply... Cheers !

    Visual Basic graphics help csharp sales

  • Printing text file in vb.net - Formatting issue
    K kedarrkulkarni

    yes dave. but can i use proportial spaced font and still make them cover fixed sized width. may be by adjusting the width of whole string? any idea?

    Visual Basic graphics help csharp sales

  • Printing text file in vb.net - Formatting issue
    K kedarrkulkarni

    I ressolved the issue..... For anyone who are intrested... When u try to print the file in vb.net with preceding space characters, then in print u dont get same number of spaces(actually number of spaces are same but width of total space gets reduced) To overcome this problem, u have to use font like "Courier New" which having same width for all characters. as ,

    Private printFont As Font
    printFont = New Font("Courier New", 10)

    e.Graphics.DrawString(line, printFont, Brushes.Black, leftMargin, _
    yPos, sFormat)

    The scenario is when positioning of printed string on paper does matter a lot.. Cheers !

    Visual Basic graphics help csharp sales

  • Printing text file in vb.net - Formatting issue
    K kedarrkulkarni

    Right thomas.. forum is not able to format the space at starting of line. so i have replaced space with underscore. so, consider underscores as spaces then u can see the diffrence between original file and printed version. the number of spaces in print is less than that of original. here note that, when i print file in notepad directly its giving proper print. but same file when i print through application, its minimizing the number of spaces that makes me beleive that its formatting or page setting issue in application. Any Help ?

    Visual Basic graphics help csharp sales

  • Printing text file in vb.net - Formatting issue
    K kedarrkulkarni

    Sorry folks.... Originas file is like /********* File Starts Here *************************** ____________________________________________________9/22/2008 _______________Name of the customer and details ________________________________________________________10010 /********* File Ends Here *************************** and print file format is /********* File Starts Here *************************** _____________________________________9/22/2008 _______________Name of the customer and details __________________________________________10010 /********* File Ends Here ***************************

    Visual Basic graphics help csharp sales

  • Printing text file in vb.net - Formatting issue
    K kedarrkulkarni

    Hi, i create a text file in my code and i want to print the now. origianl file looks like /********* File Starts Here *************************** 9/22/2008 Name of the customer and details 10010 /********* File Ends Here *************************** But when i print this file in my project using following code...

    Dim pd As New PrintDocument
    Dim ps As new PageSettings
    ps.Landscape = False
    ps.Margins.Top = 0.116
    ps.Margins.Bottom = 0.116
    ps.Margins.Left = 0.116
    ps.Margins.Right = 0.116
    ps.PaperSize = New System.Drawing.Printing.PaperSize("A4", 210, 297)
    pd.DefaultPageSettings = ps

                        AddHandler pd.PrintPage, AddressOf pd\_PrintPage
    

    and using drawstring function of Graphics as ,

    e.Graphics.DrawString(line, printFont, Brushes.Black, leftMargin, _
    yPos, New StringFormat)

    the resulting printout looks like... /********* File Starts Here *************************** 9/22/2008 Name of the customer and details 10010 /********* File Ends Here *************************** problem is the first line gets overlapped with second one. i.e date is overlapping "Name of the customer and details" line. which is not actual case. (so, whole formatting of file is getting lost when i m printing in project but manual file print works fine). where i am missing something. or is it something to do with saize of paper?

    Visual Basic graphics help csharp sales

  • How to Hide URL which is showing Top of the window when opening new window.
    K kedarrkulkarni

    We always think of its better if user can not see the url of some pages. but trust me there are n ways to see(or find) the url of page. so, why try to hide it. if its not accessible to others(make it secure) If u still want to hide it, u can achive this as... 1)u can open div as popup and make it appear like window (with styling) but popup blocker will stop u r div from popping up 2)use iframe inside child window and set url for that iframe directly(u may pass querystring to that child window in session variable) 3) If u want to hide querystring values the u can encrypt querystring.

    ASP.NET help javascript tutorial

  • How to show Text File in PrintPreviewDialog in vb.net (WinForm)
    K kedarrkulkarni

    Hello all, I was trying to print the text file in vb.net (winform) After googling i got this code... Let me explain in detail... I Create a file at runtime based on user request. user can print that file after viewing it. I want to show that file in PrintPreviewDialog and if user chooses to print then it can be. The PrintPage event i m using is as

    Dim pd As New PrintDocument

    AddHandler pd.PrintPage, AddressOf pd_PrintPage

    'Event for printpage
    Private Sub pd_PrintPage(ByVal sender As Object, ByVal e As PrintPageEventArgs)
    Dim yPos As Single = 0
    Dim count As Integer = 0
    Dim leftMargin As Single = 0
    Dim topMargin As Single = 0
    Dim line As String = Nothing

        linesPerPage = e.MarginBounds.Height / printFont.GetHeight(e.Graphics)
        ' Iterate over the file, printing each line.
        While count < linesPerPage + 9  ' manipulate the pagelength according to your interest
    
            line = streamToPrint.ReadLine()
            If line Is Nothing Then
                Exit While
            End If
            yPos = topMargin + count \* printFont.GetHeight(e.Graphics)
            e.Graphics.DrawString(line, printFont, Brushes.Black, leftMargin, \_
                yPos, New StringFormat)
            count += 1
        End While
        Pgnum = Pgnum + 1
    
        If Not (line Is Nothing) Then
            e.HasMorePages = True
            count = count + 1
            yPos = topMargin + count \* printFont.GetHeight(e.Graphics)
            e.Graphics.DrawString("Page:" + CStr(Pgnum), printFont, Brushes.Black, leftMargin + 700, \_
                            yPos, New StringFormat)
        Else
            e.HasMorePages = False
            count = count + 1
            yPos = topMargin + count \* printFont.GetHeight(e.Graphics)
            e.Graphics.DrawString("Page:" + CStr(Pgnum), printFont, Brushes.Black, leftMargin + 700, \_
                            yPos, New StringFormat)
        End If
    End Sub
    

    But i m not sure where i should add this code to show document in oreview

    PrintPreviewDialog1.Document = pd
    PrintPreviewDialog1.ShowDialog()

    am i missing something. or completely wrong? Thanks.........! ___________________________________________ .Net Developer

    Visual Basic csharp graphics tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups