473,883 Members | 1,611 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Print Preview before printing a graphic file

I am trying to print a graphic file (tif) and also use the PrintPreview
control, the PageSetup control, and the Print dialog control. The code
attached is a concatination of two examples taken out of a Microsoft book,
"Visual Basic,Net Step by Step" in Chapter 18.

All but the bottom two subroutines will open a text file, and then allow me
to use the above controls, example 1. The bottom two subroutines will print
a graphic file, example 2. I have tried many things but have not been able
to modify either the first example to accept a graphic file, or add the
various controls to the bottom example.

I am wondering if the PrintPreview, PageSetup, and PrintDialog controls have
to be used differently if the files are graphic files. Perhaps there is a
trick passing object references.

Thanks for any suggestions here.

Hamil.

'******** start of code **********
Private PrintPageSettin gs As New PageSettings()
Private StringToPrint As String
Private PrintFont As New Font("Arial", 10)

Private Sub btnOpen_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnOpen.Click
Dim FilePath As String
'Display Open dialog box and select text file
OpenFileDialog1 .Filter = "Text files (*.txt)|*.txt"
OpenFileDialog1 .ShowDialog()
'If Cancel button not selected, load FilePath variable
If OpenFileDialog1 .FileName <> "" Then
FilePath = OpenFileDialog1 .FileName
Try
'Read text file and load into RichTextBox1
Dim MyFileStream As New FileStream(File Path, FileMode.Open)
RichTextBox1.Lo adFile(MyFileSt ream, _
RichTextBoxStre amType.PlainTex t)
MyFileStream.Cl ose()
'Initialize string to print
StringToPrint = RichTextBox1.Te xt
'Enable Print button
btnPrint.Enable d = True
btnSetup.Enable d = True
btnPreview.Enab led = True
Catch ex As Exception
'display error messages if they appear
MessageBox.Show (ex.Message)
End Try
End If
End Sub

