all groups > c# > october 2006 > threads for wednesday october 11
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
Enumerate all storage devices
Posted by Jon Slaughter at 10/11/2006 11:57:17 PM
I'm trying to make a tree list of possible storage devices for a small app
but I have no idea how to get them. I want something very similar to windows
explorer's tree view. Do I have to manually work with each one(hard drives,
USB drives, networks, etc, special locations, etc..) or is there s... more >>
Subscribe and unsubscribe to Windows.Forms.Controls events automatically
Posted by Douglas Peterson at 10/11/2006 8:00:06 PM
I created the following code:
private struct StackItem
{
public EventHandler theEvent, theHandler;
public StackItem(EventHandler theEvent, EventHandler theHandler)
{
this.theEvent = theEvent;
this.theHandler = theHandler;
}
}
protected void AddHandler(EventHandler the... more >>
Given a System.IO.File get the directory
Posted by SoxFan44 at 10/11/2006 7:59:20 PM
Hi,
If I have a File("c:\test\subdir\file1.html"), what's the best way to get
the directory of this file, ie 'c:\test\subdir'? Thanks!
... more >>
Multiple Result Sets in a DataSet from DataAdapter ?
Posted by Liz at 10/11/2006 7:56:13 PM
Anyone have any info on how you can fill a DataSet with mutiple result sets
from a SQL batch ? I know with a dataReader you can use the nextResult
method but I'm lost on how you do this with a dataAdapter ....
TIA ..
L
... more >>
win2003 server IIS
Posted by SemSem at 10/11/2006 6:36:01 PM
Hello
ihave setup a windows 2003 sever in my pc and when he ask me for a user name
and passsword i didn't give him an password and let the name as administrator
..
---> when i try to instal a MVS2003.Net in my pc he ask me to setup(
frontpage 2003 server extensions) -as i already setup (... more >>
Export Crystal report to PDF
Posted by Badis at 10/11/2006 4:30:02 PM
Hi,
Could any one give a sample example on how to export crystal report called
"MyReport.rpt" to PDF using Crystal Report !!?
Thanks
... more >>
Scale value using double.ToString()
Posted by Joe at 10/11/2006 4:00:23 PM
Is there a way to get 1000000 to display as 1,000k using double.ToString()?
-Joe
... more >>
serialPort not works?
Posted by PiotrKolodziej at 10/11/2006 3:46:30 PM
Hi
Iam trying to send AT commands to the device.
if (serialPort1.IsOpen) serialPort1.Close();
serialPort1.Open();
byte[] buffer = ASCIIEncoding.ASCII.GetBytes("AT");
serialPort1.Write(buffer, 0, buffer.Length);
Thread.Sleep(1000);
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Transaction
Posted by simonZ at 10/11/2006 3:43:40 PM
SqlCommand oCmd;
SqlTransaction tran;
oCmd =3D new =
SqlCommand("myStoredProcedure",myFunctions.createConnection());
oCmd.CommandType =3D CommandType.StoredProcedure;
tran=3DoCmd.Transaction.Connection.BeginTransaction();//I get an error: =
null exception
Any idea?
Without tran everyth... more >>
Process.Start() and Process.WaitForExit()
Posted by Chris at 10/11/2006 3:23:38 PM
Hello,
I have a Windows Forms application which has buttons to click to run
other programs.
One of the applications it must run is a ClickOnce Windows Forms
application, so the Application Reference in the start menu is the only
way to access it.
I have the following code used to start t... more >>
Script Engine
Posted by Hardy Wang at 10/11/2006 3:19:57 PM
Hi all,
Anybody knows where can I find some information about script engine theory?
I have the requirement:
Our product has some template files, and there placeholder/variabled
embedded inside template (like %CurrentTime%, %HoursRemaining% and so on).
There are also some other variables (... more >>
Maximal path and maximal file name length
Posted by Lubomir at 10/11/2006 3:13:03 PM
Hi,
Where in .NET are definded constants for maximal file name length and
maximal file path?
Thanks,
Lubomir... more >>
How to use a class from one assembly into another
Posted by Daniela Roman at 10/11/2006 2:36:20 PM
hello,
I want to create a class in a library:
public class GetHello
{
private string aa = "Hello world";
public GetHello()
{
//
// TODO: Add constructor logic here
//
}
public string GetContent()
{
return aa;
}
}
Then I create a simple project and I want to use the GetContent t... more >>
Accessing DataSet values easily
Posted by SteveT at 10/11/2006 12:51:02 PM
I am wanting to populate several treeviews, one for the <TRs>
group and one for the <TGs> group. Is there a simplier way
to populate the Treeview than the one I did below? It seems
difficult to get to the correct DataSet values.
<?xml version="1.0" encoding="utf-8" ?>
<TestSample>
<TR... more >>
Serialize XPathNavigator
Posted by Bruce Sandeman at 10/11/2006 11:55:51 AM
Hi,
Does anyone know how to serialize an XPathNavigator object?
I have tried the following but it moans that the xpn does not have a parameterless
constructor.
XPathNavigator xpn = e.Source.SelectSingleNode("/ns1:Invoice/ns1:InvoiceDetail/ns1:Lines/ns1:Line/ns1:Matches/ns1:Match/n... more >>
process.start is not working in Windows Service
Posted by Reddy at 10/11/2006 11:26:02 AM
I am running process.sart to run gpg.exe to encrypt files. It's working fine
with console application. When i use same code in windows service. It's not
working. It's not even throwing error.Follwoing is the code i am using.
Please somebody help me.
Process p = new Process();
p.StartInf... more >>
How to see the changed value in design mode of composite control
Posted by eladla at 10/11/2006 10:27:02 AM
When I change a property, I can`t see it in design mode.
i defined the property as followed:
[Bindable(true)]
[Category("Box")]
[DefaultValue("Sophia")]
[Description("The Item description displayed in the control")]
public string DBItem_Description
{
get
{
EnsureChildControls();
retur... more >>
ODBC / Vista / Foxpro
Posted by Robert Hooker at 10/11/2006 10:06:22 AM
I have installed our .NET application on a system running Microsoft Windows
Vista operating system.
When I run our application, I receive the following error message whenever
it tries to create a DBF file using VFPODBC:
"ERROR [IM001] [Microsoft][ODBC Driver Manager] Driver does not support ... more >>
How to create an admin account
Posted by Dan Holmes at 10/11/2006 9:52:51 AM
I admit this not being C# specific but i don't know where else to start.
My application needs an "administrator" user id. This would function
just like the "administrator" user id in windows. The account is
built-in. The only thing that is configurable about the account is the
password.
... more >>
getting Token privilages using C#
Posted by asnowfall NO[at]SPAM gmail.com at 10/11/2006 9:31:12 AM
I want to get the list of privilages set on process token using C#.
Please let me know.
Thanks
Ramesh
... more >>
when casting, receiving: System.InvalidCastException (Specified cast is not valid)
Posted by Gamma at 10/11/2006 9:12:43 AM
I'm trying to inherit subclass from System.Diagnostics.Process, but
whenever I cast a "Process" object to it's subclass, I encounter an
exception "System.InvalidCastException" ("Specified cast is not
valid"). How do I fix it ?
using System.Diagnostics;
..
..
class NewProcess: Process
... more >>
TreeView and DataBinding
Posted by SteveT at 10/11/2006 8:52:02 AM
I am trying to populate a TreeView with XML data within a DataSet. I don't
see the property DataSource in the treeview, only a DataBinding. Can that
property to be used to populate my TreeView or must I brute force my way by
added each row of my dataset to the TreeView?
--
-----------
... more >>
Problem with ASP:Button
Posted by DFDavis at 10/11/2006 8:36:02 AM
I have a set of code that updates to a div tag through javascript
whenever a checkbox is checked, however I need a way to get that
information to the server side when the user uses the submit button.
So I created an asp:button on the page, but for some reason, everytime
I press the submit button... more >>
Remove items from list while enumerating
Posted by pamelafluente NO[at]SPAM libero.it at 10/11/2006 8:12:20 AM
Hi
I have a sorted list with several thousands items. In my case, but this
is not important, objects are stored only in Keys, Values are all
Nothing. Several of the stored objects (might be a large number) have
to be removed (say when ToBeRemoved = true).
class SomeObj
ToBeRemoved be a... more >>
Need design for calling a method at regular intervals
Posted by barker7 NO[at]SPAM yahoo.com at 10/11/2006 6:36:36 AM
In our app, we need to collect data at regular intervals (4, 8 or 16
seconds - user settable). The collection happens in a background
thread. My first approach was to do the collection, which takes about
0.5 seconds, then calculate how much time to sleep until the next
collection.
The problem... more >>
Math.Round Question
Posted by Gonza at 10/11/2006 5:56:40 AM
Hi group, i have a method in my class with the following code:
private double GetCompletedPercentage(TimeSpan totalTime, TimeSpan
budgetedTime)
{
double totalMinutes = totalTime.TotalMinutes;
double budgetedMinutes = budgetedTime.TotalMinutes;
return Math.Round((totalMinu... more >>
Automatic Memory Management Question
Posted by gwainguard NO[at]SPAM hotmail.com at 10/11/2006 5:00:01 AM
Hello I am studying the ECMA specs and was doing wonderfully until just
now. They have just broached the topic of AMM and given some example
code which seems to be demanding a greater understanding from the
reader than the previous examples.
I include the code following, would someone please b... more >>
Performance problems with StoredProcedure in Web application
Posted by Frank at 10/11/2006 4:52:59 AM
Hi,
imagine there's a WEB application reading data from an Oracle database
to visualize in using DataGrids in the clients browser. Yes, sounds
simple, just create OracleConnection + OracleCommand + DataAdapter,
bind a DataGrid to the DataAdapter, that's it.
Problem with that approach might be... more >>
A special (?) type of timer
Posted by adi at 10/11/2006 3:58:30 AM
Hi
I need the following: at particular times of day, I want to make some
processing.
System.Windoes.Timer doesn't help much, because it exposes the Interval
property.
Instead, I need to tell the timer: fire at 3:25 pm.
What's the best way to accomplish that?
Thanks.
... more >>
Treeview with in an checkbox in few of the nodes
Posted by Rene Sørensen at 10/11/2006 2:40:29 AM
Anyone have a code example on how I make a treeview so it only
displays a checkbox on the nodes I decides that needs one? And not
just all of the nodes like the Microsoft standard version of treeview
dos it.
I use Framwork 2.0
VS 2005
Rene... more >>
DataGridView OnPaint
Posted by Diogo Alves - Software Developer at 10/11/2006 2:12:02 AM
greetings I would like to be able to design some extra graphics above the
header cells of a datagridview that I have....
I've been trying to use e.cliprectangle.Offset(0,80); but it is useless the
drawing I make always became over the grid....
How can I do this?....
Thanks A Lot... more >>
Bridge pattern? What is the use?
Posted by Adrian at 10/11/2006 12:00:00 AM
The code below was taken from an example.
All the "noise" in the example was thrown out.
This is supposedly according to the bridge
pattern. What in the code (which lines)
represent the bridge pattern (make this code
to be according to the bridge pattern),
and what is the advantage of employin... more >>
Process.StartInfo - how to make it 'NOT' shown on the taskbar
Posted by Alan T at 10/11/2006 12:00:00 AM
How do I make it does NOT appear on the task bar when it is started?
... more >>
DataGridBoolColumn
Posted by Ryan Liu at 10/11/2006 12:00:00 AM
Hi,
Is there a way to change the apparance of DataGridBoolColumn, e.g. I'd like
the checkbox has no square box when it is in read only mode?
Thanks a lot!
... more >>
|