|
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
|
|
|
|
|
how can i cheack listViewItems by item.Text.....????
foreach(string path in dlg.fileNames)
{
if (listView1.Items.Find(path, fales) == null )
{
my method.......
}
}
A S E L A
|
|
|
|
|
ListView.FindItemWithText()
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Lol, what a perfect method name!
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
I'm trying to write a windows mobile program that shows data in a grid. I'm using the DataGrid control to display the data. I want to change 1 cell and make the font larger and bold.
How do I do this?
|
|
|
|
|
i'd like to get my code executed from case 1 to case 3, but i got this error . Here are my codes :
int State = 1
switch (State)
{
case 1:
a=1;
a++;
State++;
case 2:
State++;
case 3:
a=0;
}
Thanks
|
|
|
|
|
No, you can't fall through from one case/default into another one.
You can only break or change the program flow somehow, e.g. return, throw, and goto.
IMO goto and label can be acceptable inside a switch.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
You can't drop through a case, but you could always include it inside a loop, so each case is executed until the value is outside of the maximum.
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
I have searched probably entire google results but didnt get any appropriate solution.
using these links, is only the way ?
http://www.whatismyip.com/automation/n09230945.asp[^]
http://www.geekpedia.com/ip.php[^]
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Is any thing in this CP article Finding IP Information[^]helps?
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
nope, its local ip address
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|