|
Beeeeeeautiful!! Worked perfectly!
Thank you, youjust made my day
Yes, I am the highly suggestable type.
|
|
|
|
|
a very simple way would be to use nested for loops
quick pseudocode:
for (a=0..size)
for (b=0..size)
if array[a] == array[b]
array[b]=""
endif
endfor
endfor
then just check for, and ignore empty strings
--
Help me! I'm turning into a grapefruit!
Phoenix Paint - back from DPaint's ashes!
|
|
|
|
|
Hi,
I'm having problems with the measureString function. I am trying to measure the length of a string the user types into a text box. However, the size in pixels that this function returns is different than what is displayed on screen. This causes a visual overflow from the text box rectangle for some inputs.
I've tried using measureCharacterRanges instead and the same problem still arises. A partial solution is supplied by using the function getTextExtentPoint32. Using getTextExtentPoint32 no input overflows, but some inputs are truncated before the end of the text box.
Do you know of any other function that will supply a full solution?
Thanks,
Shimrit
|
|
|
|
|
Hello,
Iam new to c#
My Problem is something like this.
Create a sample windows application, having 2 textboxes & a command
button
Set the forms controlbox property to True
Write validation event for the 2 textboxes
private void txtpassword_Validating(object sender,System.ComponentModel.CancelEventArgs e)
if (txtempno.Text=="" | txtpassword.Text=="")
{
MessageBox.Show("Please Enter User Id and password","Invalid Data",MessageBoxButtons.OKCancel);
e.Cancel = true;
}
while running the application when the user clicks the button1
the focus is still in 1 of the textboxes, the validation event of the textboxes still fire.
Same is the case when the user clicks the X button on the control box.
i.e validation event is fired and form is not closed
Form Causesvalidation property aslo set flase.
if i write the code in the Form1_closing event then also the problem is not being solved.
This is because the validation event of the textboxes is fired first so the execution never reaches the Form1_closing event.
i need to provide this funcationality in my application,How can i do this?
|
|
|
|
|
Not a 100% sure this will solve your problem, as I dont really understand the question, but just in case its a simple as:
boolean or ||
bitwise or |
if (txtempno.Text=="" | txtpassword.Text=="")
should read
if (txtempno.Text=="" || txtpassword.Text=="")
|
|
|
|
|
Hello ppl... I still trying to build my Remoting Application. And now I need ideas of how to make my communication secure between my web server and my application server (component). Somebody knows how to make it secure? I want to use a TCP Channel. I read some about Trusted Subsystem and I wanna know if this is what I really nedd. Someone has a code of .NET Remoting Trusted Subsystem?
Thank you all....
Wender Oliveira
.NET Programmer
|
|
|
|
|
Hello All,
I have developed some custom contorls for extra functionality such as MyTextBox inherited by TextBox and few others. But whenever i shift the project to some other machine, Forms containing those texboxes either doesn't open showing 'Designer error' or if they openn they dosnt display those controls at design time. (if i run the application it works fine but at design times it misbehaves)
Any Solution?
Thanx in Advance
sorry for my bad English.
|
|
|
|
|
Try to add reference to System.Design.dll... this lib doesn't shows on Visual Studio when you go to Add Reference. So you must to browse it on Framework folder
Wender Oliveira
.NET Programmer
|
|
|
|
|
I've been developing in C++/MFC for around 8 years, and we've decided to finally bite the bullet and upgrade from Dev Studio for VC++6 to the upcoming VS 2005, get to grip with .net and look at C#.
I need to get up to speed fairly quickly, so I make recommendations on where we go and how, so I'm after some material (a book probably) that will lead me along this route.
Can anybody recommend a good book, or even a set of tutorials aimed at my situation?
Thanks,
Mike.
|
|
|
|
|
Troelsen's "C# and the .NET Platform" is my bible - heartily recommend it.
ISBN: 1-59059-055-4
|
|
|
|
|
Congratulations, you have taken a good decision.
If you are in a hurry, but still want to make a firm grounding in C# and .NET just buy these three books and start reading... The last one is more suited as a reference than as a start to end read...
Applied .NET framework programming - Jeffrey Richter
Inside C# - Tom Archer
Professional C# - Wrox
Best of Luck!
|
|
|
|
|
Thanks - I remember Jeffrey Richter from the days when I had to get to grip with the Windows API!
|
|
|
|
|
Is it possible to use server.MapPath in a class file ? Please tell me how to get the relative path in .class file. Help in this regard is appreciated
|
|
|
|
|
|
HI!~
In which situation, you will write a dll assembly and put it in GAC?
And
What is the popular usage of windows registry before save the application setting of user?
|
|
|
|
|
GAC is a .NET special folder version under your windows folder (called assembly) so that all applications that are run in that version of framework can use the DLLs if the DLLs are available registered in GAC.
Deepak Kumar Vasudevan
Personal Web: http://vdeepakkumar.netfirms.com/
I Blog At: http://deepak.blogdrive.com/
|
|
|
|
|
I want to ask, how to know which one is local printer and another is network printer?
PrintDocument printDocument = new PrintDocument();
foreach ( string strPrinter in PrinterSettings.InstalledPrinters )
DropDownList1.Items.Add ( strPrinter );
but I got the result
"Auto HP LaserJet 6L on XP"
"Auto HP LaserJet 1100 on MS"
XP is network computer, MS is server
so how can I know if they are in network printer not local printer?
Thanks
|
|
|
|
|
I try to get the time when the source code is compiled.
The code is :
string filename = System.Reflection.Assembly.GetExecutingAssembly().FullName;
System.IO.FileInfo fil = new System.IO.FileInfo(filename);
string thetime = fil.CreationTime.ToString();
But "thetime" is "12/31/1600 4:00:00 PM". What's wrong with it?
My mathine time is 13/10/2004.
Thanks
vigorous
|
|
|
|
|
Try
string filename = System.Reflection.Assembly.GetExecutingAssembly().Location;
System.IO.FileInfo fil = new System.IO.FileInfo(filename);
textBox1.Text = fil.CreationTime.ToString();
instead.
You are referring to the FullName, which is something like
"WindowsApplication 2; Version blabla; etc. blabla"
and not a path.
You NEED a path, though, or strange things will happen
Cheers
Sid
|
|
|
|
|
I have been given a C# program to maintain and one of the alterations required is to alter the DataGrid display from showing Date only to show Date & Time.
This data originates in an MS SQL database and when I look in debug both the Date and Time are retrieved correctly they just don't display correctly.
Regards,
Alf Stockton
|
|
|
|
|
AlfredCharlesStockton wrote:
they just don't display correctly
That is a bit vague. What do they actually display? What do you expect them to display?
Do you want to know more?
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
|
|
|
|
|
Only the date is displayed and I want to display date & time
|
|
|
|
|
Can someone tell me how to access User Account information via a win 2000 domain?
How now brown cow?
|
|
|
|
|
Hi:
I think you double posted the question. I have answered your other query?
Checkout Windows Principal and I think DirectoryServices should be able to answer your query for domains also.
deepak
Deepak Kumar Vasudevan
Personal Web: http://vdeepakkumar.netfirms.com/
I Blog At: http://deepak.blogdrive.com/
|
|
|
|
|
Thanks that work out perfectly.
How now brown cow?
|
|
|
|