I am writing an application that checks if the computer is connected to one particular network or not, and does some magic for our users.
The application will run in the background and perform the check if the user requests it (menu in tray). I also want the application to automatically check and do magic if the user changes from wired ...
I have the below code, which works, to draw a border around a control in a WinForm 3.5 app.
What I can't figure out is how to THICKEN the border that is being drawn. I tried Inflate(5,5) on the ClientRectangle but that actually made the Border disappear all together versus making it thicker.
I get the impression that I actually need...
A supposedly proven technique to turn UserControls of a website into reusable server controls while retaining the ability to use declarative code gives me a NullReferenceException on any reference of any control that's declared inside the ASCX code.
When calling the ASCX from the same project, this problem does not occur.
The idea is t...
I have a panel that renders a special header, this works all fine and good - but when I dock other controls inside of that panel, they size to fit underneath the header.
My thought was to try and catch this and control it somewhere. Getting the DisplayArea doesn't work - then the header doesn't draw in the right place. Is there any way...
Need to store the username and password for an outside application inside of a windows forms vb.net app. For initial testing, I just set the settings type to "Text", but want more security.
There are System.Security and Encryption types available, but not sure where to begin. Any suggestions on how to Add, Update, and Delete the values...
Hi ,
I want to develop a server which will listen on some specific ports to receive requests from device.While processing a request following steps are followed.
Read data from socket stream(sent from device)
Parse byte data in to business objects
Use business objects process request using database through ado.net layer
Send response i...
Hi,
my XAML is
<TextBox Name="DutchName" HorizontalAlignment="Right" Text="{Binding customer,Path=DutchName }" />
my class is
class customer
{
Name name;
}
class Name
{
string DutchName;
string EnglishName;
}
The textbox is not binded.
Any one correct the error plz.
Thanks,
...
Hi,
Say I have an object,
Class A<T, T2>
{
public T MyObject {get;set;}
public IList<A<T2>> MyChildren {get;set;}
}
Problem is, sometimes I dont have children, so I dont want to declare the children type aka T2, any idea? I cannot pass in like
A a = new A<string, Nullable>(); as it is throwing an error.
Thanks
...
I have a WinForm App(.Net 3.5) that we use in house for data entry...ish, like things. Member Plans, Demographics, etc. The App has a Shell Form with all the navigation and then embeds a UserControl based on there navigation choices.
I need to be able to tell if they have made any changes in any of the controls so that I may pop up ...
I currently have the following:
public IEnumerable<News> NewsItems
{
get { return from s in News.All() where s.Description.Contains(SearchCriteria) || s.Summary.Contains(SearchCriteria) select s; }
}
The problem is I only need to return the one property that actually has the data as well as the Title proper...
I am trying to implement some very simple Data Binding in my User Control that runs in a WinForm app. The User Control is extended like so -->
public partial class ucDiagnosis : XtraUserControl, INotifyPropertyChanged
Then on that User Control I have this Property -->
private string m_Pets;
public string Pets
{
...
Hi,
I would like to define a constrait on my custom (PostSharp) attribute. My goal is to get error or warning while compile time, if class X dont implements Y interface but it has my attribute.
So this should work:
[MyAttributeOnlyForY]
public class X : Y { ... }
but this should break the compile process:
[MyAttributeOnlyForY]
publ...
Hi,
I have a button which is not working when placed below two panels. If I move it above the panels, it works.
It works either way in Firefox. It does not work in IE 8
The button runs this code
protected void Button2_Click(object sender, EventArgs e)
{
panelForm.Enabled = true; //input panel
panelOutput.Visib...
Hi, I'm using MVC ASP.NET 3.5 and I'm trying to delete a folder with all files within using standard .NET method that I've always used in .NET 2.0.
I found this but the first answer doesn't seem to work.
I've tried this one
try
{
Directory.Delete(path, true);
}
catch (IOException)
{
Thread.Sleep(0);
Directory.Delete(path, t...
I'm trying to convert DataTable to Linq
using
DIm result = From r in dt.AsEnumerable()
Select new ( col1 = r.Field<integer>("id"), col2 = r.Field<string>("desc"))
But i get error near 'new (' saying type expected.
What is wrong with this query?
...
I'm trying to setup an SAP Web Service that would be consumed by a .NET application. Thinking it was simple, I had set the Service up in SAP to use HTTP. I right-click on the "Service References" in the .NET Project Tree, and choose "Add Service Reference...", Enter the WSDL URL locally hosted on our servers, and press Go, then select ...
Hi folks,
I have a problem with one of my ICollectionViews. The ICollectionView's CurrentChanged event i not firing.
Please see my code below.
XAML:
<!-- Publication -->
<TextBlock Name="tbkPublication" Text="{x:Static abConst:Print.tbkPublicationText}" Grid.Row="0" Grid.Column="0" Margin="3" ></TextBlock>
...
I have a page that makes an HTTPWebRequest to an external system. The external page processes the request and fires some events on its side. I get the "The underlying connection was closed: An unexpected error occurred on a receive." error when the events are fired. If I remove the events from the page, everything works fine. I am thinki...
I have a winform app that we use in house. It has many individual controls on each of it's 25 "pages"(usercontrols). Our user base prefers very technicolor apps...they want a TextBox to be outlined Blue if it is a required field (color should go away if data entered). They want a TextBox to change to outlined Green if data has been ch...
Hi,
I am using Visual Studion 2008, Framework 3.5 SP1. I have an assembly in which I have Strings.resx file. This file contains serveral strings. All over this assembly, I just get my strings back using "Strings.MyString" as it generates a CLR class. It compiles fine and no issues. But when I try to use this assembly in other solution, ...