all groups > c# > october 2007 > threads for friday october 26
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
Allocating a continuous block of memory for a structure?
Posted by Kourosh at 10/26/2007 10:19:47 PM
I have a structure that has a byte array as a field:
struct foo
{
public int A;
public int B;
public byte[] C;
}
I want to create an instance of this structure, such that all fields
A, B, and C are in a continous block of memory. Right now if I assign
C a new byte array, it gets created i... more >>
Ideas for Grouping numeric data based on the distance from each other?
Posted by Erik Nodland at 10/26/2007 10:13:58 PM
Hi Everyone,
Just after some ideas and suggestions on how to do this. I have a large
amount of numeric data which I would like to group given a distance as a
parameter.
IE. If my dataset was simply 1, 5, 9,10,11,16,17,25,29 and I pass in a
distance of 2 then I would want to end up with gro... more >>
Using GC.Collect() in a timer
Posted by Mike9900 at 10/26/2007 10:03:00 PM
Hello,
I am wondering if it is a good idea to use GC.Collect() in a timer. For
example, timer is fired every 5 minutes and calls GC.Collect().
In our server app the memory goes to 600MB and stays there. The memory
hardly goes down. When I disconnect the client and the connect it again t... more >>
there seems to be some overhead between SQL Server 2005 and a CLR function written in C#. Why is this?
Posted by DR at 10/26/2007 9:24:57 PM
there seems to be some overhead between SQL Server 2005 and a CLR function
written in C#. Why is this?
I have a simple wraper around System.Diagnostics.Stopwatch.GetTimestamp() :
public partial class UserDefinedFunctions
{
[Microsoft.SqlServer.Server.SqlFunction]
public static lon... more >>
Automating windows applications in C#
Posted by sportygeek3 NO[at]SPAM googlemail.com at 10/26/2007 8:01:34 PM
Hi All,
I am looking for a way to automate other applications
programatically. Is there any C# library that will allow me to do
this?
i.e. I want to be able to iterate the menu items on another
application and send a mouse click to each one.
Thanks,
Pete.
... more >>
Convert typed DataSet to untyped DataSet
Posted by zlf at 10/26/2007 7:53:25 PM
Hello
As a known issue, WCF does not allow to transfer typed DataSet. So I have to
copy all data from typed DataSet to untyped DataSet(same table names, column
names and row data). What is the most efficient way to do that? I tried to
remove DataTable from typed one then add to untyped one, b... more >>
What is the best possible resolution that C# timing tests can get? milliseconds? nanoseconds?
Posted by DR at 10/26/2007 6:16:23 PM
What is the best possible resolution that C# timing tests can get?
milliseconds? nanoseconds?
... more >>
ASP.NET Control in VS2008 Beta1
Posted by ikari at 10/26/2007 5:28:01 PM
Hello,
I have a ASP.NET control that works perfectly in VS2005, but in VS2008
the design-time experience is broken with the following error:
Unable to cast object of type Microsoft.Web.Design.DocumentDesigner to
System.Web.UI.Design.WebFormsRootDesigner.
I inherit System.Web.UI.Design.Con... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
try- catch
Posted by Luke Davis at 10/26/2007 5:26:44 PM
I'm new so bear with me. Is there a way for the catch to fix a problem
then start the try over again?
For example, I have this console application sync a remote database and it
takes hours. Sometimes the link, for no apparent reason will drop and will
trigger the catch. I want the cat... more >>
SqlDataAdapter
Posted by Analizer1 at 10/26/2007 5:17:59 PM
hello
if i have a Existing SqlDataAdapter
how do you Clear it and re-use
or do i just set it to null and create a new
SqlDataAdapter
TIA
analizer1
... more >>
How can I reflect changes in underlying database into my application dynamically
Posted by AliRezaGoogle at 10/26/2007 4:51:14 PM
Dear Group,
I have a SQL Server 2000 databse with some tables. The tables contents
are modified by many users at the same time. When I fetch some rows
from a table via dataset into my application , I just have a static
version of rows. When other users modify the rows I do not have new
changes ... more >>
Install MSDE 2000
Posted by Gary at 10/26/2007 4:40:32 PM
I am trying to create a setup application using C# that should install MSDE
2000 on the client machine. I googled a little but couldn't find a specific
answer.
Any pointers on how this can be done?
Thanks...
... more >>
Problem in copying SQLite file in C# code
Posted by mahdaeng at 10/26/2007 4:08:06 PM
I have a little Windows application written in C# with a SQLite back-
end. I'm using the System.Data.SQLite provider.
One of the features the application provides is a database back-up,
which just basically copies the S3DB file to a specified location. See
the code below:
//----------------... more >>
Why does this code work?
Posted by xmail123 NO[at]SPAM yahoo.com at 10/26/2007 3:08:54 PM
Why does this code work?
I am new to C# and have been studying this piece of code. It loops
through an Adjacency Matrix table to populate a tree view. I have two
questions about why this code works.
1. initTreeView(TreeNode N) creates a new "temp" table to hold
the children for each node. ... more >>
transformation matrix; graphics
Posted by Thomas Bauer at 10/26/2007 1:49:51 PM
Hello,
how can I make the transformation matrix?
Zero point
Left top
Left bottom
Right top
Right bottom
I have a list of points
private void Form1_Load(object sender, EventArgs e)
{
ListCodes = new List<CODES>();
CODES obj;
... more >>
Stringbuilder error
Posted by Soulless at 10/26/2007 1:38:14 PM
I am trying to implement the stringbuilder class by taking a LARGE
multiline text box and looping through the lines and build a string
and include \r\n in it.
I get : Index was outside the bounds of the array.
The code is simply:
StringBuilder str = new StringBuilder();
for (int cou... more >>
Newbie Question: VS Project Installation: Registry Editor
Posted by Blue Streak at 10/26/2007 12:31:52 PM
Hi, Folks!!
If you are setting up an installation file (MSI) and you are adding
some system registry settings can you use the $(TargetDir) variable
where the installer would expand it out to "C:\Program Files\<Co name>
\<Proj. name>"?
e.g.
HKRC
- <filetype>
- shell
... more >>
Finding Dead Members
Posted by at 10/26/2007 12:21:47 PM
I inherited a large quantity of legacy code, and I very frequently
find methods, constants, properties, variables, etc., that are no
longer referenced by any code. Does anyone know of that can display a
list of assembly or solution members that aren't actually referenced
anywhere within the ass... more >>
Textbox background color in XP vs Vista
Posted by da5namroi NO[at]SPAM hotmail.com at 10/26/2007 11:59:50 AM
One of my my textboxes has a nice white background when running on an
XP machine, but becomes dark blak when running on a Vista.
Does anybody know how I can fix this? Thank you.
... more >>
Iterating through Global Assembly Cache on Mono
Posted by Ludwig Wittgenstein at 10/26/2007 11:33:25 AM
Hello, all.
Can anybody point me to documentation about how can I
programmaticaly (via C#) iterate through the global assembly cache on
the Mono framework?
I know how to do it using Microsoft .NET on Windows by using a bunch
of P/Invokes against some COMs. However, that's obviously not ... more >>
insert large amount of records into access database
Posted by ireallyneedtoknow2007 NO[at]SPAM yahoo.com at 10/26/2007 10:36:19 AM
hello i am using c# in visual studio 2005 and need to insert a large
number of records contained in a dataset into an access database. the
following is too slow. how can i update my DataAdapter with all the
rows(150000) at one time? thanks
foreach (DataRow row in ds.Tables[0].Rows)
{
D... more >>
generics problem
Posted by Brian at 10/26/2007 9:58:02 AM
I need to write a method that does something like the following. In general
it returns a nullable of the same type as the one passed in. Here is the
problem. If I try to assign a value to the nullable by uncommenting the line
' //tRet = -999;' it won't compile (cannot implicity convert type xx... more >>
Newbie Question: File Type Editor...
Posted by Blue Streak at 10/26/2007 8:32:11 AM
Hi, Folks!
I have a solution that two different executables (Win app & Console
App). I want to add two separate actions for a single file type (i.e.
"Run with Win App" and "Run with Console App"). How can I set this up
within the File Type Editor?
Thx.
... more >>
How to bind ListView to Dataset
Posted by IfThenElse at 10/26/2007 8:29:35 AM
Hi,
Is there an easy way now in 2005?
Need full example url etc..
Thank you,
... more >>
ClickOnce Installation - Finding 'data' directory
Posted by jd at 10/26/2007 7:56:27 AM
Hi, we're trying to get to grips with using ClickOnce installers and
are having some problems. Once installed, the majority of the
application will reside in the following directory:
C:\Documents and Settings\<username>\Local Settings\Apps\2.0\<x>\<y>
\<z>
where <x>, <y> and <z> are seaming... more >>
Remote Process.GetProcesses and SessionId
Posted by Anders Bovin at 10/26/2007 7:53:00 AM
Hi,
I am trying to get the SessionId of processes on a remote machine using
System.Diagnostics.Process:
foreach (Process p in Process.GetProcesses("remotemachine"))
{
Console.WriteLine(p.SessionId.ToString());
}
SessionId is always 0 while Task Manager (on the remote machine) sho... more >>
Custom Control inheriting from a Custom Control
Posted by Cyr1dian at 10/26/2007 6:57:49 AM
Hi,
My problem is that a custom control "newA" that inherits from a base
custom control "baseA" is not displaying any contained controls - that
were not inherited - at run time, but displays them fine at design
time.
I'll give a short example:
public class baseA: UserControl
{
//add ... more >>
How to split a compressed file programmatically?
Posted by Brian Roisentul at 10/26/2007 6:46:33 AM
Hi everyone,
I've been investigating for a while about this, but with no luck yet.
Does anybody know a way to do it?
Many thanks,
Brian
... more >>
"go to definition" problem. What changed?
Posted by Fred Hebert at 10/26/2007 6:24:27 AM
I was thinking of switching to VS2005, so I sent off for and received a 120
evaluation kit. This version was supposed to be the same as the full
version, but the key limits you to 120 days. I installed it and began
learning how to use it.
I built several small C# test apps that use common... more >>
Problem with VS2005 windows form when i switch to design mode
Posted by teixeira1985 NO[at]SPAM gmail.com at 10/26/2007 4:51:57 AM
Hi ,
Due an unknown cause VS2005 started to show an error when i switch
from code to design in windows forms projects.
I repaired the installation but the same happens.
The error is:
One or more errors encountered while loading the designer. The errors
are listed below. Some errors can b... more >>
setdatabinding to a schema, not a relation
Posted by codefragment NO[at]SPAM googlemail.com at 10/26/2007 3:05:53 AM
Hi
I want to bind a datagrid to a dataset for the table
"ProductProductPhoto" in the AdventureWorks database in
SQL Server 2005, however I can't because the binding fails on
Production.ProductProductPhoto, presumably because it thinks theres
some kind of relation in effect here. So how do you... more >>
How to let user select a database connection?
Posted by Edwin Smith at 10/26/2007 3:02:57 AM
Hello:
I'm using VS2005 with an ODBC database.
I am trying to add a Dialog to an existing Database application to allow the
user to select the database. We have 2 different databases with the same
schema so this is a very desirable function.
I can configure 2 different connection string... more >>
MemberInfo for Attribute target
Posted by kh at 10/26/2007 2:42:02 AM
Hi. In a custom attribute, is there any way for me to discover the
type/member to which the attribute is applied during attribute construction?
For example:
public enum MyEnum
{
[MyCustomAttribute()]
MyField,
...
}
public MyCustomAttribute : Attribute
{
public MyCustomAttribute(... more >>
Generate tlh/tli from a tlb?
Posted by Skirmish at 10/26/2007 12:34:18 AM
Long story short: I've been able to load a C# dll in C++ by having the
C# project generating a type library (tlb) and #importing that in C+
+. The #import directive looks like a compiler shortcut that
generates a tlh and tli locally. Now what I want to be able to do is
generate the tlh and tli... more >>
Windows service
Posted by Rotsey at 10/26/2007 12:00:00 AM
Hi,
I have a windows service that does some distributed transcation
across 2 servers. One DB is SQL 2005 express and the other is SQL 2005.
My question is I have created a domain user account and I am
logging the service in as that account. Then I am adding permission to
the user acccount ... more >>
play video/audio in C# application
Posted by Ryan Liu at 10/26/2007 12:00:00 AM
Hi,
I want to play Audio/Video in my C# application(standlalone, not web
applicatoin). The source of multimedia may in different formats and decided
by the end user, which I have no control.
My question is -- which is the best approach to add multimedia capability to
my c# application, t... more >>
connect to printer problem
Posted by Vicente_GarcĂa at 10/26/2007 12:00:00 AM
Hello all,
I have an a bit strange printer and I would like to connect a C# program
running on my computer to the printer. I know that the printer can be
connected by LAN (TCP/IP protocol, 10/100 Base-T) but I am not quite sure
of its meaning. I have not seen anything about that the print... more >>
|