Is there a method to obtain the (x, y) coordinates of the mouse cursor in a controls DoubleClick event?
As far as I can tell, the position has to be obtained from the global:
Windows.Forms.Cursor.Position.X, Windows.Forms.Cursor.Position.Y
Also, is there a method to obtain which button produced the double click?
...
I need to produce a web service that looks to the client side like a file system. I will need the client to be a able to:
load files
save files
access meta data about files
use username/password
The reason I don't want to just host static content is that:
some of the content will be virtual.
some of the meta data will be non standa...
Title says it all. I want to be able to work with system stored procedures (sp_helpXXX etc) through generated Linq-To-SQL or Entity Framework wrappers. Problem is, system sprocs are not listed in the generation wizards. I have also tried running sqlmetal.exe manually, but no system stored procedures show up.
...
I've written a winforms application that is deployed as a setup/msi install. The main reasons for not using ClickOnce deployment are:
Need persistent data storage in the directory of the app
Need to be able to install for "all users"
At the moment, the application uses "one .exe to rule them all". Essentially, the "program files" d...
Does any one know how I can specify the Default value for a DateTime property using the System.ComponentModel DefaultValue Attribute?
for example I try this:
[DefaultValue(typeof(DateTime),DateTime.Now.ToString("yyyy-MM-dd"))]
public DateTime DateCreated { get; set; }
And it expects the value to be a constant expression.
This is in ...
I am migrating C# code from using a NetworkStream to SSLStream, however where I use stream.DataAvailable I get the error:
Error 1 'System.Net.Security.SslStream'
does not contain a definition for
'DataAvailable' and no extension
method 'DataAvailable' accepting a
first argument of type
'System.Net.Security.SslStream' could
...
I have a window application, it calls a web service to get information. One of the functionalities of the window application is to go to a web page. In this web page, it’s looking for cookies on the client machine, and logs them in if the cookies is valid.
What I was trying to do is to create the same cookie on a web service call. ...
Hi,
I just built a asp.net 2.0 web site. Now I need add REST web service so I can communicate with another web application. I've worked with 2 SOAP web service project before, but have no experise with REST at all. I guess only a coupleweeks would works fine. after googling, I found it's not that easy.
This is what I found:
There is N...
I have 2 IEnumerable<int>
IEnumerable<int> x;
IEnumerable<int> y;
What is the best best way to determine if any int in y is present in the x?
Currently I'm using:
return x.Intersect<int>(y).Count() > 0;
Would it be significantly faster to loop through and test each individually?
foreach (int i in x)
{
foreach (int j in y)
...
My WPF application gets a file from the user with Microsoft.Win32.OpenFileDialog()...
Private Sub ButtonUpload_Click(...)
Dim FileOpenStream As Stream = Nothing
Dim FileBox As New Microsoft.Win32.OpenFileDialog()
FileBox.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
FileBox.Filter = ...
I'm new to ASP.NET and have a form tag on an ascx user control. I'm unable to submit the form from javascript because I found out that this form is nested inside a form called 'aspnetForm'. If I just want to make a post to a cgi, how can I accomplish this?
...
Is this code correct or is there any possibility of some random threading deadlocks etc?
Is it a good idea to use static properties and locking together? Or is static property thread-safe anyway?
Private Shared _CompiledRegExes As List(Of Regex)
Private Shared Regexes() As String = {"test1.Regex", "test2.Regex"}
Private Shared RegExSet...
Is there a predefined or "easy" method of writing a datatable to a text file or TextBox Control (With monospace font) such as DataTable.Print():
Column1| Column2|
--------|--------|
v1| v2|
v3| v4|
v5| v6|
Edit
Here's an initial version (vb.net) - in case anyone is interested or wants to build their...
How can I communicate through an HTTP proxy with TcpClient in C#, kind of like WebProxy when using HttpWebResponse?
...
Using the .NET Membership Provider and trying to re-create an Add User page which has been used by other developers (the actual developer has left my company). But while most things work, like editing users, I can't add a new user because this wizard is marking all emails as invalid. I don't know how to update the configuration of the pr...
Hi,
I am trying to integrate 3D Secure to my customer's e-shop.
I need to post some data to 3DGate and get the returned result from it.
I have used WebRequest for this, i have posted the data successfuly but the returned data is an Html Text which has a form in it and some inputs in the form. I need to read these values like Request.Fo...
On the Mac there's a really nice library called Sparkle that programs can use to implement the checking/install functionality for auto-updates.
Is there anything similar out there for .NET? Or just regular Win32?
Cheers,
...
I have a data input module where I add the information of my product and its sub information like:
product basic info
product price info
product price details
price info and price details are related to product and are lists
In my web forms approach I would store my main product object on the view state and I would populate it's prici...
System.Diagnostics.Process proc0 = new System.Diagnostics.Process();
proc0.StartInfo.FileName = "cmd";
proc0.StartInfo.WorkingDirectory = Path.Combine(curpath, "snd");
proc0.StartInfo.Arguments = omgwut;
And now for some background...
string curpath = System.IO.Path.GetDirectoryName(Application.ExecutablePath);
omgwut is something l...
In .net, unlike in Java, methods are not virtual by default. In order to use most mock object frameworks, you either have to mark the methods that you want to use on your mock as virtual on the `real' object, or you have to have an interface that you can mock that the class under test will accept in lieu of the implementation.
It seems...