Creating And Saving Screenshots In PNG File?
Dec 30, 2009How to create and save screenshot to PNG file? Lang:VB or C# (VS2008)
View 2 RepliesHow to create and save screenshot to PNG file? Lang:VB or C# (VS2008)
View 2 RepliesI'm currently working on a program to store files and information. I'm wanting the program to be able to have multi-user logins i.e. there are numerous combinations of usernames and Passwords. I've created a program that will create new accounts and save them in a .bin file (in the form Username Password). However, now I need to use the user accounts to grant access to a form.
View 1 RepliesI am trying to use the BGW to save a DGV to excel file, but don't know how to do it correctly, specifically setting the savefile name this code doesn't work gives me:
'System.Runtime.InteropServices.COMException' occurred
- Make sure the specified folder exists.
- Make sure the folder that contains the file is not read-only.
- Make sure the file name does not contain any of the following characters:
Ensure that your Main function has STAThreadAttribute marked on it. This exception is only raised if a debugger is attached to the process. I also tried doing the Save in the BGW RunWorker Completed event but then there is no file name. It seems I need to pass the file name the user inputs in the SaveFileDialog to the BWG WorkerCompleted event somehow
Private Sub excelexp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles excelexp.Click
ProgressBar2.Visible = True
Saving.Visible = True
Dim saveFileDialog1 As New SaveFileDialog()
[Code] .....
i am trying to create a form in VS using ASP that when upon submitting a form the details will get automatically stored in an xml file which can be accessed later on a chosen file save path.i have 2 files ... "Contact.aspx" and "Contact.aspx.vb".i have created the form in the "Contact.aspx" and when trying to enter the fields in the "contact.aspx.vb" i keep getting several errors such as for example...
Error 5 'Formatting' is not a member of 'System.Web.UI.WebControls.XmlBuilder'
Error 6 'WriteStartDocument' is not a member of 'System.Web.UI.WebControls.XmlBuilder'.
Error 7 'WriteComment' is not a member of 'System.Web.UI.WebControls.XmlBuilder'.
Error 8 'WriteStartElement' is not a member of 'System.Web.UI.WebControls.XmlBuilder'.
Error 10 'WriteAttributeString' is not a member of 'System.Web.UI.WebControls.XmlBuilder'.
there is like 30 errors in total... im literally stuck out my head been trying for 2 days now and can't grasp what im doing wrong ive tried even some of the tutorials online but loads of errors...
This is my first attempt at creating a Winforms application, and I have been developing in the .Net Framework (Silverlight, ASP.Net, WPF) for about 6 months. So, my appologies if this is a newbie question.
Basically what I am doing right now is taking the drawings of a stylus-based input, and storing them into an image field in a SQL Server database. Then, in another form, I go and get that image out of the database, and load it into a picture box. It works, but it is rather "sloppy" how it got there.When the user clicks save, it stores that image into a temporary folder, then converts it to a byte array and throws it into the database that way. Then, it deletes the file from the temporary folder. When retrieving it, it pulls it out of the database in a byte array, then converts it to an image in a temporary folder, thus displaying it on the form.
Is there a way that I can just bypass the storing of the file onto the user's harddrive both times, and go from byte array to picturebox?
im using this code
Dim VideoSize As Size = New Size(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height)
Dim PIC As New Bitmap(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height)
Dim image As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(PIC)
[code]...
How do I include the cursor with this and save all the screenshots as one video file?instead of saving as 1000 pics?
Currently I am saving data from my applications by saving a text file via a stream reader as a string. I have come to a problem. In my current application, I have an array of the following structure:
[Code]...
I need a full VB .Net example of how to start with a 24 bit color bitmap, change i to a paletted 8 bit color PNG, and save it. The Microsoft documentation I have found iincomprehensible and has no good working examples.
View 3 Replieshow to create a bitmap image of a specified size? then how to save and reload such a bitmap to and from a file?VB2005 starter
View 1 RepliesI'm trying to save files in a new folder that get created and then copy 2 other files that are in my resources to that folder. I get this error:
Quote:
UnauthorizedAccessException was unhandled: Access to the path 'C:UsersMike.Mike-PCDesktopJava IDE' is denied.
This is my code:
Code:
Dim desktopPath As String = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)
Dim sdlg As New SaveFileDialog
[Code].....
I would like to use code to create a checkbox with default properties and place it at a certain position in a groupbox. For example, i would like to do this by pressing a button and that i can give in the name and tag by use of an imputbox. Also, i have noticed that if something like this is done, these changes aren't permanent and don't apply to the designer nor the code in VB. Is there a way to let the newly created checkboxes appear in the designer? And what about permanently deleting checkboxes by pressing a button. With "Dispose()" it isn't deleted from the designer...
View 2 RepliesI'm drawing a chart in a pictruebox with a sub called Techart. After that I'm trying to turn the drawing into a bitmap, so that it will be persistant and also so that I'll be able to save it. This is what I've got from searching the forum:
[Code]...
I have a VB.net applications that runs on XP and creates a directory and creates an Excell workbook and saves it. But when I do the same in Vista , when it tries to create a directory to save the excel workbook, it gives me an error that the directory does not exist. If I create the directory manually, it still gives me the same error. Is there a COM call for office 2007 on Vista other than worksheet.SaveAs(FileName:=path). All else works on Vista apart from creating a directory and Saving Excell Worksheet.
Public Function createDirectory(ByVal path As String) As String
Dim new_path As String
Try
[code].....
How do i insert the images during an customize installation?
For example, when i was installing Skype, screenshots of Skype appeared during the installation. How would i make that during my installation, with images appeared and disappeared just like skype. I know i could use code to bring back and front, but that is not how i wanted it to be. I tried that code before, but doesnt look good enough.
I'm looking for visual basic.net code (for visual basic express) to take automatic screenshots (timeout=60 seconds) for application testing. But every code has a lot of bugs:For example: [URL]Errors like:
Error 1 'Protected Overrides Sub Dispose(disposing As Boolean)' has multiple definitions with identical signatures.
Error 2 'Private Sub InitializeComponent()' has multiple definitions with identical signatures.
Error 3 'components' is already declared as 'Private components As System.ComponentModel.IContainer' in this class.
Okay, so I know how to capture a screenshot of the Active Window, but if the active window is a game, then the screen is just black. What do I need to do to be able to also capture ingame screens?
View 3 RepliesI'm running vb 2005. I need to take snapshots of video clip that are on my HD.
View 1 RepliesI have a screencasting program where it takes 10 screenshots every second and saves it to a temporary directory then through ffmpeg the series of images are compiled into a video format. My problem is that due to the computers processing power or the size of each screenshot and its quality it sometimes takes longer than 100 Milliseconds to create one causing the whole video to be off balance. How can I ensure 100% that 10 Images will be stored?
View 1 RepliesI started a little project to make it easier for me to post an image (screenshotby having the program output thehtm page which shows a thumbnail image, the URL, and the HTML text used to post the image here in the forus a question. I've set the name to "index" so that it appears by default rather than the former open browsing
View 4 RepliesThe following code takes a full screen screenshot:
Public Function TakeShotOfScreens() As Bitmap
Dim maxHeight As Integer = 0
Dim maxWidth As Integer = 0
For Each scr As Screen In Screen.AllScreens
maxWidth += scr.Bounds.Width
[Code] .....
I am after some code that takes a screenshot of only a small portion of the screen.... I have to x,y,width and height of the square that I wish to take. Is this possible?
Basically I have created a windows service using VB 2008 where I am trying to capture screenshots periodically.
The timer is working fine and I have tested this.
The purpose of the service is to monitor the desktop over night when the user is logged off, by capturing screenshots and saving them to file. This is so admin can be alarmed about security breaches etc.
The problem is is that I have not found a way to capture desktop screenshots as a windows service (or otherwise) while the windows logon screen is active (i.e: when the user locks the computer). I have used google extensively but to no avail
I am trying to create an application that records screenshots every 50 milliseconds... And It works below:
Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
Dim b As Bitmap = New Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height)
[Code]....
But after 30 seconds I see an ArgumentException on the second line...
Does anyone have a solution or an alternate method of capturing the screen like this?
how to take and save screenshots of the current window or whole screen which ever is simpler.
View 9 RepliesBasically I have created a windows service using VB 2008 where I am trying to capture screenshots periodically. The timer is working fine and I have tested this. The purpose of the service is to monitor the desktop over night when the user is logged off, by capturing screenshots and saving them to file. This is so admin can be alarmed about security breaches etc.
[Code]...
Black Screenshots Games Counter-Strike anticheat?
View 5 RepliesI'm working on a program which will allow users to take screenshots of full screen games, such as Call of Duty, Battlefield 3, etc. However, I'm having two issues with my code. First off, I'm having to press the shortcut twice, instead of once like my other shortcuts. This only occurs when the code below is actually in the handling sub. If I just have a messagebox show when the shortcut is pressed, it works every time. Second, whenever I take a screenshot, it either comes out completely black, or takes a shot of my desktop, even though there is a game running in the foreground. I have looked around, and it seems that printscreen is the only way to get a screenshot of a game through vb.net.
My code is below.
Private Sub game_Press(ByVal s As Object, ByVal e As Shortcut.HotKeyEventArgs) Handles gamewindow.press
Dim gamewin As RECT
If GetWindowRect(GetForegroundWindow, gamewin) Then
Dim bmp As Bitmap
[CODE]...
In my VB6 programs (internal to our organzation) I have always liked taking screenshots upon the occurence of an error to give me more clues as to its cause but somehow I have read somewhere that it may be in violation to some law (privacy / data protection).In the project I am currently developing and it will be for marketing I have used the same method but upon reading about the warning I am now somehow hesitant to use it although it has proved useful in the past.
View 16 RepliesI am using the web browser control to generate screenshots of an intranet application developed in ASP.NET.
The screenshot is generated, compressed and then stored as a BLOB in the database. When I developed this facility I investigated the best way of compressing the image (to the lowest byte size), however the images still seem to be too big as the database table is growing larger than I hoped. I am using the TIFF format, but I am now thinking that this may not be the best as it is used by photographers (who I assume require good quality photographs). Here is the code to compress the image (before it is stored as a BLOB):
[Code]...
I am creating a shell for a FORTRAN application which reads a tab delimited text file.Because I am using Excel to manipulate data, is it possible to use the Excel Automation features to "save as" a tab delimited text file?The only method available seems to be a unicode text format, which does not work. Or is there another format that mimics tab delimited so that the FORTRAN application will read such a file without difficulty?
View 1 RepliesI have an asp page with vb.net code that will query a database and present the user with the number of records that exist that need to be exported along with a button to export them. After you push the export button, it will prompt for a location and filename. But after that, it will not refresh the page with the new counts that now exist. Or in this case update the count to zero for the button they clicked.
[Code]
So how can I tell the page to refresh with the new counts. It almost seems like I need to tell the process to wait until after the user has finished finding the location and saving the file but I don't want to add a generic threading.thread.sleep in, I want it to only wait until they are done and then refresh the page.