I need to be able to get the position of the mouse (or cursor) when it is outside of the program's VB form.
I have tried using Cursor.Position and display the X,Y values on the form.
But when the cursor leaves the boundaries of the Form, no values are returned.
( BTW, what is the difference...
I am trying to draw something on a Picturebox and save the drawing with the PB.Image.Save.
But I get the shown near the end of the following code.
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Drawing.Imaging
Imports System.Text
Public Class Form1
Private Sub...
When I started working on a program today, suddenly the debug checkpoints (Red dot on left by linenumbers) DONT'T WORK.
I am trying to find the cause of "Argument out of range exception was unhandled" error, but without the checkpoint I can't find the cause.
How can I turn the debug checkpoints...
I want to use MSCHART to plot some data in a VB 2008 program.
When I click on the Toolbox tab, and then right-click on the Toolbox, then click on Choose Items, the Choose Toolbox Items windows is display.
But when I click on the COM Components tab, MSCHART is NOT included in the list.
I have...
I am using the following code to color certain parts of the text in a RichTexbox.
Private Sub SetRed()
Dim I, L As Integer, S As String
L = 106
For I = 2 To nStk + 2
With RTB
.SelectionStart = I * L + 14
.SelectionLength =...
I can manually do a Control-A to select all the text on a WebBrowser control, and a Control-C to copy it to the clipboard.
But...
How can I get my VB.NET program to send AUTOMATICALLY a command (such as Control-A or Control-C) to the WebBrowser control?
I have several data files where the first 8 characters on each line is the date in YYYYMMDD format.
Immediately following the date is a one-letter code.
For example:
20100531P Some data
20100531n Some more data
When I add these two lines to the listbox, I want them in the sequence shown in the...
I have some programs that use a webbrowser control.
All were working fine...until one day I inadvertently changed something (I don't what) on the desktop and since then ALL the programs are displayed with enlarged controls and textsize.
Could someone tell me what it was that I changed?
(My...
I am drawing basic shapes on a Form.
To draw a line (1)mouse down to start the line (2)with mouse down, drag to lengthen the line (3) mouse up.
Same procedure for rectangle, circles, ellipses,etc.
I am using:
Dim bm As Bitmap
Dim g As Graphics
and
bm = New Bitmap(Me.Width, Me.Height...
I just downloaded and installed DirectX SDK. That seemed to go well.
But now VB2008 does not recognize "Imports Microsoft.DirectX".
In the Toolbox, I right-clicked on Components and selected "Choose Items", but Microsoft.DirectX does not appear in any of the 3 lists there.
How do I get my...
I am drawing a chart on a bitmap which I save as a .bmp file.
I need to be able to draw a string on the bitmap which is very tiny but readable when the viewer zooms in on the chart.
Using Arial with fontsize 6 is good, fontsize 5 is barely readable, and fontsize 4 is not readable at all.
Is...
I have a listbox that contains many names in the form Lastname, Firstname Middlename.
The list is sorted.
I want to be able to type a part of a name in a textbox and the program will select the first name in the listbox that matches.
For example, if the listbox contains:
Baker, Larry T...
In 2005 I could set a breakpoint in the code and when the program reached the breakpoint I could click on a preceding line of code and restart execution of the program from that selected line (by hitting Ctrl-F9, I think).
In 2008, how can I start execution at a line other than the breakpoint line?
I have just installed VB2008 express on a computer with XP system.
When I run VB2008 and create a new application, I can edit the VB source code - but when I click on the 'Form' icon to add controls to the form, I get the message
"Missing editor for file Form1.
make sure the editor for file...
After I "Build" a .exe file, how can I create a desktop shortcut with an existing icon file to run the program?
(I am using VB2008 Express on Vista system.)
In the IDE, when we click on a control, little squares appear around the control. (Are these called handles?)
Is there any way for this type of control to be provided to the user of a program?
We can always draw these squares and the dashed outline on the screen using Drawline, DrawRectangle...
I am trying to control an instance of a Notepad program which has some data in it - I want to save the data into a file.
I am trying this code:
Dim AllProcess() As Process = GetProcessesByName("notepad")
Dim MyProcess As Process = AllProcess(0) ' use the first one found...
I have a Project with a Main form and four other Forms.
I want to add a fifth Form to the Project.
I tried selecting "Project" and then "Add Windows Form" which added the blank Form (called "Daily") to "Main" form.
Since "Daily" already existed as a separate Project (called "DayTask"), I...
How can I open a file as FileStream in one Sub and then read bytes from the file with ReadByte in another Sub?
Here is the code I'm trying:
Private Sub btnGetfile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetfile.Click
Path = txtFilename.Text...
When my program reads a JPG file, draws some text on the picturebox, and saves the file, the saved file is not readable by MS Photo Editor. It IS readable by MS Explorer, MS Word, & PhotoImpact. When I copied the saved files to a USB thumbdrive and tried to print the pics at CVS, they were not...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.