all groups > c# > october 2005 > threads for friday october 7
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Help with iterating an array...
Posted by Gen at 10/7/2005 11:24:04 PM
Hi - I'm a c# student, as a small class exercise we were asked to write a
program that uses an Average function using the params keyword. My
problem was with the loop, I could only get the Do loop to work. When
trying the for and foreach I got errors (explained below)
for (int i = ... more >>
Inserting an item into a sorted list
Posted by Ryan Graham at 10/7/2005 11:06:56 PM
I totally bombed this question in an interview so I'm posting my answer here
for comments and suggestions... perhaps (god help me) I'm just not that
bright, but this works and seems to be fairly efficent. The idea was simple,
insert an integer into a list that has already been sorted.
private ... more >>
javascript problem
Posted by Morten at 10/7/2005 10:12:52 PM
Hi!
I'm trying to have a button open a Window using javascript. I want to open a
window pointing to a specific URL and close it imediately afterwards. I've
registered a javascript block in my code-behind file and used this code:
Button1.Attributes.Add("onclick", "javascript:popup()");
to ... more >>
checking virtual key range: 'a-z' and 'A-Z'
Posted by farseer at 10/7/2005 7:53:58 PM
if i wanted to check if a virtual key is in the range of 'a-z' or 'A-Z'
is there an easy way to do this in C#?
... more >>
Q: Remote Debugging!
Posted by Visual Systems AB (Martin Arvidsson) at 10/7/2005 7:21:48 PM
First of all, sorry for the cross post, didn't know what NG to lay the
question.
Hi!
I'v been trying to use the remote debugger with Visual Studio 2003.
I came a cross some questions, and perhaps you wiz out there can help me?
1. When i start the debug session, the program executes as e... more >>
Detecting/trapping the shutdiwn event
Posted by Paul Steele at 10/7/2005 6:17:26 PM
Some time ago I tracked down the code for detecting the shutdown event
within a C# program. I tested it, it worked, and I moved on. However, I just
discovered that the code is no longer working, and I'm baffled. I've done
some more Google searches and have come up with the same thing. A portio... more >>
deadlock - retrying the transaction
Posted by Zeng at 10/7/2005 5:17:27 PM
Hi,
The bigger my C# web-application gets, the more places I need to put in the
tedious retrying block of code to make sure operations that can run into
database deadlocks are re-run (retried) 3-4 times and give up if after that
it's still in deadlock. I'm very sure that many experienced peop... more >>
Implement a modal Dialog box in ASP.NET web app
Posted by Ritu Kachroo at 10/7/2005 2:50:57 PM
I need to implement a Dialog box in my Web application.
The dialog box pops up with "OK", "Show Details", "Show Image" buttons
when the user clicks a marked point on a chart. I need to pass the
numeric value of the point into the Dialog Box.
And after the user selects "Show Details" or "Show ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Debugging ScreenScrape Code
Posted by Dan McCollick at 10/7/2005 2:24:59 PM
Hi All,
I have a very small screen scrape application, that has a small
problem. when I run the app and I have fiddler(an http tool to view
what is being sent by the requests/responses,
http://www.fiddlertool.com) the app works, and I am able to login to
the (intranet)website. If do not run... more >>
how to define a pointer to an array?
Posted by Peter Demeyer at 10/7/2005 2:05:22 PM
I can't manage to define a simple pointer to an array.
The following C++ code doesn't work in C# (compiler error: "You can
only take the address of unfixed expression inside of a fixed statement
initializer")
Int32 *pointer;
int []array = new int[100];
pointer = &array[0];
Can anyone plea... more >>
Specified cast is not valid TcpClient TcpListener
Posted by Nuno Magalhaes at 10/7/2005 1:32:03 PM
This code gives me the runtime error "Specified cast is not valid":
MyTcpClient ClientTcp=(MyTcpClient)ListenerTcp.AcceptTcpClient();
MyTcpClient is a class that inherits from TcpClient. Why can't I do
this? Is it possible to get the remote endpoint without have to go to
the underlying socket?... more >>
insert row to Excel using C#
Posted by Tim Wallace at 10/7/2005 1:25:44 PM
I need to insert a row into an Excel spreadsheet using C#. I get a
reference to the app, the workbook, the sheet. When I attempt to call
Insert, I keep getting errors, probably because I'm not certain what the
args are (and cannot find any documentation to help). I supplied the 2 args
as ... more >>
Try catch finally
Posted by Raj Chudasama at 10/7/2005 1:06:00 PM
what is the extent to which you should use them? Shall i include them in
almost all methods ? pleaes direct me to where i can find some more
information
thanks
... more >>
Good brain teaser (real life problem)
Posted by arthernan NO[at]SPAM hotmail.com at 10/7/2005 12:53:28 PM
Let's say I have this class.
public class oompa_loompa: halfling
{
public var automobile;
}
public first_oompa_loompa oompa_loompa = new oompa_loompa();
.
.
.
first_oompa_loompa.find()
Is it possible to call first_oompa_loom... more >>
Easy question
Posted by Rachel at 10/7/2005 12:47:03 PM
My do while works the first time but the second time it breaks at the
len = Convert.ToDouble(Console.ReadLine());
It says that I have an unhandled System format exception. Help!
using System;
using System.Text;
namespace assignment1
{
/// <summary>
/// Summary description for Clas... more >>
Getting DataGrid Sort Column Header Name
Posted by DigHazuse at 10/7/2005 12:21:41 PM
relative noob.
i'm trying to get/display the column Header name that the user clicks
to sort on the DataGrid.
I know that i could take the e.SortExpression and spin through the
Columns on the DataGrid until I found the value that matches the
e.SortExpression and then grab the Header Name ..... more >>
How to refesh a listbox bind to a dataview?
Posted by Alpha at 10/7/2005 12:16:05 PM
I have a listbox with datasource from a dataview. When a user selects a
different item in a combobox then I need to refresh the listbox to the
appropriate listing based on that combobox's selected value which is included
in the listbox's filtering statement.
Is the only way to do this is t... more >>
Compare two arraylists with date values
Posted by godsella NO[at]SPAM gmail.com at 10/7/2005 11:52:09 AM
First i have two stored procedures, i have passed the values of each
one into two different arraylists of dates. how can i compare the two
arraylists of dates?
Thanks in advance
... more >>
Event when a thread ends?
Posted by Anders Eriksson at 10/7/2005 11:42:28 AM
Hello!
I have a form from which I start an thread running in the background and I
want to have an event when the thread is done/ends.
I start the thread like this:
private Thread prT; // this is a member of the Form1 class
// in a Form1 member function I do:
PrintThread prThread = new Pr... more >>
Random Numbers are the same!
Posted by cvnweb NO[at]SPAM gmail.com at 10/7/2005 11:40:24 AM
I am trying to generate 2 random numbers that are diffrent, in order to
add them to existing numbers to generate numbers that start out the
same, but are randomly added and subtracted so that they can go down
similar paths, but not be the same. I will implement code later to make
sure i they go ... more >>
ListView row numbers?
Posted by Andrew S. Giles at 10/7/2005 11:06:02 AM
I am trying to provide a list to the user. This list is the 1st 25 lines of
a given file. I want to provide the line number to the user, before each
line.
I see when I add Columns to a ListView, the way I want it to look. The
numbers appear fixed, and only show up for given lines.
Wha... more >>
What is the best way to create and print reports?
Posted by Gidi at 10/7/2005 10:35:02 AM
Hi,
I'm writing a program that helps manging a store. i have one form that deals
with products selling, in this form the user enters the customers details and
the products which he bought. after the user payed for these products, i want
to print a invoice, and now i don't know which way is th... more >>
UDL Files
Posted by Roger at 10/7/2005 10:01:22 AM
Anyone know how to create and read a UDL file with C#?
... more >>
Uploading Audio File
Posted by SivaprakashShanmugam at 10/7/2005 10:01:04 AM
Hello
Can any one explain me how to send audio file to web server by using Web
Services. I would like to have more security on top of it.... more >>
Datetime.Parse
Posted by Peter Kirk at 10/7/2005 10:00:18 AM
Hi there
I would like some help with parsing date strings to DateTime structures.
I can see that DateTime has Parse and ParseExact methods - but I am not sure
what is best for me to use, and what parameters I need to supply.
I reveive a string from a web-form, which would look something l... more >>
Adding a panel
Posted by Anders Eriksson at 10/7/2005 9:42:08 AM
Hello!
How do I add a panel and get the already existing controls to be included
in the panel?
The only way I have made it work if I create the panel first and then add
the other controls. But often I don't realize that I need to use a panel
until I have done much work and already have cont... more >>
Visual Studio 2005 Beta
Posted by WRH at 10/7/2005 9:41:18 AM
Hello
I have VS 2003 and would like to try the 2005 beta. Can someone tell
me...any conflicts if installed with 2003? Is there any expiry date or
other
restrictions on the 2005 beta?
... more >>
What is the scope of the 'lock' statement
Posted by Brian Kitt at 10/7/2005 9:01:02 AM
I have a need to lock some objects at the process level (making sure multiple
threads do not share an object), and some objects at the machine level
(making sure multiple processess do not share an object).
I believe the scope of 'lock' is at the process level.
I believe the scope of 'mutex'... more >>
PrintPreviewControl - How do I...?
Posted by Tim at 10/7/2005 8:18:53 AM
Hi,
I want to use a PrintPreviewControl instead of the dialog which is too
restrictive. I have found a basic tutorial but I have lots of other
questions:
1. How do I implement next and previous buttons?
2. How do I change the cursor only when it is over the document?
3. How do I implemen... more >>
Animate a propeller
Posted by FredC at 10/7/2005 7:48:05 AM
I'd like to animate a propeller spinning on a form. Any code or tools that
anyboby can point me at? ... more >>
Use reflection to remove and add events
Posted by niteshs NO[at]SPAM yahoo.com at 10/7/2005 7:14:50 AM
Hi all I want to be able to disable all events for controls on my form
at runtime based on a certain condition and then re-add these events
back.
I have been able to view events through the EventInfo[] class
EventInfo[] events =
comboBox1.GetType().GetEvent("SelectedIndexChanged");
and then ... more >>
What's the Difference between 'yield break' and 'break"?
Posted by yyhhjj at 10/7/2005 7:12:06 AM
I created a test program to implement an iterator.
First, I used 'yield break' in the iterator, it worked normally.
Then, I simply used 'break' in the places of 'yield break', it still worked
normally.
What's the difference between 'yield break' and 'break' here?
Thanks!... more >>
How to Schedule a WebForm to Print?
Posted by petemo94 NO[at]SPAM yahoo.com at 10/7/2005 6:51:09 AM
Folks,
I've been tasked to develop a way to have our webform be
automatically scheduled (e.g. once a day at 8PM) and printed to a local
printer without any user interaction besides setting up the time/day.
The original webform was developed in C# but now I need to extend this
to incorporat... more >>
Convert short * to object for use with InvokeMember
Posted by Patrick Ireland at 10/7/2005 6:45:35 AM
I am dynamically loading a class. One of the methods of the class takes
a short * (by reference) argument. However, the InvokeMember call used
to invoke the method of the class passings arguments in and object [].
Since this is a pointer reference being passed it must be invoked in a
unsaf... more >>
Regex to convert "camelCase" into "Title Case"
Posted by Greg Collins [InfoPath MVP] at 10/7/2005 6:07:51 AM
I couldn't find anything in my searches... I'm wondering if there's a =
Regex (with or without additional C# code) that can convert a either =
"lowerCamelCase" or "UpperCamelCase" into a proper "Title Case" (with =
spaces).
Thanx!
--=20
Greg Collins [InfoPath MVP]
Please visit: http://www... more >>
Create an upgrading .EXE with an embedded DLL to overwrite existing deployed DLL
Posted by phobos7 at 10/7/2005 5:23:09 AM
I am trying to create a single .EXE that will upgrade a product by the
doing the following:
1) Detect the location of the current installation (DONE)
2) Upgrade the existing config file (DONE)
3) Overwrite a DLL in the program files folder with a new DLL.
For 3) I was trying to embed a DLL ... more >>
Uniform(...) method
Posted by Curious at 10/7/2005 5:11:46 AM
Hi,
I am writing a class Distribution that inherits from Random class
public class Distribution : System.Random
{
public int Uniform(int min, int max)
{
return this.Uniform(min, max);
}
}
Now I wrote the new Uniform method, and I'm acessing the base method
having th... more >>
converting array of byte data type to string.
Posted by shivaprasad NO[at]SPAM techie.com at 10/7/2005 4:18:44 AM
Hi all,
I am a Beginner to c#.
I Need to convert array of byte data type to string. How to do this..
ex:
byte[] bytes = new byte[1000];
this bytes get filled up. Now I need to convert to string.
How to do this..
... more >>
Transparent textbox
Posted by Jörgen Westin at 10/7/2005 3:51:40 AM
Hi,
Does anybody have a good example on how I can make a transparent textbox
to put on a form?
Thanks
Jörgen
*** Sent via Developersdex http://www.developersdex.com ***... more >>
Printing Client side in ASP.NET
Posted by aniljain50 NO[at]SPAM gmail.com at 10/7/2005 3:18:35 AM
Hi All,
I have a web form. let's say it has 3 fields. Employee No, Name ansd
salary. Now my problem is I want to print the contents of this screen
to a local printer. Note that this is client side printing and not
server side!!
I do not want to print the screen but the contents of the screen
(... more >>
Database permission
Posted by Mike at 10/7/2005 2:40:04 AM
Hi,
I have created a C# web project(asp application) where it should access my
database in my laptop and this the connectionstring that I m using:
mySqlConnection =
SqlConnection("Server=(local);Database=Orchestra;Integrated Security=SSPI");
and it's working in my windows application but in m... more >>
How to access control in child form (MDI app)
Posted by Karl at 10/7/2005 2:12:49 AM
Hi,
I'm just writing my first real c# application and I have a problem
when trying to access a control in a child form.
I am using an MDI application with a parent form called frmMain. In
this code I need to parse some files whose filenames are in an
arraylist. Since this parsing may t... more >>
This keyword
Posted by Dave at 10/7/2005 12:00:00 AM
Hi,
I need a little help in understanding why FxCop complains about this.
If I have a basic class like:
class Class1
{
static void Main()
{
Class1 class1 = new Class1();
class1.Do("Something");
}
public void Do(string PassedInString)
{... more >>
Web Services?
Posted by Fouad Fahim at 10/7/2005 12:00:00 AM
I want to know the differnce between File share and FrontPage !
Regards,
FF
... more >>
how to createCOM component in C#.Net
Posted by TulasiKumar at 10/7/2005 12:00:00 AM
Hi all,
i am new in C#.Net.How to create COM compenent in C#.Net?Any one please help
me.Kindly give me any Documentation.
Thanks in advance
Regards
TulasiKumar
... more >>
Application error! (Common Language Runtime Debugging Service)
Posted by Newbie at 10/7/2005 12:00:00 AM
Hello,
I've encountered the error below: (when running my compiled c# program)
"Application has generated an exception that could not be handled.
Process id=0xfffab7cd(-346163), ...."
What should I do?
Thanks.
... more >>
Com Port
Posted by Simone at 10/7/2005 12:00:00 AM
Hello.
I want to do a demon that is listening strings on Com port (like Hyper
Terminal).
Any Ideas?
Simon.
... more >>
Orcas and .net 3.0 ?
Posted by Jarod at 10/7/2005 12:00:00 AM
Hey
It's just curiosity but is .net 3.0 going to be in Orcas version of Visual
Studio ( 2008 ? ) or it will be just an update like VS2003 for VS2002?
Jarod
... more >>
Qosmio G25 as developer laptop :)
Posted by kids_pro at 10/7/2005 12:00:00 AM
The Qosmio G25 was shipped with Window XP Media Center.
Base on the laptop spec. this laptop is come with great performance.
But if it good to install vs.net 2005 and do some real development on
this laptop? Because this come with --> Window XP Media Center <--
If we do upgrade from Window ... more >>
Start a process as soon as User Logs in
Posted by venkat at 10/7/2005 12:00:00 AM
Hi,
Is there any way to start my own process as soon as the user logs into
computer. I want to run my process as hidden and i need to show it before
logging out of the computer.
Please help me. Better if any one can provide a sample.
Thanks in advance,
Venkat
... more >>
What is manage?
Posted by Newbie at 10/7/2005 12:00:00 AM
Hello,
I always see the term *manage* in c#. What does it mean? Thanks.
... more >>
|