I want to make a program that will take a screenshot inside the bounds of a rectangle. Is there a way to do this? I don't want to use sendkeys{"(prtsc)"} because that doesn't take a screenshot of only an area on the form.
I am trying to place // at the beginning of all the highlighted lines, when the user selects 1+ lines, and presses the "Comment" button
vb.net Private Sub CommentSelectionToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CommentSelectionToolStripMenuItem.Click
I have one picturebox, which moves when i start the timer:
PictureBox1.Location = New Point(PictureBox1.Location.X - TrackBar1.Value, PictureBox1.Location.Y) By default, it can go out of forms bounds, but i dont want it to be able to go out of them
I have this code where I'm wanting to draw text inside a defined rectangle and if it's too wide I want it to be slit onto multiple lines and if it's too tall, I was it to only paint what it can which right now it's not cutting it off it continues on below the bottom border. Here's my
Dim NotesRect As New RectangleF(mMargins.Left + LeftIndent, m_PagePositionSingle, mMargins.Right, mMargins.Bottom) e.Graphics.DrawString(NotesString, m_ItemFont, Brushes.Black, NotesRect, New StringFormat(StringFormatFlags.FitBlackBox Or StringFormatFlags.LineLimit))
including the runtime error message I receive that keeps killing my application. I am about to pull my hair out because I cannot find anything wrong with the code, and I do not get the error when debugging the application in VB! Basically a user enters some medical information on a form in text boxes and adds some medical conditons and medications into two listbox controls on the form, on for medical problems and one for medications they are on. When Button1 (command button) is clicked, it calls a subroutine stored in a module1. Then the application throws and Index out of Bounds error and crashes, losing all information that was entered. Here is the code on Button1:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext5.Click Call Store_MedData End Sub
Here is the code for Store_MedData in the module. The error occurs on red text:
Dim ClientLastName as string, ClientMI as String, ClientFirstName as string, ClientAddress as String, _ ClientAddress2 as String, ClientCity as String, ClientState as String, ClientZip as String, ClientDOB as String, _ ClientBloodType as String,ClientActiveMeds(frmmain.lstActiveMeds.Items.Count - 1) As String, _ ClientActiveMedProbs(frmmain.lstActiveMedProbs.Items.Count - 1) as String
[code]....
When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box. The application is being run on a PC running Windows Vista Home Premium w/ SP1. (aka. Windows "Worthless Edition")
I have a list box that is custom drawn...I was wondering how i can get the rectangle for a specific item (not in the drawitem event) so that i can call (for instance):
In my game, which is just for practice, I have a 2 rectangles one set as the inner bounderies, one set as a sprite, but I want to create walls for my boundaries. So how could I set a string of bounds with this
Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress If Sprite.Bounds.Top <> Wall.Bounds.Top Then
I'm using the below code to capture desktop screenshot, it is working but doest encode the screenshot result in real jpeg, I came to know that from the huge size of the saved jpeg file around 5MB!!!
Dim ScreenSize As Size = New Size(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height) Dim screenGrab As New Bitmap(My.Computer.Screen.Bounds.Width,
I am trying to make bounds for a character that can jump. I have made the character graphic into a rectangle and I have a square block in the game that the character must jump onto and I have set that as a rectangle.
How would I make it so when the character jumps onto the square block, he stays up there and then when he jumps down, and touches the ground, he stays on the ground. My current jump code is standardized; it does not detect changes in the Y-coordinate. What I have done in the jump for the character is I have made it so the Y-coordinate is increased by a certain amount and decreased by the same amount so the difference is equal to 0.
Any way to prevent my application from taking screen shot. I am using this method If Clipboard.ContainsImage = True Then Clipboard.Clear() If this is correct? And also what about screen capture application they take the screen shot without using clipboard what is logic behind it and if there is any way to resolve it?
Im looking for code that will take a screen shot of the screen every X amount of seconds and save it with a filename of like "SSLaptop Todays Date & Time"
pretty much you can understand only form the title what I want to do...I'm trying to make a screenshot tool that when will save the jpeg and will make it in lower quality or compress it.
Try Dim ScreenSize As Size = New Size(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height)
I created a custom control that uses a PictureBox and made that PictureBox movable.
I create the control during runtime and the code works just fine. I can move the picturebox, except it can only move within the bounds of the control, which is the same size as the picturebox.
I have a panel that has a label and a picturebox inside of it and I handle the pictureboxes event like so:
I have been toilign away for several days on a program. I have chosen to start form a fresh with it (using much the same code). However I am continuely being givent he following errors.
Expression is not a method. Line 17 Expression expected Line 17 Array bounds cannot appear in type specifiers. line 31
Here is my
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Processor(5) As String Dim Clock(5) As Single
Im creating an application that will take a screenshot of the desktop. Save the photo, Then upload it via FTP, And do it every 2 minutes. I know how you all like to say how i can do it, But can someone provide a code since.
Is there anyway I can do a a custom screen shot? like the height and width of it? This is what I want to do Left = 18 top = 556 right = 914 bottom = 289 So a regular screenshot on my pc is 1152 by 864. So how would I say do a 300 by 400 screenshot?
I know that this was an advanced compiler option in previous versions of Visual Studio, is there a way to disable array bounds checking in Visual Studio 2008? There's no option for it that I can see.
I'm trying to get the date and time in the database and see if it has a conflict on the textboxes that I have in my form. I use the DateDiff to see if there was a conflict but instead, I got an error. In vb6.0, I've done this code and there were no errors so far when I run it.
I'm having problems with this code. It cycles through but it tries to copy lines that do not exist, and gives and error. I'm searching for a String Character then when I find it I get a Position of the character. Then I convert that character to The Line it is on (I think this is the problem, since it says the character is on a line that doesn't exist)
Dim terrain()() As Double and I want to add the bounds in a procedure:
Dim terrain()() As Double = New Double(divisions + 1)() {}I can't add the bound for the seconds dimension.
Then I want to assign a value to any element of the array inside the procedure.
terrain(0)(0) = 0.5 This gives the error: Object reference not set to an instance of an object You can see my problem. What solution can there be to this problem that involves one array.
So this code is a section taken from a larger app and its purpose is to read the lines in a text file and place them in certain comboboxes, textboxes, etc. it works great right now except i have hit a snag. line 13 is the name of the project leader who was in charge of the job. However on older files we didnt include that name so line 13 isnt there. So when i debug the app will load up with nothing in that combobox(2) which is expected, but when i hit the update and apply button it errors out saying "Index was outside the bounds of the array" regardless of whats in the box.
Imports System.IO Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
Here I am once again, trying to make yet another program. am currently looking for a method to screenshot when the user clicks.?Example: When you open the program, and click, it will capture a screenshot and automatically save it to a folder. This will continue until the program is closed.
I have a program that has the ability to take a screenshot of a Panel on a form.I provide the user with a Save File Dialog box to choose the path of the saved .png image.My problem is that if the user does not move the modal Save File Dialog box out of the way before clicking the save button, the screenshot includes the box over the top of the panel.
I'm trying to take a screenshot of my screen, and get the picture from memory. Then convert it to a string so it can be sent over a network. So far I've tried to adapt this code.