all groups > c# > june 2006 > threads for friday june 9
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
[Proposal] Named and Optional Parameters with Default Values
Posted by cody at 6/9/2006 10:57:58 PM
I got a similar idea a couple of months ago, but now this one will require
no change to the clr, is relatively easy to implement and would be a great
addition to C# 3.0 :)
so here we go..
To make things simpler and better readable I'd make all default parameters
named parameters so that y... more >>
FW2.0 and FW1.1 on the same machine... can I switch from one to another?
Posted by Giulio Petrucci at 6/9/2006 6:17:29 PM
Hello everybody,
I have installed both FW2.0 and FW1.1 on my machine. I started working on
..NET technology just 4 months ago, and I've always been using the 2.0 but
for my last work my boss told me to check if it can run also on machine
having only the 1.1 version installed.
How can I com... more >>
Control handle under the mouse cursor
Posted by Danny at 6/9/2006 4:41:12 PM
Hi
I need to get the handle to the windows control that is directly below the
mouse. This must work on any windows application, win32 and dotnet forms.
The reason is I would like to highlight the window's bounderies if possible,
and change the text in controls that allow it.
For example... more >>
shorthand for T
Posted by Dan Holmes at 6/9/2006 4:32:15 PM
Suppose i have this code:
int value = 0; // TODO: Initialize to an appropriate value
Parameter<int> target = new Parameter<int>(value);
Assert.AreEqual<int>
is there a way i can save "int" in a variable or something so i can make
code that looks more like this?
T t = int;
t valu... more >>
How can I do this with generics please
Posted by Mike Davies at 6/9/2006 4:25:59 PM
Hi,
I want to do this but can;t figure it out! :-( Can I even do it?
public static T Get4Bytes<T>( byte [] ptr , ref int Index)
{
uint ui = 0;
try
{
ui = ( (uint) ptr[ Index++ ] ) << 24;
ui += (... more >>
String.Concat vs String.Format
Posted by ramadu at 6/9/2006 4:25:26 PM
I know its a sin to use strings, lets skip that part...
Which of these is faster and uses less memory?
String.Format("SomeValue='{0}'", m_Value);
or
String.Concat("SomeValue='", m_Value, "'");
- ramadu... more >>
Application Manifest document
Posted by Steve Teeples at 6/9/2006 3:51:25 PM
Can an application manifest document be added to a C# application? If so,
can it be done from within the IDE of Visual Studio 2005?
I want to customize my application's security level ("Administrator level")
and believe it has to be done from within this manifest file that is to be
linked ... more >>
PLS HELP: Using events in inherited classes
Posted by MuZZy at 6/9/2006 3:33:25 PM
Hi,
Consider i have this code:
// ---------------------------------------------------------------------
public delegate void DoSearchEventHandler(Form f, DoSearchEventArgs e);
public class DoSearchEventArgs
{
public String m_sIDColumn;
public String m_sQuery;
public DoSearchEventArgs(St... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Flickering with tab control
Posted by CP Developer at 6/9/2006 2:26:02 PM
I have a tab control in my application, and any time I mouse over or off of a
tab, it flickers. It looks like it is redrawing it (albeit slowly) each time
one of these mouse events are raised.
I would like to eliminate this flicker, but I am not sure what might be
causing it. I noticed the ... more >>
trying to use PointF in a loop?
Posted by Paul at 6/9/2006 2:09:01 PM
PointF is used as part of the fillpolygon method.
The code below is looping through the array count and then creating a new
point based on 2 array list values. One array has the x data points and the
other has the y data points. The problem is I need to change the point name
in the last l... more >>
Copy Stream
Posted by Vai2000 at 6/9/2006 1:46:44 PM
Hi All, I have a class in which one member is Stream. I initialize this
member with a local value of a stream.
Foo o=new Foo();
o.Stream=localStream;
doesn't seems to work. Will I have to do a DEEP Copy? Incase how should I
proceed?
Thanks
... more >>
Syntax question and String Comparison
Posted by Dinsdale at 6/9/2006 1:11:52 PM
I would like to compare a string value to a pre-determined list of
other strings. Is there a simple way to do this in one statements like
this:
if(strMystring.ToUpper() == ("STRING1"| "STRING2"| "STRINGX"))
{}
This syntax doesn't work (and in fact I'm not quite sure what this
statement rea... more >>
If this is obsolete in Fr V2 what replaces it?
Posted by Bob at 6/9/2006 12:30:50 PM
[
System.ComponentModel.Description("Contents in Rtf format"),
RecommendedAsConfigurable(true),
Category("Data"),
Bindable(true),
Editor(typeof(Design.RichTextBoxExtendedRtfEditor),typeof(System.Drawing.Design.UITypeEditor)),
]
Can't figure out what code to use to replace the st... more >>
A theory question regarding XML
Posted by Henry at 6/9/2006 12:09:23 PM
I know it is possible to store dynamic propterties for applications in XML
files. The app.config and the web.config files can be used to store
AppSettings... I am just wondering how far one can go with this technique.
In my case, what I am interested in doing is to store information about
... more >>
How to get the real system date
Posted by Mike9900 at 6/9/2006 11:59:01 AM
How can I get the real system date/time if the user fakes the date, for
example by setting the system date back.
--
Mike... more >>
Flash SWF in Windows Forms
Posted by agileconsultancy NO[at]SPAM gmail.com at 6/9/2006 11:46:24 AM
Hi,
I have a Flash Swf file which is continuously updated in terms of data,
from the DB using Actiona Script and aspx calls.
Well, the question can surely consider only a simple SWF file moslty.
I developed it for Web Applications(asp .net 2.0) and it's working fine
there.
I want to use ... more >>
Split Multiple XML Documents from a Single File
Posted by Matt at 6/9/2006 11:41:20 AM
I have a client that transmits a file to us with many XML documents =
enclosed. The problem is that each is a different format and may have =
different encodings as they contain information from many different =
countries. We can handle all the different documents when they are =
split into si... more >>
Filtering auto-generated code from "Treat Warnings as Errors" and "XML Comments"
Posted by Skip Sailors at 6/9/2006 10:55:50 AM
I want code I write to have XML comments that are correct and I want the
compiler to fail to build is I mess up a comment, but I don't want generated
code to cause a build failure. Is there a way (in VS 2003, especially) to
make this distinction?
TIA
... more >>
How to read config file?
Posted by Brett Romero at 6/9/2006 10:30:20 AM
I'd like to use some of the techniques discussed here for reading a
config file in .NET 2.0:
http://msdn.microsoft.com/msdnmag/issues/06/06/ConfigureThis/default.aspx
Here's my app.config content:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section na... more >>
Windows Service with Microsoft Office PIA assembly
Posted by sokolo NO[at]SPAM gmail.com at 6/9/2006 9:58:55 AM
Hello,
I wrote a windows service application however it is not working. The
service is supposed to enter a new task every 5 sec within Microsoft
Outlook.
Here is the code for application:
public partial class CheckAccountsService : ServiceBase
{
private Timer timer = null;
... more >>
Where to store application expiration date in a trial app
Posted by Mike9900 at 6/9/2006 8:59:02 AM
Hello,
I would like to store application expiration date in a file and store that
file in a secure place, so the application can access the file for all the
users on that computer.
IsolatedStorage is a good technique but it is for the each user only and is
not machine level. Registry ... more >>
Disable Checkbox in TreeView control
Posted by James Lennon at 6/9/2006 7:21:01 AM
Does anyone know how to disable a single check box in a Windows Forms
TreeView control.... more >>
Creating Total Cell in DataGrid not working with Template Field
Posted by daz_oldham at 6/9/2006 6:24:18 AM
(Using C# 2.0)
Hi
I was trying to get a field formatted as currency, but could not do
this in my DataGrid unless I did the field as a template field.
However, when I try to create a total row when the row is databound, I
am just getting back that the value is a zerol length string -
pres... more >>
Using glyphs in C#
Posted by rancidpunx NO[at]SPAM gmx.at at 6/9/2006 5:12:47 AM
Hi!
I want to do kind of an easy thing, but i don't now HOW:
I have a lot of buttons, i want to place glyphs on them!
Unfortunately, i didn't found kind of a "glyph-property", so i don't
know how to do that!
I just thought about writing a class that handles this on my own, but
it's sound... more >>
Collections in .NET (C#)
Posted by mitch NO[at]SPAM bmtmis.demon.co.uk at 6/9/2006 4:26:29 AM
if pc is a collection object (i.e. derives from CollectionBase) and
contains objects which have a GetX() accesser and I do the followingtwo
things:
p = pc[0];
for(int n = 0; n < 100000000; n++)
{
double x = p.Getx();
}
the loops runs in 0.3 seconds
if however I have:
for(int n... more >>
Drag and Drop Outlook Mail Message
Posted by daveward10 at 6/9/2006 3:49:01 AM
I want to be able to drag and drop an Outlook mail message (Outlook 2003)
onto a windows form (C# 2003) so that my application can then save the file
(in the same was as if I were to drag and drop on the desktop). Anyone able
to help me with how to achieve this?... more >>
How to detect if the mouse is inactive?
Posted by Iosy at 6/9/2006 2:49:42 AM
Hi all,
I'm working in a application where I need to detect when the mouse is
inactive outside my form. I mean, I want to detect if the mouse hasn't
move in the last X seconds (2 por example) and in case that it hasn't,
show a menu.
Thanks
... more >>
cast selected value to this.owner... this is a tough one...
Posted by Lars Erik Nes at 6/9/2006 12:50:01 AM
Hi
I can't get this to work.
I have a CustomerForm which display data from several tables in datagridviews.
In another form (opened from CustomerForm), called NewCallForm, i have a
listview with data (same data as for the CustomerForm). When i click in this
listview i want to reposition... more >>
Creating a TextBox Control
Posted by Dinesh at 6/9/2006 12:26:06 AM
Hi
I want an approach(Procedures - steps - logic) on creating a textbox
control. In detail, how should i go for the Painting , handling the key
inputs for that control....
I dont want to implement all of the textbox functioalities.But a good
start for that will help me in proceeding furthur... more >>
Knowing UI Thread
Posted by Tommaso Caldarola at 6/9/2006 12:00:00 AM
How to I can know the UI thread?
I need to do a switch context before to read/write some data.
Inviato da X-Privat.Org - Registrazione gratuita http://www.x-privat.org/join.php... more >>
General Database Question - Tables in Classes - Appended
Posted by Jim Stools at 6/9/2006 12:00:00 AM
Forget the re-post I had my clock set 12 hours earlier
Hopefully this will make some sense.. I have a database that has around 50
tables - I thought about putting each table in a class and the data
connection in a class then I could manage the (tables) classes with one data
connection. The bus... more >>
TableAdapter Insert and SCOPE_IDENTITY
Posted by Ian Semmel at 6/9/2006 12:00:00 AM
The generated INSERT statement in a typed dataset has an INSERT statement
followed by a SELECT statement which gets (I think) the value of the
autoincremented ID.
Question. How do I get hold of this value ?... more >>
why TcpClient.GetStream(), not just a property? Will exception go away next time?
Posted by Ryan Liu at 6/9/2006 12:00:00 AM
Hi,
Why TcpClient has a method TcpClient.GetStream(), not just a read only
property?
By implementing it as a method, does that mean, each time GetStream() could
return a different stream? In other words, is that safe I only call
GetStream() once and set it to a class' variable and reuse it ... more >>
Page_load event executing twice
Posted by puja at 6/9/2006 12:00:00 AM
hi all,
I have this .aspx page for which the Page_load event occurs twice. I found
out while debugging. After searching google, I tried checking with
Page.Ispostback method and also had "AutoEventWireUp" = false and also run
after removing this tag from page directive but still my page_load... more >>
|