|
really thanks alot for ur help again!!
I have gotten one part of it..I went to the website that u have gave me..but this time round I have to display a button 'advanced' to provide more options to the user..I have searched a while but so far I have nothing..
do you have any idea on how I can do it?
|
|
|
|
|
I also read that article,....
It was getting much harder than what I expected...
But Ya , when I was searching for something what I can understand (Really , I ws not able to understand much of that given in MSDN). I came accross a very good article being posted on this site...
It was on custom color dialog box.. where he inserts a slider button which changes the alpha value of the color.. And I found it much interesting and usefull...
And according to your requirement, you need something added to default, if one can add a slider you can also get some very good things from it...
but ya you might need to do some Research and just go for try and error in font dialog...
The link is :
http://www.codeproject.com/KB/graphics/Custom_Color_Dialog_Box.aspx[^]
Hope it helps you. . .
|
|
|
|
|
hmm..okay..I will look through the article you have provided and try it out..maybe it just works..
thanx for your help all this while!
|
|
|
|
|
|
Hi all,
Is it at all posible to make use of the value of a textbox within the report(.rdlc file)?
If I can give an example:
Lets say you want to get hold of the value that is stored in textbox10 within the report and make use of it in a calculation (Expression window).
How can I get hold of the value that is stored within the report textbox?
Many thanks in advance
Kind regards,
The only programmers that are better C# programmers, are those who look like this -> |
Programm3r
My Blog: ^_^
|
|
|
|
|
Within the expressions window enter the following:
ReportItems("textbox").Value
Or see this[^] web site.
The only programmers that are better C# programmers, are those who look like this -> |
Programm3r
My Blog: ^_^
|
|
|
|
|
I want to compare two objects of different versions and display there differences in UI.
First I call a method to know if there is any difference between the two objects
The method is as -
public bool AreEqual(object object1,object object2, Type comparisionType)
If the above method returns true
I call GetDifferences method to get the differences which is as -
public ObjectDifference[] GetObjectDifferences(object object1, object object2, Type comparisionType)
{
ArrayList memberList = new ArrayList();
ArrayList differences = new ArrayList();
memberList.AddRange(comparisionType.GetProperties());
memberList.AddRange(comparisionType.GetFields());
for (int loopCount = 0; loopCount < memberList.Count; loopCount++)
{
object objVal1 = null;
object objVal2 = null;
MemberInfo member = ((MemberInfo)memberList[loopCount]);
switch (((MemberInfo)memberList[loopCount]).MemberType)
{
case MemberTypes.Field:
objVal1 = object1 != null ?((FieldInfo)memberList[loopCount]).GetValue(object1):null;
objVal2 = object2 != null?((FieldInfo)memberList[loopCount]).GetValue(object2):null;
break;
case MemberTypes.Property:
// object temp = ((PropertyInfo)memberList[loopCount]).
objVal1 = object1!= null ?((PropertyInfo)memberList[loopCount]).GetValue(object1, null) :null;
objVal2 = object2 != null? ((PropertyInfo)memberList[loopCount]).GetValue(object2, null):null;
break;
default:
break;
}
if (AreValuesDifferentForNull(objVal1, objVal2))
{
ObjectDifference obj = new ObjectDifference(objVal1, objVal2, member,member.Name);
differences.Add(obj);
}
else if (AreValuesDifferentForPrimitives(objVal1, objVal2))
{
ObjectDifference obj = new ObjectDifference(objVal1, objVal2, member, member.Name);
differences.Add(obj);
}
else if (AreValuesDifferentForList(objVal1, objVal2))
{
ObjectDifference[] listDifference = GetListDifferences((ICollection)objVal1, (ICollection)objVal2,member);
differences.AddRange(listDifference);
}
else if ((!AreValuesEqual(objVal1, objVal2)) &&( objVal1 != null || objVal2 != null))
{
ObjectDifference obj = new ObjectDifference(objVal1, objVal2, member, member.Name);
differences.Add(obj);
}
}
return (ObjectDifference[])differences.ToArray(typeof(ObjectDifference));
}
public class ObjectDifference
{
private readonly object objectValue1;
private readonly object objectValue2;
private readonly System.Reflection.MemberInfo member;
private readonly string description;
public object ObjectValue1 {
get { return objectValue1; }
}
public object ObjectValue2 {
get { return objectValue2; }
}
public System.Reflection.MemberInfo Member {
get { return member; }
}
public string Description {
get { return description; }
}
public ObjectDifference(object objVal1,object objVal2,System.Reflection.MemberInfo member,string description)
{
this.objectValue1 = objVal1;
this.objectValue2 = objVal2;
this.member = member;
this.description = description;
}
For each difference I create an object of type ObjectDifference and add it to the array. The highlighted portion is the one where I am stuck! If the object contains another complex object, My program does give me the differences but I dont know which type it belonged to
For example I have two objects of type Name
class Name{
string firstName;
string LastName;
List<phonenumber> phNumber;
}
class PhoneNumber{
string officeNo;
string MobileNo;
string HomeNo;
}
while comparing two objects the output I get is plain -
firstname - John Mary
LastName- cooper Lor
officeNo - 22222 44444
MobileNo - 989898 089089
HomeNo-- 4242 43535
The Hierarchy that officeNo is of type PhoneNumber is lost. which is important for me to display
How should I maintain this type of tree while creating differences.
Hope I am able to make my problem understood.
|
|
|
|
|
Hi,
A DLL is reffered in a windows application, the dll contain a form. When i call the dll the form is opened. When i close the Form in the dll, i need to pass a value back to the windows application to identify the dll is closed. How can i get the notification?
Thankyou,
YPKI
|
|
|
|
|
There is an event called "Closed". You can hear of that event.
MyForm myForm = new MyForm();<br />
myForm.Closed += new EventHandler(myForm_Closed);<br />
myForm.ShowDialog();<br />
<br />
...<br />
private void myForm_Closed(object sender, EventArgs e)<br />
{<br />
}
|
|
|
|
|
Hi all
I know its stupid but no way out.
lets say
I have 2 forms. activity is...1 form hide another open...vice versa
I have some restriction here. i cant use any button to exit.
I just have only way to click the cross on the top right side of forms.
By clicking cross it will exit all forms.
But now in my program its not working because another form is hidden.
I have to stop it manualy.
Any suggetion pls
Thanks
|
|
|
|
|
On Form_ClosingEvent just write Application.Exit();
This will exit the whole application
|
|
|
|
|
should I mention anything in form.Designer.cs file for handler?
|
|
|
|
|
Just select the form ...
SElect the properties, and go for events...
In events list you may find Form_Closing or Form_Closed event..
Take any one as per your requirement..
Double click there the event will be generated in your class file. .
|
|
|
|
|
Thanks a bunch friend...
i have learned many things by this.
|
|
|
|
|
|
I am using Environment.OSVersion for geting the Operation system version. My application is running on Microsoft Windows XP Professional Service pack 2.
when i try to retrieve the os version see the code snippet:
log.Info("ASET OSVersion=" + Environment.OSVersion);
i am getting the following output:
2009-03-12 14:18:40,483 [INFO ] [3528] - ASET OSVersion=Microsoft Windows NT 5.1.2600 Service Pack 2
The output should be Micorsoft windows xp , but here it is giving some thing else.
Can any one help me in this regard?
|
|
|
|
|
AFAIK XP is recognized as NT platform only. I don't remember it exactly but I think it the OS is determined by 'Environment.OSVersion.version.Minor'. I think if the minor value is 3 it is XP. (I'm not sure...try google)
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
You need to extract the product name from Environment.OSVersion.Version.Minor property. If it is 1 then it is XP. All the codes can be found here[^].
IMO to know if it is XP professional or home, you will need to use GetVersionEx by P/Invoking win32 api.
|
|
|
|
|
can anybody gives me some case in ASP.net about how to creat a comment system that real-time displays what client just post.
this kind of comment system seems poplar.
thanks.
|
|
|
|
|
peacefulheart wrote: poplar
Why do you want a comment system involving trees?
peacefulheart wrote: ASP.net
We have an ASP.Net forum. Use it; you'll fit in much better and feel so much cleverer
|
|
|
|
|
Hello,
In my project there is one requirement related to groove, we want to import files in Issue Tracking tool in Groove programmatically using dot net or with any technology.
I have downloaded Groove Web Services Development Kit from below link.
http://www.groove.net/solutions/develop/downloads.cfm and I have seen that there is no API available for importing a file in Issue Tracking tool.
(Even I have checked on Microsoft site also for available Web Services http://msdn.microsoft.com/en-us/library/bb290979.aspx )
So will it be possible to develop application which can import files in Issue Tracking Tool of Groove?
If you have API for it then could you please provide it to me? Or if there is any other way then also please revert.
Thanks!
Regards,
Vibhuti Patel
|
|
|
|
|
Hi,
I have 2 forms. Form1 contains a DataGridView and Form2 contains the textboxes and dropdownlists etc.
I need to click on a record on form1 to display that record in form2. I have created a property and if I run the app the property gets set but when it moveds to form2 the property is set to 0. What am I missing?
Here is my code on form1 (This form contain the datagridview):
private int _employeeId;
public int EmployeeID
{
get { return _employeeId; }
set { _employeeId = value; }
}
EmployeeID = int.Parse(this.dsWBGTS.Person[1].LocalId.ToString());
this.personTableAdapter.FillByLocalId(this.dsWBGTS.Person, EmployeeID);
Here is my code for Form2 (This form need to display the record selected in form in):
frmDashboard = new Dashboard();
dashboardForm.personTableAdapter.FillByLocalId(this.dsWBGTS.Person, dashboardForm.EmployeeID);
Illegal Operation
|
|
|
|
|
Hi,
I need some help for implementing single-sign-on in an asp.net web application.
Currently, we have a login page. Username is 1st checked in SQL Server 2005 database, after that credentials are checked in LDAP.
If authenticated, then User is allowed to enter the Main Page.
Now, we need to implement single-sign-on i.e. once the User provides the link of the application, internally User's windows login credentials should be checked against LDAP and authenticate the User.
There should not be any login page.
I an able to get the Windows login Username and IsAuthenticated value, but not the password.
Has anyone implemented this?
Can anyone share the code for my reference.
|
|
|
|
|
Siffon wrote: Username is 1st checked in SQL Server 2005 database, after that credentials are checked in LDAP.
So you are authenticate user twice. Why?
Siffon wrote:
Now, we need to implement single-sign-on i.e. once the User provides the link of the application, internally User's windows login credentials should be checked against LDAP and authenticate the User.
There should not be any login page.
Windows credentials always check with your AD only.
Siffon wrote: I an able to get the Windows login Username and IsAuthenticated value, but not the password.
No, You can't read password from Active Directory. Only can authenticate.
As, this is a web application, you can control it from bowser itself.
Tools -> Internet Option -> Security Tab -> Click on Custom Level -> Settings [ Scroll to User Authentication Section ], select Automatically login with current user name and password.
It will take the current user credentials and will login to your application when then hit the url.
But why? If some one else want to login from other system what will happen ?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Dear All,
I have an application which connects to remote machine. I want to check the behavior of this application when remote machine is suddenly restarted. For this purpose, i have to physically access remote machine and restart it. After that i check how my application behaves.
By restarting the remote machine, i am actually making that remote machine inaccessible. Now i want to do it programatically so that i don't need to physically connect to remote machine to restart it.
How can i make a "remote" machine inaccessible from my local box for a certain time ? I want to do it programatically. By making remote machine "inaccessible" doesn't necessarily mean that i restart it. What i want to do is to just temporarily make it inaccessible from my local box.
Imtiaz
|
|
|
|