all groups > c# > october 2007 > threads for friday october 12
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
Include file with System.Reflection
Posted by porter at 10/12/2007 11:52:45 PM
I am very new to C#. I have a block of code (a web control) that I
want to include a file. In my mind, I want to include it in-line,
like php would include a file -- execute any code and then render
html.
But, i've been reading and it sounds like thats not the case with C#.
Im not opposed t... more >>
Handlers for Form Changes
Posted by Liz at 10/12/2007 10:12:19 PM
I have a form with about 25-30 TextBoxes, ComboBoxes, etc; if the user does
not make any changes to the form I don't want to post a "Cancel Changes?"
dialog when they exit the form ... so this is what I'm doing to detect
changes:
// this gets called from the Form_Load event han... more >>
Simple Dailog
Posted by Martijn Mulder at 10/12/2007 9:43:05 PM
A simple dialog that pops up after a menu choice "Set Values..." (for
example), should it inherit from System.Windows.Forms.Form or simply
from System.Windows.Forms.CommonDialog? Problem is that I can hardly
find examples on the latter... more >>
Thread.yeild
Posted by Benjamin The Donkey at 10/12/2007 8:13:55 PM
Is there something in C# that is similar to Java's Thread.yield?
Currently I am using the 1.1 framework.
... more >>
Winforms and memory usage
Posted by deerchao at 10/12/2007 7:07:15 PM
I'm developing a WinForms application. It slowly eats up memory, one
client reported that it took 200MB or more, and finnaly crashed. I
myself noticed it's common to use up 30MB memory, but if I minimize it
(all the Forms will Hide, only a NotifyIcon is shown at the System
Notification Area), th... more >>
Using API to shutdown a PC
Posted by greatbarrier86 at 10/12/2007 6:51:01 PM
I've already got the code written but for some reason, when i click the
button, nothing occurs. Here is the code.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Sys... more >>
Problems with xslt transform
Posted by Markus Schneider at 10/12/2007 6:25:06 PM
Hello,
I have the following problem while working with files in asp.net (c#).
Here I create a new XML File with an xslt transformation:
xslt.transform("source.xml","dest.xml");
when I know want to work with "dest.xml", for example do this:
doc=new XPathDocument("dest.xml");
... more >>
Parameter as reference but I am not using "ref"
Posted by Everton Berz at 10/12/2007 4:22:42 PM
Hi,
In the follow program I would like to have the parameter "c" in method
"doSomething" as a value parameter, but it's running as a reference
parameter. Why? How can I get parameter "c" as a value (or clone,
copy)?
Current result:
value1
value2
Expected result:
value1
class Progr... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
How Can I Determine what type of IOException occurred?
Posted by Rymfax at 10/12/2007 3:55:30 PM
I've created a Download Manager application and I'm having a problem
with some clients where for whatever reason, the remote connection is
forceably closed (whether on the client side or server side I'm not
sure).
What I want to do is catch the specific IOException that deals with
the that on... more >>
Copy Items from a Generic List into multiple Generic Lists
Posted by Sam Shrefler at 10/12/2007 3:22:10 PM
I have two List<Order> and List<OrderDetails>
Order looks like this:
{
int orderID
List<OrderDetails> details
orderTotal
orderDate
...
}
I have a List that contains ALL OrderDetails and looks like this:
{
int orderID
Details details
...
}
What I'm looking to do p... more >>
PropertyGrid: CategoryAttribute + BrowsableAttributes
Posted by Marco Segurini at 10/12/2007 2:45:14 PM
Hi All,
I have a form containing only a PropertyGrid that I use to modify an
instance of the following class:
class MyClass
{
Point _point = new Point();
[CategoryAttribute("Drawing")]
public Point MyPoint
{
get { return _point; }
... more >>
unc to dos conversion
Posted by DBC User at 10/12/2007 2:44:35 PM
Hello,
Is there a native way to convert the UNC path to DOS drive path other
than using wnetgetconnection? I hope it is there ...
Thanks
... more >>
what TreeView event ??
Posted by Jeff at 10/12/2007 2:40:51 PM
Dear reader of this message :)
..NET 2.0
I want to add some code to an event on a TreeView control I got on a form,
which is triggered when a treeviewitem get selected
what event should I use?
And also how do I get a reference to what TreeViewItem has been clicked in
this event?
... more >>
Inheriting Button
Posted by Soulless at 10/12/2007 1:05:56 PM
Hi,
I have a form that I need to place 3 buttons on. I would like the 3
buttons to call the same method, perhaps with different arguments.
In Powerbuilder, I could create a visual button object and code for
it, then inherit from that and place it on my form/window.
Does C# have anything ... more >>
Divide by Zero Question.
Posted by michaelgweier at 10/12/2007 12:47:08 PM
Hello! I was working on some code the other day, and I came across an odd
discrepancy between the decimal and the double type.
If I attempt to divide a decimal by zero, the framework throws an error.
If I attempt to divide a double by zero, the framework returns infinity.
From a mathemati... more >>
DataRelations Link Question Win [C#]
Posted by MikeY at 10/12/2007 10:58:05 AM
Hi Everyone,
Is it possible to link more than two tables together? My sample that works
perfectly fine (but only the two links) is as follows:
DataRelation TableDetail =
DB_DataSet.Relations.Add("EMPLOYEE_ASSIGNED_LEVELS",
DB_DataSet.Tables["EMPLOYEE_ZONE"].Columns["EMP_ID"],
DB_DataSe... more >>
Large app, many icons how to manage
Posted by Jeff Jarrell at 10/12/2007 10:47:02 AM
We are migrating a large app to .net. There are many forms and there will
be many, many icons.
What are some suggested techniques for more or less sharing imagelists (easy
enough), BUT without giving up the design time experience.
jeff
... more >>
Multilanguage
Posted by Zhangming Su at 10/12/2007 10:25:38 AM
My database contains multiple languages such as Englisg, French, Chinese,
Japanese...(16 languages). Can any one tell me how I can detect which kind
of language is saved in a column without any additional flag by program?
... more >>
Generics in an interface
Posted by Ray Costanzo at 10/12/2007 9:49:12 AM
Can anyone fill in the gaps in my understanding here and explain why I get
this compiler error? Can I not use an interface as a generic type in an
interface? Below are contents to reproduce the problem. It seems that I'd
have to declare an empty constructor in the interface, but that cannot... more >>
dataGridView help
Posted by Gidi at 10/12/2007 9:42:01 AM
Hi,
I have a dataGridView in my win Form, and i get some information from my
DataBase (sql) into a dataTable.
I tried and tried and i can't display my result in the dataGridView.
in addition, I also want to edit the columns (change the headr and size), i
know i can do it with the column... more >>
Newbie Question: decimal variable type
Posted by Blue Streak at 10/12/2007 9:37:37 AM
Hi, folks!
I read somewhere that the decimal variable type uses 128-bits in
memory for each variable. However, I read from other sources that the
decimal type only uses 96-bits to store the number.
Does anyone know the real number and why there might be a discrepancy?
TIA...
... more >>
Hidden Toolstrips cause CFormView to crash
Posted by Mike at 10/12/2007 6:19:40 AM
I am using CFormView and CWinFormsControl in C++ to show a C# control.
The control includes a toolstrip container and various toolstrips. If
all the toolstrips are hidden (visible = false) on any of the
container's panels, a mouse click will cause a stack overflow.
The problem is in the PreTra... more >>
Error while using TransactionScope
Posted by RP at 10/12/2007 5:51:29 AM
I have a two classes, first named "ModCon" has procedures written for
connections and the second named "ModRes" contains functions and
procedures that can be reused. For my question it is important to add
sample codes of the two classes and later the code from a Form's
button click event which i... more >>
Time Zones on the Computer
Posted by Scott at 10/12/2007 5:41:37 AM
Hi All,
Currently I am writting an application around safe travel, as part of
the system I need to store timezone information and also specific time
zone dates.
So, I use
TIME_ZONE_INFORMATION tziNative;
TimeZoneInformation[] zones = EnumZones();
Na... more >>
Compare two integer constants
Posted by Amir Tohidi at 10/12/2007 1:28:01 AM
Hi
I have two constant integers and when I try to compare their values, I get
error:
Operator '==' cannot be applied to operands of type ...
Here is a cut down version of my code
public class MY_CONSTANTS
{
public const int FOO = 1;
...
}
MY_CONSTANTS m_value = MY_CONSTA... more >>
serialization without preregistering subclasses
Posted by Me at 10/12/2007 12:05:10 AM
Hi.
Object serialization is a complicated issue that has few (good)
solutions. In languages such as C++ and C# the programmer needs a way to
unserialize an object to the type it was originally created. This usually
involves some (often convoluted) lookup method that requires all the
sub... more >>
cross - thread problem
Posted by Alistair George at 10/12/2007 12:00:00 AM
if (e.Clicks > 0 && e.Button == MouseButtons.Middle)
{
f1.NewThread = new Thread(new
ThreadStart(f1.ShowMainNodes));
f1.NewThread.Start();
}
private void ShowMainNodes()
{
API.POINTAPI ... more >>
TransactionScope Error
Posted by RP at 10/12/2007 12:00:00 AM
I tried following code but it generates error at line (using .....):
Error 23 The type or namespace name 'TransactionScope' could
not be
found (are you missing a using directive or an assembly reference?)
===[CODE]========================================
private void cmdProceed_Cli... more >>
what is needed to start work with dotnet 3.0
Posted by Peted at 10/12/2007 12:00:00 AM
I wanted to move to working with dotnet 3.0 and im having trouble
documenting exactly what i need to install
I have two development machines i use on XP
1. Visual studio c# express 2005
- instaled sp1 update
- installed dotnet 3.0 runtime distributable
- installed visual studio 2005 e... more >>
Creating a window service
Posted by TonyJ at 10/12/2007 12:00:00 AM
Hello!
I will create a window service but wonder if a good solution is to start
with a console application or windows application with forms even when I
have no output to produce. I might use output in debug purpose and when this
console or windows forms application works as expected I just co... more >>
Which one is a better [InsertCommand]...
Posted by RP at 10/12/2007 12:00:00 AM
>From the below given codes used to insert a record in a table, which
code is well-optimized and must be used. Please also let me know why
it is better.
=======[ CODE 1 ]===========================================
public Int32 InsertNewRecord(string myQuery)
{
obj... more >>
IPAddress.Parse documentation inaccurate
Posted by dfrauzel NO[at]SPAM gmail.com at 10/12/2007 12:00:00 AM
http://msdn2.microsoft.com/en-us/library/system.net.ipaddress.parse.aspx
.... states that you can call .Parse() with a single integral argument
(as a string); "A one part address is stored directly in the network
address." (The example in the table included states that 65536
converts to 0.0.25... more >>
How to know Tcp/ip Drop
Posted by penzer at 10/12/2007 12:00:00 AM
I wonder How to know immediately when the tcp/ip is dropped.
I need the some Event when that is occured
... more >>
|