Search:

Type: Posts; User: .paul.

Page 1 of 13 1 2 3 4

Search: Search took 0.11 seconds.

  1. Re: Print to printer without dialog and print preview

    Try this...


    Private Sub PrintPage(ByVal sender As Object, ByVal ev As PrintPageEventArgs)
    Dim pageImage As New Metafile(m_streams(m_currentPageIndex))

    ' Adjust rectangular area with...
  2. Re: [RESOLVED] What is the event for double click the windows caption bar?

    You are aware there's a PrintPreviewDialog in VB? Is that what you're trying to restrict?
  3. Re: Print to printer without dialog and print preview

    On which line?
  4. Re: Print to printer without dialog and print preview

    Or you could do it without a loop, as I showed you in post #18
  5. Replies
    9
    Views
    255

    Re: Getting a Label control's text to update

    I agree…’
  6. Re: [RESOLVED] What is the event for double click the windows caption bar?

    You need to set the appropriate Properties
    If you don't want the user to be able maximize, set the MaximiseBox to False
    If you don't want to allow resizable (except Minimize to Taskbar), set your...
  7. Re: Text Box cursor not active and sent Text Box Data

    Before the scan, use...


    TextBox1.Select
  8. Re: [RESOLVED] What is the event for double click the windows caption bar?

    You could just set your window’s minimumsize and maximumsize or formborderstyle and maximizebox if you don’t want it resizable…
  9. Re: Print to printer without dialog and print preview

    Private Sub Print()
    If m_streams Is Nothing OrElse m_streams.Count = 0 Then
    Throw New Exception("Error: no stream to print.")
    End If
    AddHandler printdoc.PrintPage, AddressOf...
  10. Re: Print to printer without dialog and print preview

    No. See my code in post #14
    It’s more complicated as your printing spans over more than one page. You can print more copies by setting your page range counter back to 0 and then setting hasmorepages...
  11. Re: Print to printer without dialog and print preview

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    PrintDocument1.PrinterSettings.Copies = 2
    PrintDocument1.Print
    End Sub
    ...
  12. Re: Print to printer without dialog and print preview

    Can you show me your PrintPage code? You need to implement a loop to print your number of copies... You'd set PrinterSettings.Copies = 2, then run PrintPage twice.

    Edit: or any number in...
  13. Replies
    3
    Views
    188

    Re: Getting a directory listing

    I found this…

    https://stackoverflow.com/questions/1485155/check-if-a-file-is-real-or-a-symbolic-link
  14. Replies
    3
    Views
    188

    Re: Getting a directory listing

    This might help...

    https://www.w3computing.com/vb2008/driveinfo-directoryinfo-fileinfo-classes/
  15. Re: GetSystemMetricsForDpi alternative

    You could use the SystemInformation Class...

    SystemInformation.VerticalScrollBarWidth
  16. Re: How to draw a simple border lines around ListBox

    If you just want to draw a border, I wouldn’t be extending the ListBox. Google ControlPaint.DrawBorder. You’d draw the border in the parent Form’s Paint EventHandler…
  17. Re: Print to printer without dialog and print preview

    Ok. This page from Microsoft explains how…

    https://docs.microsoft.com/en-us/previous-versions/ms252091(v=vs.140)?redirectedfrom=MSDN
  18. VS 2019 Re: Printing DataGridView Cell BackGround Color

    'original line and could be the place to ammend the code to print colour cells
    if oCell.Value.ToString = "something" Then
    e.Graphics.FillRectangle 'etc paint a color
    ElseIf...
  19. VS 2019 Re: Printing DataGridView Cell BackGround Color

    To query it, show me the code where you print the cell value. Not a huge block of code, just a line or two
  20. VS 2019 Re: Printing DataGridView Cell BackGround Color

    Easiest way is to print backcolors for all cells (of type DataGridViewTextBoxCell) without querying anything. The plain white cells will appear the same on the printed page, and it'll print your...
  21. Re: Print to printer without dialog and print preview

    Try this...


    With PrintPreview114.ReportViewer114
    .PrinterSettings.PrinterName = "\\GVL02\114 Label Printer (Assembly)" 'Intermec Printer PM4i
    temstr = .PrinterSettings.PrinterName
    ...
  22. VS 2019 Re: Printing DataGridView Cell BackGround Color

    Assuming you want What You See Is What You Get printing, something like this…
    I know this is the columnheader code, but the cell, uses similar code.


    e.Graphics.FillRectangle(New SolidBrush(your...
  23. VS 2019 Re: Printing DataGridView Cell BackGround Color

    The DataGridViewCell has a Style.BackColor property
  24. Re: Print to printer without dialog and print preview

    So there is no Print command instead of PrintPreview114.Show?
  25. Re: Print to printer without dialog and print preview

    With PrintPreview114??? Ok I get it now. What other properties does Your reportviewer have?
  26. Re: Print to printer without dialog and print preview

    You need to show the code that opens the PrintPreviewDialog. It’s probably a simple fix…
  27. Replies
    6
    Views
    276

    VS 2022 Re: Display Date and time on a form VS 2022

    You wouldn’t put the code in TextBox1_TextChanged… Use your Form1_Load event handler, for a static date and time. If you want the time to update in real time, use a Timer…


    Public Class Form1
    ...
  28. VS 2015 Re: Sending form behind desktop icons

    A Form that is completely translucent, allowing click-thru, but also visible? That’s not so easy… :D
  29. VS 2015 Re: Sending form behind desktop icons

    I’ve done something like this before with the SetParent API using the desktop Handle - which is 0


    Declare Function SetParent Lib "user32" (ByVal hWndChild As IntPtr, ByVal hWndNewParent As...
  30. VS 2022 Re: Bank customer programme (Windows forms .NET)

    g/
    See how to use an openfiledialog... http://www.scproject.biz/Using%20Dialogs.php
    For entering real decimal numbers, use a NumericUpDown control instead of a TextBox. For Account numbers that...
  31. Replies
    6
    Views
    327

    VS 2017 Re: I want to simplify this text editor

    For the first, remove the lines = part from the start of the line
    For the second error, replace…

    TextBox4.Text + " | " + (x + (1 + Previous)) + " | " + titles(x)

    With…

    TextBox4.Text & " | "...
  32. Replies
    6
    Views
    327

    VS 2017 Re: I want to simplify this text editor

    To work with a subset of titles…

    Dim subset() As String = titles.Where(Function(t) t.StartsWith(“show name”).ToArray
  33. Replies
    6
    Views
    327

    VS 2017 Re: I want to simplify this text editor

    This is how you can write the first Button's code more efficiently. The second does something different...


    Dim lines As List(Of String) =...
  34. Re: Sending Whatsapp Group Message with Button through Visual Basic Code

    Why ask a Python question in a VB.Net forum?
  35. Replies
    4
    Views
    389

    Re: Single quotes make my code hover

    Try escaping the apostrophe...


    dim variable as string = "En tant qu\'invité"

    Or...


    dim variable as string = "En tant qu\\'invité"
  36. VS 2022 Re: Getting error message when using SendKeys.Send("{PAUSE}")

    You do know sendkeys will only send keys to the active window? If you’re attempting to send keys to two apps, you’d have to switch focus between the apps. Google AppActivate
  37. VS 2022 Re: Getting error message when using SendKeys.Send("{PAUSE}")

    I don’t think it will work… but. Try…


    Sendkeys.Send(Chr(30))
  38. VS 2022 Re: Getting error message when using SendKeys.Send("{PAUSE}")

    Have a look at this…

    https://stackoverflow.com/questions/35124282/how-to-use-sendkeys-as-pause-break
  39. Re: Tools or methods for "converting C# code into VB.Net code"

    That's the reason i use the (Tangible Software) Instant C# tool. My VB is much stronger than my C# abilities, and the converter does a fairly accurate job usually.
  40. Re: Unlocking a picture file after loading it

    Try this...


    Dim ImageCount As Integer
    Public fileEntries As String()
    Public filepath As String = "J:/"
    Dim sPictures As New List(Of Bitmap)
    Dim extensions As String =...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width