i am using .net winform. based on my string it will focus the drop down value.
ex.
my dropdown have select value ..if i pass select as a value it should focus the select option in dropdown .
...
I found the following example to download web page(string) asynchounously:
let getImage (imageUrl:string) =
async {
try
let req = WebRequest.Create(imageUrl) :?> HttpWebRequest
req.UserAgent <- "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)";
req.Method <- "GE...
I have a partial answer. Starting with:
newHeight = Height * cos(radians) + Width * sin(radians)
newWidth = Height * sin(radians) + Width * cos(radians)
I can reverse the equations to get:
temp = sqr(cos(radians)) - sqr(sin(radians))
Height = newHeight * cos(radians) - newWidth * sin(radians) / temp
Width = newWidth * cos(radians)...
When making HTTPS request to remote web server, I use WebRequest, which establishes secure connection with remote web server. During development, I use self-signed cert on server, and WebRequest fails to establish secure connection, since cert is not valid, which is expected behavior.
I have found this code that "remotes" cert check, ac...
I'm developing a Windows service which will run at a specific time every day. What will happen if multiple users are logged in to that machine? Will it run 5 times at the same time if there're 5 users logged in? If it does, is there a way to prevent it?
...
I'm trying to index the GAC and use the ResolveAssemblyReferences target. However, some assemblies (such as Unity application block) seem to be missing from the GAC and yet VS happily shows them in the Add Reference dialog. My question: how can this be? I always thought that only GAC-registered assemblies appear there. Am I missing somet...
I am working with windows workflow in VS 2008. I need a condition builder to set my rules.
The Rule Editor provided by microsoft in WF is good , but we need a simple editor which can be customized. Is there any open source Custom Rule Editor is available for .net ?
...
I was reading an article at msdn about reflection but i was not able to understand it even 10% about its benifit, its usage.
Could you please provide some brief overview what is reflection and how can i take benefit from it.
...
What I want to have is a box that displays a list of messages in chronological order (most recent at the bottom) like is common in FTP apps and IDEs. Here's the FileZilla message log:
At the moment, I'm getting similar functionality from a read only text box, but this isn't perfect.
Bonus points for the following:
Context menu has ...
When a WPF applications starts, it has some standard settings that are applied to determine how text and numbers will look. Is there any way for me to change these default settings programatically?
For instance, the FontNumeralAlignment documentation on MSDN states that a value of "Normal" means that "Default numeral alignment is used"....
How do I define DataContract for abstract classes in WCF?
I have a class "Person" which I communicate successfully using WCF. Now I add a new class "Foo" referenced from Person. All still good. But when I make Foo abstract and define a sub class instead it fails. It fails on the server side with a CommunicationException, but that doesn...
For example, I have created a button with a check mark drawn on it. I need to use it in a couple places in my window.
<Button Width="25">
<!-- Draw a Green checkmark -->
<Polyline Points="2,5,6,10,13,1" Stroke="Green" StrokeThickness="4" StrokeLineJoin="Round" StrokeStartLineCap="Round" StrokeEndLineCap="Round" />
</Button>
...
I am working with the lotus notes smtp server and i need to send mails to lotus notes mail groups, which are not standard mail addresses, for example:
mail.To.Add("#Team Mailing List");
I know that the smtp is able to accept this, but how can i make .net play ball, anyone tried this?
I want to avoid using the domino interop if possib...
I have a system that has three applications (one windows application and two web applications). These applications all share two assemblies in common. Therefore, I have 5 projects in total. In the past, I have had a separate solution for each project. This allowed me to version each assembly individually in source control. However, ...
How can I undo changes when a SaveChanges() doesn't succeed ?
contextObject.Toto.AddObject( new Toto());
try
{
contextObject.SaveChanges();
}
catch
{
// Undo changes !
}
In this sample, I'd like to remove the new Toto object in memory. I don't want to remove it manually. I'd like to synchronize my contextObject to my databa...
I have the following code that loads the xhtml_transitional.xsd file (source at http://www.w3.org/2002/08/xhtml/xhtml1-transitional.xsd)
private static void SetupSchemas()
{
if (_xmlSchemaSet != null) return;
_xmlSchemaSet = new XmlSchemaSet();
_xmlSchemaSet.ValidationEventHandler += ValidationHandler;
...
I am developing windows application, in which there are 3 buttons, 1 for browse, 1 for upload a file in sql server database and 1 for download the file from the database.
there is 1 combobox which shows the uploaded file of database, the user can select that file. I want to download that selected file.
Is it possible?
if yes then how?
pl...
I have a solution with several projects:
MyLibrary (a VB.NET dll)
.dll
app.config
MyService (C# Windows Service with ProjectInstaller)
.exe
app.config
MyGui (C# WinForms app)
.exe
I've added a setup project and added primary outputs of all three projects. I've added all three project outputs to custom action section. The thi...
I have a WCF svc separated into a Service Layer, Business Logic Layer and Data Access Layer.
When my DAL encounters an exception, should I catch it there or let it bubble back up to the Service Layer? And why?
Please disregard any client involvement for this scenario, I am only concerned with logging the exceptions on the WCF svc.
...
I have a class that has an internal list of other objects like so:
public class Parent
{
List<Child> _children;
}
where Child say looks like this:
public class Child
{
public string Name;
}
What I want to do is set up parent where the members of _children can be accessed like so:
...
Child kid = parentInstance["Billy"]; //...