|
i tried, but got no comment out of him
|
|
|
|
|
Hi
This is to print a form which contains a tab control.For this you have to instal Microsoft.Visual Basic.PowerPacks.Printing.dll.Then add one command button and a tab control to your form.Then add some other controls to your tabpages.Drag PrintDocument1 control from the tool box to your form.After that paste the code in the code behind.Press F5 to run it.Click on the button1 to print the pages.
Option Strict Off
Imports System.Drawing
Imports System.Drawing.Printing
Imports System.Runtime.InteropServices
Public Class Form1
Dim TabId As Integer
Dim i As Integer
Dim img As Bitmap
Dim WithEvents pd As PrintDocument
Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Me.TabControl1.SelectTab(0)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
TabId = Me.TabControl1.TabCount
For i = 0 To TabId - 1
Me.TabControl1.TabIndex = i
Me.TabControl1.SelectTab(i)
'MsgBox(i)
Me.Refresh()
img = CaptureForm1()
pd = New PrintDocument
pd.Print()
Next
Catch ex As Exception
MsgBox(ex)
End Try
End Sub
Function CaptureForm1() As Bitmap
Dim g1 As Graphics = Me.CreateGraphics()
Dim MyImage = New Bitmap(Me.ClientRectangle.Width, (Me.ClientRectangle.Height), g1)
Dim g2 As Graphics = Graphics.FromImage(MyImage)
Dim dc1 As IntPtr = g1.GetHdc()
Dim dc2 As IntPtr = g2.GetHdc()
BitBlt(dc2, 0, 0, Me.ClientRectangle.Width, (Me.ClientRectangle.Height), dc1, 0, 0, 13369376)
g1.ReleaseHdc(dc1)
g2.ReleaseHdc(dc2)
'saves image to c drive just, u can comment it also
MyImage.Save("c:\abc.bmp")
Return MyImage
End Function
Sub pd_PrintPage(ByVal sender As Object, ByVal e As PrintPageEventArgs) Handles pd.PrintPage
Dim x As Integer = e.MarginBounds.X
Dim y As Integer = e.MarginBounds.Y
e.Graphics.DrawImage(img, x, y)
e.HasMorePages = False
End Sub
SetLastError:=True, CharSet:=CharSet.Unicode, _
ExactSpelling:=True, _
CallingConvention:=CallingConvention.StdCall)> _
Private Shared Function BitBlt(ByVal hdcDest As IntPtr, ByVal nXDest As Integer, ByVal nYDest As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer, ByVal hdcSrc As IntPtr, ByVal nXSrc As Integer, ByVal nYSrc As Integer, ByVal dwRop As System.Int32) As Boolean
' Leave function empty - DLLImport attribute forwards calls to MoveFile to
' MoveFileW in KERNEL32.DLL.
End Function
Hope this may b helpful for you sometimes.
Thanks
Vinidimple
dimp
dimp
|
|
|
|
|
Hi
I need all the commands and switches used in the command line for Winzip and Winrar.
For example:
Winzip.exe a -ep1 -r myfile.txt myzip.zip
I need what is the use of each switch like -a, -ep1, -r.
Gg
|
|
|
|
|
Winzip switches:
http://www.memecode.com/docs/winzip.html
WinRAR switches are not available on the net, just download the trial demo and see the help.
-------------------------
Don't worry, be happy )
|
|
|
|
|
I m jay & I m doin a project for which I required a SMS Gateway. I used NowSMS for sending & recieving SMS through my cell phone connected via USB. But NowSMS cannot read the msgs that I sent to the connected mobile. I hve tried some settings but I m not a Network Specialist, so I dont know some of the settings like SMPP server, POP3, SMSC & other such stuff. Can anybody plz help me in this. Can somebody gve me the general settings for the NowSMS. Plz reply
|
|
|
|
|
I think that NowSMS forum is the best place to ask this question.
-------------------------
Don't worry, be happy )
|
|
|
|
|
I am doing a work about MultiMedia Transport.Is there anyone have some experience with it? Can you give me some advice?
There is a will,there is a way!
|
|
|
|
|
hai Friends
I need java game programs,java swing study materials anybody please send to the following mail ID
jeyasingh.p@gitech.in
|
|
|
|
|
|
I am thinking of creating a track's cleaning program and i want to know whether this is a good idea.
Okay my application will be written in vb.net 03, .net1.1 framework and will focus on the use of these:
1. Registry changes (deleting ,opening keys/closing keys , seeing whether certain keys exist) .
2. Deleting files (such as cookies, temporary internet files, determining whether files exist).
Will only work with internet explorer, the program will be used for tracks cleaning so cleaning files that can be used to gather information (such as websites visited, cookies , information about files opened, recent files opened etc.
But it will only focus on the basic stuff in tracks cleaning.
What do you think?
|
|
|
|
|
A***** wrote: used to gather information (such as websites visited, cookies
Will it also flush the DNS logs? What about router logs?
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
No only basic stuff such as mentioned in first post.
|
|
|
|
|
hi, my job now is testing software about website, can you tell me some documents about testing skill and experience to improve the test quality and save time.
Thanks so much.
|
|
|
|
|
You can try Testing Tools Like Load Runner, Win Runner with proper study.
even i am looking some testing related tutorials.
if you got to know something help me out also.
Tech_spidy
|
|
|
|
|
I am working on same project but unable to find solution can anybody help me to write Image segmentation that used genetic algortihm use any programming language like C++,VC++ etc...
please help me.....
|
|
|
|
|
I want to make my first article contribution/tutorial, and I am wondering if it is a good idea, or if it has been done.
The main thought would be to find any website with some data that you want, like score readings from a football team, or router settings, can be made available on a Sidebar gadget.
It would cover three topics, and also keep them seperated as much as possible.
1. reading and parsing a webpage
2. creating a webservice that publishes this info
3. creating a gadget that uses this webservice
Any thoughts, suggestions? I haven't started, nor do I know even half of what I'm getting in to, but I 've been wanting to learn Webservices and Gadgets for a while now.
Shoot!
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|
|
i want to read voice signal from the appropriate (apeaker i/o ) port . how can i get binary data of what ever i speak.
pls help me out.
Thanks.
Tejas
|
|
|
|
|
|
I would be very grateful if someone wrote an application similar to this program:
Google Groups Filter / Killfile Browser[^]. The version available for download seems to be unstable and not adapted to recent GG changes.
Thanks!
|
|
|
|
|
This is definitely a perfect job for a FireFox extension or a FireFox GreaseMonkey script. I'm sure someone has already written something similar... Need to do some search.
-------------------------
Don't worry, be happy )
|
|
|
|
|
Hi all,
I need to be able to automatically run a program of my choice, say an .exe or a VC++ program, when a particular USB device is plugged in. Does anyone know how to do it, or know where i can find more information about this topic?
any help is greatly appreciated!
thanks and regards,
Sowhat_82
|
|
|
|
|
Look at:
http://www.codeproject.com/useritems/HwDetect.asp
and
http://www.gidforums.com/t-5991.html
-------------------------
Don't worry, be happy )
|
|
|
|
|
i need some articles about image compression in vc++.for my research or send me LZW source code for image compression plz reply me soon
zindgi
|
|
|
|
|
|