|
TO MOVE
Simply use the following events:
- OnMouseDown
Set the TheMouseIsDown flag to true and record the top and left position
- OnMouseMove
If the TheMouseIsDown flag is true calcolate the difference between the previous and new top/left position and move the Panel
- OnMouseUP
Set the TheMouseISDown flag to false
Sorry: no code, don't know if you're coding in C#, VB.NET or else
Use the same idea for sizing
Ciao
|
|
|
|
|
Thank you for your answer.
The idea is nice, and I will take it, if I don't find a "standard" solution ( for C#)
Is there a standard solution for this problem?
|
|
|
|
|
Well, it all depends on what you consider "Standard".
From my point of view this is Indeed a standard solution!
Would you like to take a step forward ?
Make your own controll that incorporates the features you require !!
I've got my panel on panel control that does the moving (not the resizing yet) with simply:
<br />
private void pnMove_MouseUp(object sender, MouseEventArgs e)<br />
{<br />
this.bMDown = false;<br />
}<br />
<br />
private void pnMove_MouseMove(object sender, MouseEventArgs e)<br />
{<br />
if (this.bMDown)<br />
{<br />
if ((e.X != this.StartX) || (e.Y != this.StartY))<br />
{<br />
this.Left += e.X-this.StartX;<br />
this.Top += e.Y-this.StartY;<br />
this.Refresh();<br />
this.Parent.Refresh();<br />
}<br />
}<br />
}<br />
<br />
private void pnMove_MouseDown(object sender, MouseEventArgs e)<br />
{<br />
this.StartX = e.X;<br />
this.StartY = e.Y;<br />
this.bMDown = true;<br />
}<br />
<br />
<br />
Ciao
Marco
|
|
|
|
|
hi guys can u tell me plz
how to write text into a rich text box when we are using threadpool and mutex ,,
thanks in advance
hello
|
|
|
|
|
Hello all,
I have written a small windows form application in .NET 2005 using C#.
Now i have to include a functionality of automatic logging off in that application. Will u guys please help me to know whether is there any support already in .NET to do that, or should i do it through threads.
Please help me. Its very urgent. Ur help will be greatly appreciated.
Thanks and Regards
Pavan Joshi
|
|
|
|
|
Call Process.Start() method where needed in your code:
Process.Start(S"shutdown.exe", S"-l");
Best,
Jun
|
|
|
|
|
Pavan,
Check out this http://www.wwwcoder.com/Weblogs/tabid/283/EntryID/763/Default.aspx
The same DLL can be used with LogOff too. Is'nt it?
|
|
|
|
|
Give Details about Dynamic Menu
Malini
|
|
|
|
|
It's a menu, and it's dynamic.
If you want more information, try asking a better question.
|
|
|
|
|
|
Hi all,
I was looking for the solution to add header in each page of print when trying to print the data grid, and I found the following code from a forum:
function print_header()
{
var table = document.getElementById("dgResults"); // the id of your DataGrid
var str = table.outerHTML;
str = str.replace(//i, "");
str = str.replace(/<tr");
="" ="" str="str.replace(/<\/tr">/i, "");
table.outerHTML = str;
}
It is working very fine except not printing the Top border of header after first page. The second, third and consequent pages printing header without top border.
Can anyone help me to find out whats wrong and how to fix?
Thanks a lot.
Regards
Renu
|
|
|
|
|
If you are rendering a HTML Table, there is no preset option to print page headers.
You have to write your own logic to generate the header information depending on the Page Setup.
|
|
|
|
|
Yeah! actually header is printing well in each page with that code. But only the top border is missing. I even tried by adjusting the page marigins but no success. Can i able to add border in that code just before printing the header? or is there any other way?
Thanks a lot for your help.
Renu
|
|
|
|
|
|
Hi,
Can anyone confirm me with my development.. is it in the correct direction or not..
i'm a newbie for programming three tier or n-tier application.
in my project .. i have one project for windows UI one project for Webservice. So the question is, do i need one another project for the data access.. if i do.. can someone guide me how.. because until now i'm using my webservice to call directly to database..
thanks
|
|
|
|
|
Yes, the whole point of n-tiered development is that your windows app contains presentation code, there is a dll for business logic, and one for data access. Both can then be reused by the web service if need be.
|
|
|
|
|
|
I have a double value, which I am converting to a string. When it is 0, I would like display it as 0.0 to indicate to the user that the value is a floating point number.
Alas, Convert.ToString(myDouble) returns "0"
How can I affect the output of Convert.ToString?
Thanks
|
|
|
|
|
I never use Convert.
Take a look at myDouble.ToString ( "#.0##" )
|
|
|
|
|
Hi Guys,
i need to have an online query buildeer where user can choose table and columns and can fire generated query. (ASP NEt 2.0 sql server 2005 will prefer open source )
Please help
Manish Chowdhary
Software Engineer
Bangalore - 560027
Email: manish.chowdhary@gmail.com
Who is there? me, me who? i am me and you are you, you take my pronoun and we are us ..... letz celebrate one world
|
|
|
|
|
Hi friends,
Now i am working in visual studio 2005 beta 2.0.and
sql server 2000 in back end.
My problem is i want to convert digit to words
Example:
150 as One Hundred Fifty Rupees.
Plz help me any code.
-- modified at 3:50 Wednesday 8th November, 2006
|
|
|
|
|
|
Hi all,
i'm a newbie in the coding world. Now i'm facing with a trouble that how can i collect all window class name kinds (like WindowsForms10.Window.8.0.2bf8098,WindowsForms10.Window.8.app.0.2bf8098, WindowsForms10.Window.8.app.1,WindowsForms10.Window.8.app.2..etc.). Because i have a capture tool and i want to map the windows or controls have winclass and wintype with myself definition class like the example below:
winclass wintype myclass
Ex: WindowsForms10.BUTTON.appb checkbox checkbox
But my problem is the <hexappdomainhash> element ('appb' in above example) in window class name form maybe change,it's not stable. So i cannot have the general way in my mapping.
Have anyone please show me where i can collect all of window class name kinds?
best regards,
khuong.ngo
|
|
|
|
|
Hi, I have started using .Nets GDI drawing library, and I was wondering if its possible to draw things to a graphics object in layers.
Photoshop and Gimp allow drawing to various layers and then combining them into a single layer/image, and I want to know if anything similar in .Net is supported? I am looking for the ability to draw various shapes etc onto a given layer, and then switch that layer on or off.
For example, imagine I want to draw a dynamic map. It has a JPG image as the background, a second layer with place names, and then a third layer showing road routes. I want the user to be able to toggle the place names on or off.
Any tips / advice appreciated.
|
|
|
|
|
Maybe you should look at VG.Net (see sig). I use it for something a bit similar, and i like it a lot! (it ain't free though..)
(Hope it's ok to 'advertise' for a product i like and use, i'm not affiliated with VG or something)
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick || Fold With Us! || Pensieve || VG.Net ||
|
|
|
|