|
Hello all :
How can I clip cursor on the form while it's executed until pressing a button that can be release this clip,,,,In VC++ there is a ClipCursor() function ,,,, Is there any function can do this in VC#
<<<<<<<<<<<<<<<<<<<<<<<<thanks in="" advance="">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
The way of Professional softwares start in two:
Simple codes and develop it.
Simple but effective ideas.
|
|
|
|
|
Cursor.Clip and set the rectangle
Dave
|
|
|
|
|
Hello :
Thanks for your interesting, but if I want to end(release) clipping the cursor,,,,,how can I perform it???
Thanks....
The way of Professional softwares start in two:
Simple codes and develop it.
Simple but effective ideas.
|
|
|
|
|
Clip is just a property, so get and store its value before you alter it so you can restore it afterwards.
MSDN[^]
Dave
|
|
|
|
|
Hello :
Thanks for your answer, I'm really appraise your support, I run it and it was work , but if I press by keyboard(ctrl+tab) this clip is end....so is there any way to prevent this
<<<<<<< Thanks in advance >>>>>>>>>
The way of Professional softwares start in two:
Simple codes and develop it.
Simple but effective ideas.
|
|
|
|
|
Probably, but you would have to use the Windows API and listen to/intercept/block system keypresses.
I wouldn't recommend this though as the user needs a way to switch to another task or close your program if something goes wrong. Keeping the mouse within the bounds of your app when it has focus should be more than enough. Anything else (and maybe even just this) would be hated by end users.
Dave
|
|
|
|
|
|
|
mahdimoola wrote: i want to learn database programming csharp can you suggest me good
refrence for learn.
First of all, give your posts more meaningful names. 'Plz help me' doesn't give anyone any idea what your problem is. Read the forum guidelines.
Secondly, if you want to learn database programming, buy a book. Amazon[^] provides a list of suggested titles.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
mahdimoola,
My friends Larry and Sergey have a good website, its called google.com
Regards,
Gareth.
|
|
|
|
|
Hi guys
I'm working on a website and have set up a number of stored procedures in my database and now I want to implement the layer in my code where I query my database (business layer).
So I was wondering if someone can give some input on what is the preferred pattern for my business layer. I've been considering the GOF factory pattern or builder pattern, is this a good choice?.
I rather not access my business layer directly from my front layer, instead I want somehow to abstact the creation of objects from my front layer.
Any suggesiton og hints??
Best regards
AL
|
|
|
|
|
coolcoder wrote: Which patterns are the best choice for business layer
Dark blue pin-stripe usually.
|
|
|
|
|
coolcoder wrote: Any suggesiton og hints??
Depends entirely on your situation
|
|
|
|
|
Hi
I am currently working on an addin application of Outlook it is not a professional just my experiments with Outlook Library.
Druing this i have problem displaying the selected email body text
i am displaying it in RichTextBox but it dosenot render all the html code : specialy i dosen't show background + bold text etc but i show the empty line
so what i want from you peoples "how to render HTML in C# windows appliaction"
i am using VS 2005 + MS Outlook Library 11.0
waiting for help from someone
Thakns
Altaf
modified on Saturday, February 9, 2008 1:14 PM
|
|
|
|
|
Why not use the WebBrowser control instead?
|
|
|
|
|
Hi
i want to extend MouseEventArgs class to add some property and info by define new class as follow :
namespace CustomEventHandler<br />
{<br />
public delegate void MouseMoveExEvent(object sender, MouseMoveExEventArgs e);<br />
<br />
public class MouseMoveExEventArgs : System.Windows.Forms.MouseEventArgs<br />
{<br />
Point m_mapScrollPos;<br />
<br />
public MouseMoveExEventArgs(Point mapScrollPosition)<br />
{<br />
this.m_mapScrollPos = mapScrollPosition;<br />
}<br />
<br />
public Point MapScrollPosition<br />
{<br />
get<br />
{<br />
return this.m_mapScrollPos;<br />
}<br />
}<br />
}<br />
}
as you can see in above code, my class inherited from MouseEventArgs class, but when i compile my app, the following error has shown me :
No overload for method 'MouseEventArgs' takes '0' arguments
how to solve my problem ?
thanks.
|
|
|
|
|
hdv212,
I think the problem is that MouseEventArgs is expecting a constructor that takes no params. So just add:
public MouseMoveExEventArgs()
{ }
Regards,
Gareth.
|
|
|
|
|
If you want to add new constructor in derived class, there should be exact match of constructor in base class with same parameter. If not then there you have to make call of base class constructor explicitly .
So here i have made call to base constructor as following arguments,
you can change it.
public MouseMoveExEventArgs(Point mapScrollPosition)
: base(MouseButtons.Left, 1, mapScrollPosition.X, mapScrollPosition.Y, 2)
Hope it will helpful
Regards
Amar
|
|
|
|
|
thanks
does you know an helpful article about Custome Event Handler ?
thanks
|
|
|
|
|
Hey Guys,
What is the most effcient way to get data of this string?
$GPGGA,040144.21,,,,,00,02,5.0,,M,-0.582109,M,0.00701,*4B??$GPRMC,040144.21,V,,,,,,,090208,,*1A??$GPGSA,A,1,30,31,,,,,,,,,,,05,05,05*1A??$GPGGA,040145.14,,,,,00,03,5.0,,M,-0.582100,M,0.00701,*44??$GPRMC,040145.14,V,,,,,,,090208,,*1D??$GPGSA,A,1,01,30,31,,,,,,,,,,05,05,05*1B??$GPGGA,040146.23,,,,,00,03,5.0,,M,-0.582100,M,0.00701,*43??$GPRMC,040146.23,V,,,,,,,090208,,*1A??$GPGSA,A,1,01,30,31,,,,,,,,,,05,05,05*1B??$GPGGA,040147.18,,,,,00,03,5.0,,M,-0.582110,M,0.00701,*4B??$GPRMC,040147.18,V,,,,,,,090208,,*13??$GPGSA,A,1,01,30,31,,,,,,,,,,05,05,05*1B??$GPGGA,040148.20,,,,,00,03,5.0,,M,-0.582110,M,0.00701,*4F??$GPRMC,040148.20,V,,,,,,,090208,,*17??$GPGSV,3,1,12,31,75,336,29,01,75,058,26,14,48,104,,30,35,050,25*74??$GPGSV,3,2,12,20,25,310,,16,22,013,,05,18,044,,29,16,013,*7B??$GPGSV,3,3,12,06,15,118,,22,13,166,,12,06,038,,23,04,303,*78??$GPGSA,A,1,01,30,31,,,,,,,,,,05,05,05*1B??$GPGGA,040149.21,,,,,00,03,5.0,,M,-0.582110,M,0.00701,*4F??$GPRMC,040149.21,V,,,,,,,090208,,*17??$GPGSA,A,1,01,30,31,,,,,,,,,,05,05,05*1B??$GPGGA,040150.22,,,,,00,03,5.0,,M,-0.582110,M,0.00701,*44??$GPRMC,040150.22,V,,,,,,,090208,,*1C??$GPGSA,A,1,01,30,31,,,,,,,,,,05,05,05*1B??$GPGGA,040151.22,,,,,00,03,5.0,,M,-0.582110,M,0.00701,*45??$GPRMC,040151.22,V,,,,,,,090208,,*1D??$GPGSA,A,1,01,30,31,,,,,,,,,,05,05,05*1B??$GPGGA,040152.21,,,,,00,00,5.0,,M,-0.509010,M,0.00701,*44??$GPRMC,040152.21,V,,,,,,,090208,,*1D??$GPGSA,A,1,,,,,,,,,,,,,05,05,05*1B??$GPGGA,040153.15,,,,,00,01,5.0,,M,-0.509010,M,0.00701,*43??$GPRMC,040153.15,V,,,,,,,090208,,*1B??$GPGSV,3,1,12,31,75,336,27,01,75,058,,14,48,104,,30,35,050,*79??$GPGSV,3,2,12,20,25,310,,16,22,042,,05,18,044,,29,16,042,*7B??$GPGSV,3,3,12,06,15,118,,22,13,166,,12,06,038,,23,04,303,*78??$GPGSA,A,1,31,,,,,,,,,,,,05,05,05*19??$GPGGA,040154.21,,,,,00,01,5.0,,M,-0.509010,M,0.00701,*43??$GPRMC,040154.21,V,,,,,,,090208,,*1B??$GPGSA,A,1,31,,,,,,,,,,,,05,05,05*19??$GPGGA,040155.18,,,,,00,01,5.0,,M,-0.509010,M,0.00701,*48??$GPRMC,040155.18,V,,,,,,,090208,,*10??$GPGSA,A,1,31,,,,,,,,,,,,05,05,05*19??$GPGGA,040156.14,,,,,00,02,5.0,,M,-0.509010,M,0.00701,*44??$GPRMC,040156.14,V,,,,,,,090208,,*1F??$GPGSA,A,1,06,31,,,,,,,,,,,05,05,05*1F??$GPGGA,040157.16,,,,,00,03,5.0,,M,-0.509014,M,0.00701,*42??$GPRMC,040157.16,V,,,,,,,090208,,*1C??$GPGSA,A,1,06,30,31,,,,,,,,,,05,05,05*1C??$GPGGA,040158.19,,,,,00,03,5.0,,M,-0.509014,M,0.00701,*42??$GPRMC,040158.19,V,,,,,,,090208,,*1C??$GPGSV,3,1,12,31,75,336,27,01,75,058,,14,48,104,,30,35,050,18*70??$GPGSV,3,2,12,20,25,310,,16,22,073,,05,18,044,,29,16,073,*7B??$GPGSV,3,3,12,06,15,118,22,22,13,166,,12,06,038,,23,04,303,*78??$GPGSA,A,1,06,30,31,,,,,,,,,,05,05,05*1C??$GPGGA,040159.21,,,,,00,03,5.0,,M,-0.509014,M,0.00701,*48??$GPRMC,040159.21,V,,,,,,,090208,,*16??$GPGSA,A,1,06,30,31,,,,,,,,,,05,05,05*1C
|
|
|
|
|
Use a regular expression to split each line of text into its constituent parts. Regular expression support is provided by the Framework in the System.Text.RegularExpressions namespace.
See the following link[^] for more information on regular expression syntax in .NET.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
pmarfleet suggested using Regular Expressions. Depending on the speed of the data coming in etc it might be suitable. However read through:
http://www.codeproject.com/KB/vb/WritingGPSApplications1.aspx[^]
Basically you can do some error checking, or the fastest way to split up the data into the various strings would probably be:
string[] individualStrings = sourceString.Split('$');
foreach (string individual in individualStrings)
{
string[] parameters = individual.Split(',');
}
|
|
|
|
|
Theres a freeware library around that pulls these strings apart and gives you the data nicely labelled. Google some more
|
|
|
|
|
Hello,
I am just writing simple threading program in C# program, I am coming from VB.Net and just wondering why my WriteY() function has to be a static. I through this could be public or private.
Can anyone explain why it has to be a static.
Many thanks,
Steve
<br />
using System;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
using System.Threading;<br />
<br />
namespace App1<br />
{<br />
class Program<br />
{<br />
static void Main(string[] args)<br />
{<br />
Thread t = new Thread(WriteY);<br />
t.Start();<br />
while (true) Console.Write("X");<br />
}<br />
<br />
static void WriteY()<br />
{<br />
while (true)<br />
Console.Write("Y");<br />
}<br />
}<br />
}<br />
|
|
|
|
|
|