473,405 Members | 2,160 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Visual Basic Help Please

Hi there- I am trying to create a program and I am very new at this! Please help.
Using the mouse up and mouse down event I need to draw lines. The lines will begin where the mouse is pressed down and will end where it is released. Then I need to save the X and Y values of the mouse location when a button is pressed in two form level variables. In the mouse up event I need to create a Pen and use the locations from both the mouse down and mouse up to draw a line that connects to points. I really need help with this!!
Nov 20 '06 #1
2 987
sashi
1,754 Expert 1GB
Hi there- I am trying to create a program and I am very new at this! Please help.
Using the mouse up and mouse down event I need to draw lines. The lines will begin where the mouse is pressed down and will end where it is released. Then I need to save the X and Y values of the mouse location when a button is pressed in two form level variables. In the mouse up event I need to create a Pen and use the locations from both the mouse down and mouse up to draw a line that connects to points. I really need help with this!!
Hi there,

Have you started coding yet? Please post your code segment in your next post, will help you to validate your code. Good luck & take care.
Nov 20 '06 #2
Hi there,

Have you started coding yet? Please post your code segment in your next post, will help you to validate your code. Good luck & take care.
This is what I have so far

'create a graphics object to use
Dim mygraphicobject As Graphics = CreateGraphics()
'create an empty bitmap object
Dim mybitmap As New Bitmap(200, 200)
Dim X As Integer = 100
Dim Y As Integer = 100
Dim blnstop As Boolean
Dim intX As Integer
Dim intY As Integer
Dim g As Graphics = Me.creategraphics


Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
'draw mybitmap
mygraphicobject.DrawImage(mybitmap, X, Y, mybitmap.Width, _
mybitmap.Height)
Nov 20 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Al Murphy | last post by:
Hi, I hope that you can help me wit this one please and apologies if i'm in the wrong forum! I recently bought a book that contaiend a CD-ROM of very useful Visual Basic algoritms. Now these...
3
by: wolfing1 | last post by:
We are some 3-5 developers here 'informally' using visual basic 6. So if I want to formalize this and start using visual basic .net, how does licensing work? Do we have to buy 5 visual studio...
8
by: delete table with Visual Basic 6 | last post by:
Dear developer, I have an error message when I try to delete or drop Microsoft Access XP table with ADOX in Visual Basic 6. I use the ADOX.Catalog and ADOX.table to create and delete or drop table...
2
by: Ralph | last post by:
I used to have Visual Basic .net std. 2003 installed on WinXP SP1A. But I found it too hard to upgrade WinXP to SP2. Now, I do have WinXP SP2 installed, but I am having problems installing...
2
by: frossberg | last post by:
Hello! I tried to install the Visual Basic.NET Resource Kit (http://msdn.microsoft.com/vbasic/vbrkit/) but obviously something went very wrong and now it sems impossible both to repair and to...
0
by: Dr. Zharkov | last post by:
Hello. To see the graphics of technology DirectX 9.0 SDK Update - June 2005 in project Visual Basic, WindowsApplication1 from Visual Studio 2005 Beta 1, in file My Project, MyApplication.vb in a...
4
by: junaidnaseer | last post by:
Hi ! I am facing a problem that I have defined a function which when called in the same file generates an error as follows; " visual c error C2371 redefinition basic types see...
8
by: WT | last post by:
Is it normal that Visual Studio sets the PreInit handler for a Page from the OnInit code ? No chance to fire it as OnPreInit is run befor OnInit. ??? CS
6
by: Salman | last post by:
I would like to know how I can distribute the application that I create with Visual C++ express edition. I checked the menu options to find a deploy option similar to the one found on the Visual...
4
by: Goran Djuranovic | last post by:
Hi all, I am experiencing a strange thing happening with a "designer.vb" page. Controls I manually declare in this page are automatically deleted after I drop another control on a ".aspx" page. -...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.