esquima Posted November 18, 2007 at 07:45 PM Report Share #148440 Posted November 18, 2007 at 07:45 PM Pessoal como e que posso mandar imprimir um form??? Link to comment Share on other sites More sharing options...
Ivo Pereira Posted November 18, 2007 at 09:50 PM Report Share #148466 Posted November 18, 2007 at 09:50 PM Imprimir como? ? Link to comment Share on other sites More sharing options...
esquima Posted November 18, 2007 at 10:06 PM Author Report Share #148472 Posted November 18, 2007 at 10:06 PM fazer tipo como se fosse um printscreen Link to comment Share on other sites More sharing options...
Ivo Pereira Posted November 18, 2007 at 10:07 PM Report Share #148473 Posted November 18, 2007 at 10:07 PM e guarda-se automaticamente para um ficheiro em formato de imagem? Link to comment Share on other sites More sharing options...
esquima Posted November 18, 2007 at 10:12 PM Author Report Share #148475 Posted November 18, 2007 at 10:12 PM se é a unica maneira, entao simmm lol 🙂 e que na parte de imprimir nao percebo mesmo nada Link to comment Share on other sites More sharing options...
Ivo Pereira Posted November 18, 2007 at 10:21 PM Report Share #148476 Posted November 18, 2007 at 10:21 PM depende, tipo é para uma coisa pessoal ou para divulgares ao people? eu, se fosse um programa para uso pessoal e que fosse compativel com este metodo, fazia: um sendkeys para a tecla de printscreen, abria o paint atraves do ShellEx, fazia ctrl+v, fazia o atalho para guardar, fazia um sendkeys para o nome + um enter para guardar, e depois um sendkeys para fechar o paint... 🙂 Link to comment Share on other sites More sharing options...
esquima Posted November 18, 2007 at 10:25 PM Author Report Share #148480 Posted November 18, 2007 at 10:25 PM e se fosse para divulgar ao people como seria???lolol Link to comment Share on other sites More sharing options...
Ivo Pereira Posted November 18, 2007 at 10:31 PM Report Share #148482 Posted November 18, 2007 at 10:31 PM ah, pois, isso é mais complicado 🙂 encontrei uma coisa pode ser que te ajude... talvez 🙂 Const SRCCOPY As Integer = &HCC0020 Public 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 Integer) As Integer End Function Private Sub mniPrintScreen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mniPrintScreen.Click Snapshot("\save.bmp", Me.CreateGraphics, Me.btnModule1A.Bounds) End Sub Private Sub Snapshot(ByVal filename As String, ByVal gx As Graphics, ByVal rect As Rectangle) Try ' Create compatible graphics Dim bmp As Bitmap = New Bitmap(rect.Width, rect.Height) Dim gxComp As Graphics = Graphics.FromImage(bmp) ' Blit the image data BitBlt(gxComp.GetHdc(), 0, 0, rect.Width, rect.Height, gx.GetHdc(), rect.Left, rect.Top, SRCCOPY) bmp.Save(filename, System.Drawing.Imaging.ImageFormat.Bmp) ' Cleanup bmp.Dispose() gxComp.Dispose() Catch ex As Exception MessageBox.Show(ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1) End Try End Sub Link to comment Share on other sites More sharing options...
esquima Posted November 18, 2007 at 10:34 PM Author Report Share #148485 Posted November 18, 2007 at 10:34 PM lolol n percebo nada deste codigo 🙂 Link to comment Share on other sites More sharing options...
Ivo Pereira Posted November 18, 2007 at 11:22 PM Report Share #148508 Posted November 18, 2007 at 11:22 PM eu realmente também não xD mas tenta procurar no google por "vb.net take and save screenshot" 😉 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now