Private Sub btnPrint_Click( ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnPrint.Click
Try
'Specify current page settings
PrintDocument1. DefaultPageSett ings = PrintPageSettin gs
'Specify document for print dialog box and show
StringToPrint = RichTextBox1.Te xt
PrintDialog1.Do cument = PrintDocument1
Dim result As DialogResult = PrintDialog1.Sh owDialog()
'If click OK, print document to printer
If result = DialogResult.OK Then
PrintDocument1. Print()
End If

Catch ex As Exception
'Display error message
MessageBox.Show (ex.Message)
End Try
End Sub

Private Sub PrintDocument1_ PrintPage(ByVal sender As System.Object,
ByVal e As System.Drawing. Printing.PrintP ageEventArgs) Handles
PrintDocument1. PrintPage
Dim numChars As Integer
Dim numLines As Integer
Dim stringForPage As String
Dim strFormat As New StringFormat()
'Based on page setup, define drawable rectangle on page
Dim rectDraw As New RectangleF( _
e.MarginBounds. Left, e.MarginBounds. Top, _
e.MarginBounds. Width, e.MarginBounds. Height)
'Define area to determine how much text can fit on a page
'Make height one line shorter to ensure text doesn't clip
Dim sizeMeasure As New SizeF(e.MarginB ounds.Width, _
e.MarginBounds. Height - PrintFont.GetHe ight(e.Graphics ))

'When drawing long strings, break between words
strFormat.Trimm ing = StringTrimming. Word
'Compute how many chars and lines can fit based on sizeMeasure
e.Graphics.Meas ureString(Strin gToPrint, PrintFont, _
sizeMeasure, strFormat, numChars, numLines)
'Compute string that will fit on a page
stringForPage = StringToPrint.S ubstring(0, numChars)
'Print string on current page
e.Graphics.Draw String(stringFo rPage, PrintFont, _
Brushes.Black, rectDraw, strFormat)
'If there is more text, indicate there are more pages
If numChars < StringToPrint.L ength Then
'Substract text from string that has been printed
StringToPrint = StringToPrint.S ubstring(numCha rs)
e.HasMorePages = True
Else
e.HasMorePages = False
'All text has been printed, so restore string
StringToPrint = RichTextBox1.Te xt
End If
End Sub

Private Sub btnSetup_Click( ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnSetup.Click
Try
'Load page settings and display page setup dialog box
PageSetupDialog 1.PageSettings = PrintPageSettin gs
PageSetupDialog 1.ShowDialog()
Catch ex As Exception
'Display error message
MessageBox.Show (ex.Message)
End Try
End Sub

Private Sub btnPreview_Clic k(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnPreview.Clic k
Try
'Specify current page settings
PrintDocument1. DefaultPageSett ings = PrintPageSettin gs
'Specify document for print preview dialog box and show
StringToPrint = RichTextBox1.Te xt
PrintPreviewDia log1.Document = PrintDocument1
PrintPreviewDia log1.ShowDialog ()
Catch ex As Exception
'Display error message
MessageBox.Show (ex.Message)
End Try
End Sub

'************** *************** *************** *************** *********

'Sub for printing graphic
Private Sub PrintGraphic(By Val sender As Object, _
ByVal ev As PrintPageEventA rgs)
' Create the graphic using DrawImage
ev.Graphics.Dra wImage(Image.Fr omFile(TextBox1 .Text), _
ev.Graphics.Vis ibleClipBounds)
' Specify that this is the last page to print
ev.HasMorePages = False
End Sub

Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click

btnPrint.Enable d = True
btnSetup.Enable d = True
btnPreview.Enab led = True

Try
AddHandler PrintDocument2. PrintPage, AddressOf Me.PrintGraphic
PrintDocument2. Print() 'print graphic
Catch ex As Exception 'catch printing exception
MessageBox.Show ("Sorry--there is a problem printing", _
ex.ToString())
End Try
End Sub
End Class
Private PrintPageSettin gs As New PageSettings()
Private StringToPrint As String
Private PrintFont As New Font("Arial", 10)

Private Sub btnOpen_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnOpen.Click
Dim FilePath As String
'Display Open dialog box and select text file
OpenFileDialog1 .Filter = "Text files (*.txt)|*.txt"
OpenFileDialog1 .ShowDialog()
'If Cancel button not selected, load FilePath variable
If OpenFileDialog1 .FileName <> "" Then
FilePath = OpenFileDialog1 .FileName
Try
'Read text file and load into RichTextBox1
Dim MyFileStream As New FileStream(File Path, FileMode.Open)
RichTextBox1.Lo adFile(MyFileSt ream, _
RichTextBoxStre amType.PlainTex t)
MyFileStream.Cl ose()
'Initialize string to print
StringToPrint = RichTextBox1.Te xt
'Enable Print button
btnPrint.Enable d = True
btnSetup.Enable d = True
btnPreview.Enab led = True
Catch ex As Exception
'display error messages if they appear
MessageBox.Show (ex.Message)
End Try
End If
End Sub

Private Sub btnPrint_Click( ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnPrint.Click
Try
'Specify current page settings
PrintDocument1. DefaultPageSett ings = PrintPageSettin gs
'Specify document for print dialog box and show
StringToPrint = RichTextBox1.Te xt
PrintDialog1.Do cument = PrintDocument1
Dim result As DialogResult = PrintDialog1.Sh owDialog()
'If click OK, print document to printer
If result = DialogResult.OK Then
PrintDocument1. Print()
End If

Catch ex As Exception
'Display error message
MessageBox.Show (ex.Message)
End Try
End Sub

Private Sub PrintDocument1_ PrintPage(ByVal sender As System.Object,
ByVal e As System.Drawing. Printing.PrintP ageEventArgs) Handles
PrintDocument1. PrintPage
Dim numChars As Integer
Dim numLines As Integer
Dim stringForPage As String
Dim strFormat As New StringFormat()
'Based on page setup, define drawable rectangle on page
Dim rectDraw As New RectangleF( _
e.MarginBounds. Left, e.MarginBounds. Top, _
e.MarginBounds. Width, e.MarginBounds. Height)
'Define area to determine how much text can fit on a page
'Make height one line shorter to ensure text doesn't clip
Dim sizeMeasure As New SizeF(e.MarginB ounds.Width, _
e.MarginBounds. Height - PrintFont.GetHe ight(e.Graphics ))

'When drawing long strings, break between words
strFormat.Trimm ing = StringTrimming. Word
'Compute how many chars and lines can fit based on sizeMeasure
e.Graphics.Meas ureString(Strin gToPrint, PrintFont, _
sizeMeasure, strFormat, numChars, numLines)
'Compute string that will fit on a page
stringForPage = StringToPrint.S ubstring(0, numChars)
'Print string on current page
e.Graphics.Draw String(stringFo rPage, PrintFont, _
Brushes.Black, rectDraw, strFormat)
'If there is more text, indicate there are more pages
If numChars < StringToPrint.L ength Then
'Substract text from string that has been printed
StringToPrint = StringToPrint.S ubstring(numCha rs)
e.HasMorePages = True
Else
e.HasMorePages = False
'All text has been printed, so restore string
StringToPrint = RichTextBox1.Te xt
End If
End Sub

Private Sub btnSetup_Click( ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnSetup.Click
Try
'Load page settings and display page setup dialog box
PageSetupDialog 1.PageSettings = PrintPageSettin gs
PageSetupDialog 1.ShowDialog()
Catch ex As Exception
'Display error message
MessageBox.Show (ex.Message)
End Try
End Sub

Private Sub btnPreview_Clic k(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnPreview.Clic k
Try
'Specify current page settings
PrintDocument1. DefaultPageSett ings = PrintPageSettin gs
'Specify document for print preview dialog box and show
StringToPrint = RichTextBox1.Te xt
PrintPreviewDia log1.Document = PrintDocument1
PrintPreviewDia log1.ShowDialog ()
Catch ex As Exception
'Display error message
MessageBox.Show (ex.Message)
End Try
End Sub

'************** *************** *************** *************** *********

'Sub for printing graphic
Private Sub PrintGraphic(By Val sender As Object, _
ByVal ev As PrintPageEventA rgs)
' Create the graphic using DrawImage
ev.Graphics.Dra wImage(Image.Fr omFile(TextBox1 .Text), _
ev.Graphics.Vis ibleClipBounds)
' Specify that this is the last page to print
ev.HasMorePages = False
End Sub

Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click

btnPrint.Enable d = True
btnSetup.Enable d = True
btnPreview.Enab led = True

Try
AddHandler PrintDocument2. PrintPage, AddressOf Me.PrintGraphic
PrintDocument2. Print() 'print graphic
Catch ex As Exception 'catch printing exception
MessageBox.Show ("Sorry--there is a problem printing", _
ex.ToString())
End Try
End Sub
End Class


Nov 23 '05 #1
1 5727
Sorry guys, I figured out the problem.

hamil.

"hamil" wrote:
I am trying to print a graphic file (tif) and also use the PrintPreview
control, the PageSetup control, and the Print dialog control. The code
attached is a concatination of two examples taken out of a Microsoft book,
"Visual Basic,Net Step by Step" in Chapter 18.

All but the bottom two subroutines will open a text file, and then allow me
to use the above controls, example 1. The bottom two subroutines will print
a graphic file, example 2. I have tried many things but have not been able
to modify either the first example to accept a graphic file, or add the
various controls to the bottom example.

I am wondering if the PrintPreview, PageSetup, and PrintDialog controls have
to be used differently if the files are graphic files. Perhaps there is a
trick passing object references.

Thanks for any suggestions here.

Hamil.

'******** start of code **********
Private PrintPageSettin gs As New PageSettings()
Private StringToPrint As String
Private PrintFont As New Font("Arial", 10)

Private Sub btnOpen_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnOpen.Click
Dim FilePath As String
'Display Open dialog box and select text file
OpenFileDialog1 .Filter = "Text files (*.txt)|*.txt"
OpenFileDialog1 .ShowDialog()
'If Cancel button not selected, load FilePath variable
If OpenFileDialog1 .FileName <> "" Then
FilePath = OpenFileDialog1 .FileName
Try
'Read text file and load into RichTextBox1
Dim MyFileStream As New FileStream(File Path, FileMode.Open)
RichTextBox1.Lo adFile(MyFileSt ream, _
RichTextBoxStre amType.PlainTex t)
MyFileStream.Cl ose()
'Initialize string to print
StringToPrint = RichTextBox1.Te xt
'Enable Print button
btnPrint.Enable d = True
btnSetup.Enable d = True
btnPreview.Enab led = True
Catch ex As Exception
'display error messages if they appear
MessageBox.Show (ex.Message)
End Try
End If
End Sub

Private Sub btnPrint_Click( ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnPrint.Click
Try
'Specify current page settings
PrintDocument1. DefaultPageSett ings = PrintPageSettin gs
'Specify document for print dialog box and show
StringToPrint = RichTextBox1.Te xt
PrintDialog1.Do cument = PrintDocument1
Dim result As DialogResult = PrintDialog1.Sh owDialog()
'If click OK, print document to printer
If result = DialogResult.OK Then
PrintDocument1. Print()
End If

Catch ex As Exception
'Display error message
MessageBox.Show (ex.Message)
End Try
End Sub

Private Sub PrintDocument1_ PrintPage(ByVal sender As System.Object,
ByVal e As System.Drawing. Printing.PrintP ageEventArgs) Handles
PrintDocument1. PrintPage
Dim numChars As Integer
Dim numLines As Integer
Dim stringForPage As String
Dim strFormat As New StringFormat()
'Based on page setup, define drawable rectangle on page
Dim rectDraw As New RectangleF( _
e.MarginBounds. Left, e.MarginBounds. Top, _
e.MarginBounds. Width, e.MarginBounds. Height)
'Define area to determine how much text can fit on a page
'Make height one line shorter to ensure text doesn't clip
Dim sizeMeasure As New SizeF(e.MarginB ounds.Width, _
e.MarginBounds. Height - PrintFont.GetHe ight(e.Graphics ))

'When drawing long strings, break between words
strFormat.Trimm ing = StringTrimming. Word
'Compute how many chars and lines can fit based on sizeMeasure
e.Graphics.Meas ureString(Strin gToPrint, PrintFont, _
sizeMeasure, strFormat, numChars, numLines)
'Compute string that will fit on a page
stringForPage = StringToPrint.S ubstring(0, numChars)
'Print string on current page
e.Graphics.Draw String(stringFo rPage, PrintFont, _
Brushes.Black, rectDraw, strFormat)
'If there is more text, indicate there are more pages
If numChars < StringToPrint.L ength Then
'Substract text from string that has been printed
StringToPrint = StringToPrint.S ubstring(numCha rs)
e.HasMorePages = True
Else
e.HasMorePages = False
'All text has been printed, so restore string
StringToPrint = RichTextBox1.Te xt
End If
End Sub

Private Sub btnSetup_Click( ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnSetup.Click
Try
'Load page settings and display page setup dialog box
PageSetupDialog 1.PageSettings = PrintPageSettin gs
PageSetupDialog 1.ShowDialog()
Catch ex As Exception
'Display error message
MessageBox.Show (ex.Message)
End Try
End Sub

Private Sub btnPreview_Clic k(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnPreview.Clic k
Try
'Specify current page settings
PrintDocument1. DefaultPageSett ings = PrintPageSettin gs
'Specify document for print preview dialog box and show
StringToPrint = RichTextBox1.Te xt
PrintPreviewDia log1.Document = PrintDocument1
PrintPreviewDia log1.ShowDialog ()
Catch ex As Exception
'Display error message
MessageBox.Show (ex.Message)
End Try
End Sub

'************** *************** *************** *************** *********

'Sub for printing graphic
Private Sub PrintGraphic(By Val sender As Object, _
ByVal ev As PrintPageEventA rgs)
' Create the graphic using DrawImage
ev.Graphics.Dra wImage(Image.Fr omFile(TextBox1 .Text), _
ev.Graphics.Vis ibleClipBounds)
' Specify that this is the last page to print
ev.HasMorePages = False
End Sub

Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click

btnPrint.Enable d = True
btnSetup.Enable d = True
btnPreview.Enab led = True

Try
AddHandler PrintDocument2. PrintPage, AddressOf Me.PrintGraphic
PrintDocument2. Print() 'print graphic
Catch ex As Exception 'catch printing exception
MessageBox.Show ("Sorry--there is a problem printing", _
ex.ToString())
End Try
End Sub
End Class
Private PrintPageSettin gs As New PageSettings()
Private StringToPrint As String
Private PrintFont As New Font("Arial", 10)

Private Sub btnOpen_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnOpen.Click
Dim FilePath As String
'Display Open dialog box and select text file
OpenFileDialog1 .Filter = "Text files (*.txt)|*.txt"
OpenFileDialog1 .ShowDialog()
'If Cancel button not selected, load FilePath variable
If OpenFileDialog1 .FileName <> "" Then
FilePath = OpenFileDialog1 .FileName
Try
'Read text file and load into RichTextBox1
Dim MyFileStream As New FileStream(File Path, FileMode.Open)
RichTextBox1.Lo adFile(MyFileSt ream, _
RichTextBoxStre amType.PlainTex t)
MyFileStream.Cl ose()
'Initialize string to print
StringToPrint = RichTextBox1.Te xt
'Enable Print button
btnPrint.Enable d = True
btnSetup.Enable d = True
btnPreview.Enab led = True
Catch ex As Exception
'display error messages if they appear
MessageBox.Show (ex.Message)
End Try
End If
End Sub

Private Sub btnPrint_Click( ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnPrint.Click
Try
'Specify current page settings
PrintDocument1. DefaultPageSett ings = PrintPageSettin gs
'Specify document for print dialog box and show
StringToPrint = RichTextBox1.Te xt
PrintDialog1.Do cument = PrintDocument1
Dim result As DialogResult = PrintDialog1.Sh owDialog()
'If click OK, print document to printer
If result = DialogResult.OK Then
PrintDocument1. Print()
End If

Catch ex As Exception
'Display error message
MessageBox.Show (ex.Message)
End Try
End Sub

Private Sub PrintDocument1_ PrintPage(ByVal sender As System.Object,
ByVal e As System.Drawing. Printing.PrintP ageEventArgs) Handles
PrintDocument1. PrintPage
Dim numChars As Integer
Dim numLines As Integer
Dim stringForPage As String
Dim strFormat As New StringFormat()
'Based on page setup, define drawable rectangle on page
Dim rectDraw As New RectangleF( _
e.MarginBounds. Left, e.MarginBounds. Top, _
e.MarginBounds. Width, e.MarginBounds. Height)
'Define area to determine how much text can fit on a page
'Make height one line shorter to ensure text doesn't clip
Dim sizeMeasure As New SizeF(e.MarginB ounds.Width, _
e.MarginBounds. Height - PrintFont.GetHe ight(e.Graphics ))

'When drawing long strings, break between words
strFormat.Trimm ing = StringTrimming. Word
'Compute how many chars and lines can fit based on sizeMeasure
e.Graphics.Meas ureString(Strin gToPrint, PrintFont, _
sizeMeasure, strFormat, numChars, numLines)
'Compute string that will fit on a page
stringForPage = StringToPrint.S ubstring(0, numChars)
'Print string on current page
e.Graphics.Draw String(stringFo rPage, PrintFont, _
Brushes.Black, rectDraw, strFormat)
'If there is more text, indicate there are more pages
If numChars < StringToPrint.L ength Then
'Substract text from string that has been printed
StringToPrint = StringToPrint.S ubstring(numCha rs)
e.HasMorePages = True
Else
e.HasMorePages = False
'All text has been printed, so restore string
StringToPrint = RichTextBox1.Te xt
End If
End Sub

Private Sub btnSetup_Click( ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnSetup.Click
Try
'Load page settings and display page setup dialog box
PageSetupDialog 1.PageSettings = PrintPageSettin gs
PageSetupDialog 1.ShowDialog()
Catch ex As Exception
'Display error message
MessageBox.Show (ex.Message)
End Try
End Sub

Private Sub btnPreview_Clic k(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnPreview.Clic k
Try
'Specify current page settings
PrintDocument1. DefaultPageSett ings = PrintPageSettin gs
'Specify document for print preview dialog box and show
StringToPrint = RichTextBox1.Te xt
PrintPreviewDia log1.Document = PrintDocument1
PrintPreviewDia log1.ShowDialog ()
Catch ex As Exception
'Display error message
MessageBox.Show (ex.Message)
End Try
End Sub

'************** *************** *************** *************** *********

'Sub for printing graphic
Private Sub PrintGraphic(By Val sender As Object, _
ByVal ev As PrintPageEventA rgs)
' Create the graphic using DrawImage
ev.Graphics.Dra wImage(Image.Fr omFile(TextBox1 .Text), _
ev.Graphics.Vis ibleClipBounds)
' Specify that this is the last page to print
ev.HasMorePages = False
End Sub

Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click

btnPrint.Enable d = True
btnSetup.Enable d = True
btnPreview.Enab led = True

Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4692
by: Rob McLennan - ZETLAND | last post by:
Hi, I have set up an external stylesheet, named "print.css", to format the style of all pages printed from my company's website. I've been previewing my changes to the stylesheet by doing File\Print Preview in IE6 and noticed that occasionally the leftmost button of the javascript menu (CoolMenus Version 3.02) on our website is printed. (I have wrapped the javascript that generates this menu in a DIV so that it is concealed from...
16
11446
by: Neo Geshel | last post by:
I'm helping on a web site, and it's got our knickers in a knot. We're using the same basic CSS files (with mods) and same headers as from our other sites, but the "print preview" won't work correctly on this site. The site is here: http://askdrray.kabis.net (temporary location) The site is being worked on, and only the front page works right now. Expect constant changes. Ignore everything “below the fold”, as the links there...
2
2772
by: Pkant | last post by:
I want to Print a txt file with this code : class Printing { PrintDocument prndoc = new PrintDocument(); PrintPreviewDialog ppd = new PrintPreviewDialog();
3
8633
by: Chase | last post by:
The print preview dialog will display the preview of the document but will print a blank page when the print icon is clicked. Printing is fine otherwise. Can i set the print icon in the printpreviewdialog to go to the printdialog.
6
3485
by: CSharpguy | last post by:
In my gridview I have 2 -3 template fields which are hyperlinks. I allow the user to print this grid. When the grid prints it also prints the links, how can I take the user to a print preview page and not show the templated fields, (hyperlinks) and also not print those fields?
2
22136
by: Brad Pears | last post by:
I have some sample code that uses the print dialog, print preview and a print direct options. If I select print preview and then click the printer icon from that, the document prints. If I select the print directly option, it also prints right away to the defauilt printer. However, if I use the printer dialog control to print and I click 'OK' to actually print the document - nothing happens. The job does not even go into the print...
2
9991
by: Brad Pears | last post by:
I have a vb.net 2005 application and am using the print preview screen. This screen has a printer icon on it that the user can use to print the document currently being viewed. It uses the default printer settings to print. I wanted the print preview to appear the same for all users (i.e. a default page size of 8.5x14 (legal) and portrait mode). Many users have different printers as their default (plotters etc..) and I found that various...
1
3103
by: mailjaneen | last post by:
Hello, can someone help me. I want to display some fields on a report in print preview (i.e. instructions), that I don't want to print to the printer or export to file. I can't seem to find any way of telling that the report is displaying in print preview, vs. being actually printed or emailed/ exported. So for example when previewing, I'd do Me!.Visible = True.
16
4535
by: raylopez99 | last post by:
I am running out of printing paper trying to debug this...it has to be trivial, but I cannot figure it out--can you? Why am I not printing text, but just the initial string "howdy"? On the screen, when I open a file, the entire contents of the file is in fact being shown...so why can't I print it later? All of this code I am getting from a book (Chris Sells) and the net. The solution is to be found in the fact that stringbuilder is...
0
9944
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9793
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10752
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10420
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7974
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7134
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5804
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5996
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4619
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.