473,394 Members | 1,761 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,394 software developers and data experts.

How to put value in a System.Drawing.Point object?

Need Help with

System.Drawing.Point b = new System.Drawing.Point(int x , int y)

I want to move a window when mous is down and mous is moving

private void label1_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left && video.Fullscreen != true)
{
System.Drawing.Point b = new
System.Drawing.Point(outputposx-mouseposx+MediaOutForm.MousePosition.X,
outputposy-mouseposy+MediaOutForm.MousePosition.Y);
output.Location = b;
}
}

It works but isnt it so that it generates objects of type Point every time
when mouse is moved?
I want to declare
System.Drawing.Point b = new System.Drawing.Point();
in the Class and want only put the values in the Mouse_Move event.
But how can I put values into b (Point object??)

Thx
Nov 16 '05 #1
1 7328
Have found the solution
I can add value to it via

b.X = 100;
b.Y = 100;

"Bilo" <ju********@yahoo.com> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP10.phx.gbl...
Need Help with

System.Drawing.Point b = new System.Drawing.Point(int x , int y)

I want to move a window when mous is down and mous is moving

private void label1_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left && video.Fullscreen != true)
{
System.Drawing.Point b = new
System.Drawing.Point(outputposx-mouseposx+MediaOutForm.MousePosition.X,
outputposy-mouseposy+MediaOutForm.MousePosition.Y);
output.Location = b;
}
}

It works but isnt it so that it generates objects of type Point every time
when mouse is moved?
I want to declare
System.Drawing.Point b = new System.Drawing.Point();
in the Class and want only put the values in the Mouse_Move event.
But how can I put values into b (Point object??)

Thx

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: | last post by:
Hi, I am setting the NumericUpDown .Value property and the ValueChanged event is NOT being fired. Does this ONLY get fired when I change it on the UI and not programatically? Thanks
5
by: Steve Amey | last post by:
Hi all I have an ARGB value for a Colour (Eg. -65536. The value was retrieved by using the Color.ToArgb method), is there any way that I can create a System.Drawing.Image or a...
0
by: BeeFirst | last post by:
hi, i meet a problem when i try to develop an application with an ocx in c#. the same ocx works well in vc,but not in c#,the Microsoft .NET common language runtime throw a...
1
by: Bilo | last post by:
Need Help with System.Drawing.Point b = new System.Drawing.Point(int x , int y) I want to move a window when mous is down and mous is moving private void label1_MouseMove(object sender,...
1
by: lwickland | last post by:
Summary: System.Net.ScatterGatherBuffers.MemoryChuck allocates inordinately large bytes when sending large post data. The following application consumes inordinate quantities of memory. My code...
4
by: Liverpool fan | last post by:
I have a windows application written using VB .NET that encompasses a countdown timer modal dialog. The timer is a System.Timers.Timer with an interval of 1 second. AutoReset is not set so accepts...
6
by: Joseph Geretz | last post by:
Writing an Outlook AddIn with C#. For the user interface within Outlook I'm adding matching pairs of Toolbar buttons and Menu items. All of the buttons and menu items are wired up to send events to...
0
by: Nickneem | last post by:
I' m trying to disable all right mouse clicks by using the vbAccelerator Windows Hooks Library The small (systray / console) app. must catch all (right) mouseclicks before they are received by...
7
by: pooba53 | last post by:
I am working with VB .NET 2003. Let's say my main form is called Form1. I have to launch a new form (Form2) that gathers input from the user. How can I pass variable information back to Form1...
6
by: Derek Hart | last post by:
How can I set the listbox value and retrieve a listbox value with just text? I have filled the listbox with items in the items collection property (very simple, just one column of text items). I...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.