all groups > c# > may 2007 > threads for thursday may 31
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
Excel File Writing
Posted by indrajith_varma1 at 5/31/2007 11:56:03 PM
Hi
Can we read from an existing excel file, retrieve the values, take the
1st row, append apostophe to all the values in the first row and write
back the appended values to the 1st row of the same file?
If there is a solution, please do let me know. its very urgent.
In anticipation of an i... more >>
IOCTL and name events stuff
Posted by Eran.Yasso NO[at]SPAM gmail.com at 5/31/2007 9:49:16 PM
Hi all,
I need to write a GUI app which do the followings:
1. My app waits for events from other app(actually this is a network
adapter driver) running in kernel. The driver writes to file and
signal my app to read the file.
2. My app also need o communicate this the driver using IOCTL.
Ca... more >>
How can some features be supported by C# and not .NET?
Posted by Fister at 5/31/2007 9:19:56 PM
I'm reading Professional C# (Wrox) and stumbled across:
"Some features are supported by.NET but not by C#, and you might be surprised
to learn that some features of the C# language are not supported by .NET
(for example, some instances of operator overloading)!"
How can some features be su... more >>
FileUpload component
Posted by ascll at 5/31/2007 8:44:00 PM
Greetings,
How do I use FileUpload component to upload the file to a specify location
in web server?
For example, the file path is "c:\temp\uploadfile.doc,"
how to I get the file path?
FileUpload.Text (I'm using C#)?
how to I upload the file to web server 's "uploadfolder"?
Thanks
... more >>
Need to automate app with SendInput()
Posted by sklett at 5/31/2007 8:30:51 PM
I've never tried to use windows messages to automate an application, but
I've read some different blogs and articles that talk about sending keyboard
input and mouse input.
I wanted to describe what I want to do and hopefully someone here can tell
me if it's possible or if I will be wasting... more >>
PrintPreviewControl - Hide "Generating Previews" Dialog
Posted by deciacco at 5/31/2007 6:49:01 PM
I'm trying to write a label printing SDI app with a small preview on the main form itself. Every time I run the InvalidatePreview event on the preview
control to redraw the preview I get the "Generating Previews" dialog box while the preview is being generated. I want to suppress this. I've been a... more >>
DbProviderFactory and transactions.
Posted by BLUE at 5/31/2007 6:42:04 PM
Is there any way to use transactions if I use DbProviderFactory class to
abstract from the provider?
If not, is there any way to manage concurrency in a "universal"/provider
indipendent mode?
I've seen that when a DataSet is used (optimistic lock), if the update
detect concurrency proble... more >>
Is there a way to check if file is already open?
Posted by Kimmo Laine at 5/31/2007 5:30:12 PM
Hi!
Is there a way to check if file is already open/used by another process?
I know that i can do something like this to check it
try {
StreamWriter sw = new StreamWriter(filename);
sw.Close();
} catch (IOException) {
// File is already open...
}
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
How to spawn IE with a proxy address
Posted by SteveT at 5/31/2007 3:57:01 PM
I am trying to figure out how to create a Process that spawns IE with a
specific proxy (web-proxy:8080). Does anyone know how to do this?
--
-----------
Thanks,
Steve... more >>
Detect when in 64bit OS
Posted by Eric Renken at 5/31/2007 3:32:17 PM
Is there something in System.Environment that can tell me if the program is
running on a 64bit OS? What I am thinking is right now is to check the size
of IntPtr and if it is 4 then it is 32bit, but if it is 8 then it is 64bit.
Thanks,
Eric Renken
... more >>
Constraint matches constraint named Constraint1 already in collect
Posted by Tas at 5/31/2007 2:58:00 PM
Hi, first of all, I'm using:
Microsoft Visual Studio 2005
Version 8.0.50727.762 (SP.050727-7600)
Microsoft .NET Framework
Version 2.0.50727
Installed Edition: C# Express.
I have added a DataSet to my Form manually and also manually populated it
with tables (columns and primary keys), ... more >>
ClickOnce and myapp.application file
Posted by randy1200 at 5/31/2007 2:01:02 PM
I have a click once winform application which includes myapp.application
file. The myapp.application contains the server url. The myapp.application
file gets signed before deployment. Everything work great if my only target
is my QA server.
Here's the first problem: the guys that run the se... more >>
Business object databinding
Posted by hharry at 5/31/2007 1:46:00 PM
Hello All,
I am binding a custom business object the gridview control.
When I bind a datatable to the gridview control, the columns are
displayed in the same order as the select statement used to populate
the datatable.
When I bind a custom business object to the gridview control, the
co... more >>
Pairs
Posted by Arjen at 5/31/2007 1:27:37 PM
Hi,
I have this string:
private string[] pairs = { "AB", "CD", "BD", "AC", "BC", "AD", "AB", "CD" };
Now I want to randomize all pairs, like the first AB to BA.
for (int i = 0; i < 8; i++)
{
string pair = pairs[i];
Random rnd1 = new Random();
... more >>
SerializationException
Posted by Don Gollahon at 5/31/2007 1:16:38 PM
I have an app that is in .NET 2.0 C#. But it uses components for .NET
1.1 that handle remoting, etc.
When I run the app I get the following runtime error:
[SerializationException] Possible Version mismatch. Type
System.Globalization.CompareInfo has 2 members, number of members
deserialize... more >>
Handling JavaScript functions and closures passed into C# function
Posted by Nathan Baker at 5/31/2007 12:55:09 PM
I have a JavaScript environment using IActiveScript and friends (via
COM interop). At one point, the JavaScript passes me a function as a
parameter to an object that has been inserted into the JavaScript
using AddNamedItem.
When I look at this object and ask it for its type, it says it is a
S... more >>
ObsoleteAttribute on properties?
Posted by dlgproc at 5/31/2007 12:49:00 PM
Does anyone know if it’s possible to apply an ObsoleteAttribute to just the
Get or Set of part a property in .NET 1.1?
From my tests, I don't think you can, but I wanted to make sure.
Thanks,
DlgProc... more >>
Give RadioButton focus without selecting?
Posted by Matt B at 5/31/2007 11:42:35 AM
I know this is a bit of nonstandard behavior, but I would like the
Enter key to move focus through a group of radiobuttons without
selecting them. The user would then have to use Space or actually
click to select one of the radiobuttons to select.
The default behavior of Focus() seems to also... more >>
MDI Forms - Child Forms
Posted by VIKKI at 5/31/2007 11:19:29 AM
hi I want to know different types way for calling child forms in a
particular project.....I'm new to C# language and I'm not able to add
child form in my project so plz anyone can tell me how to work wid
child forms and mdi forms.......
... more >>
serialize generic dictionary with .NET 3.5?
Posted by not_a_commie at 5/31/2007 10:32:55 AM
So I thought I saw recently some new MS serializer class (part of
workflow foundation or something) that would serialize a lot of types
the old XmlSerializer would not do. This included generic
dictionaries. Can somebody point me to documentation on this or was I
just up in the night?
... more >>
Preferred way of ending a windows service.
Posted by Frank Rizzo at 5/31/2007 9:51:12 AM
I have a windows service which spawns a lot of threads that are all busy
doing various things. What is the preferred way of telling all these
threads to stop? For a situation, when the user stops the service or
the system is shutting down.
I could kill the threads, but that generates Thre... more >>
finding which process locks a file
Posted by Shamresh at 5/31/2007 9:48:04 AM
Hi to all,
I have a file that is locked and I get the message "file is locked by
another user or process". How can I show which process has it locked (i.e.
need the pid and the process name and path).
Sham.
... more >>
Dynamic SQL instead of stored procs?
Posted by Ronald S. Cook at 5/31/2007 9:23:35 AM
What do you guys think of abandoning stored procedures and writhing the SQL
in code?
I'm a little new to the debate and not sure I totally understand. From my
command object, I can just select the type to be "text" instead of "stored
procedure", type my SQL there and it performs just the s... more >>
Unable to use Edit & Continue
Posted by Mahmoud Al-Qudsi at 5/31/2007 9:22:51 AM
Hi,
For some odd reason, I can't use Edit and Continue with my project
anymore, and it's a real killer. It used to work before, and if I
create a new project (VB or C#) it'll work _there_ just fine, but not
in my current project.
Not exactly sure why it isn't working - edit & continue is en... more >>
Better way to check for data in dataGridView?
Posted by trint at 5/31/2007 9:21:56 AM
I am writing a similar program that I have written as a WebForm, only
this is a WinForm.
In the WebForm I check for a row count in a GridView. It works
perfectly everytime when
GridView1.Row.Count == 0.
But, in my WinForm, this code:
bindingSource4.DataSource = GetData2("Select id, parent_i... more >>
Two Way data binding between a Combo Box and ListView
Posted by Monty M. at 5/31/2007 8:49:38 AM
Does anyone know how to perform two way data binding between a combo
box and a listview.
The listview is bound to a dataset table in code:
Binding Bind = new Binding();
DataTable dt;
Field_LV.DataContext = dt;
Field_LV.SetBinding(ListView.Items... more >>
WinForm as LocalService
Posted by IsRaEl at 5/31/2007 6:47:17 AM
Hello everybody...
i reeeealy need a way to automatically execute a WinForm with the same
permissions that i have with the LocalService user.
Thanks in advance...
... more >>
How can I size the width of an unnamed column?
Posted by trint at 5/31/2007 6:31:43 AM
My columns in dataGridView3 are generated on the fly from a Select
statement, so I can't set up any columns properties before it is
created. Sort of the way I make them visible or not like the
following:
this.dataGridView3.Columns[0].Visible = false; //id
this.dataGridView3.Columns[1].Visible ... more >>
Opening Tiff File Throws Out Of Memory Exception
Posted by sternr at 5/31/2007 5:34:11 AM
Hey,
When I try to run the following code:
System.Drawing.Image tiffImage = System.Drawing.Image.FromFile(@"C:
\Image.tiff");
I get an "Out Of Memory" Exception.
Does anybody know how can I overcome this problem?
Thanks ahead
--sternr
... more >>
dataGridView row selector or margin or grid?
Posted by trint at 5/31/2007 5:32:15 AM
Hi,
What is that huge row margin on the left that allows you to select
rows of a dataGridView called?
I've looked and cannot find it named.
I want it hidden because it is ugly.
Any help is appreciated.
Thanks,
Trint
... more >>
AxHost.GetIPictureDispFromPicture
Posted by Yael at 5/31/2007 5:01:01 AM
public class MatarotHost : AxHost
{
public MyHost() : base("02FD5840-C1A3-448E-8310-98611DF58281"){ }
public IPictureDisp GetIPictureDispOfPicture(Image image)
{
return (IPictureDisp)MyHost.GetIPictureDispFromPicture(image);
}
}
Why I don't have in AxHost GetIPictureDispFromPic... more >>
dataGridView2 is interferring with dataGridView1...
Posted by trint at 5/31/2007 4:40:05 AM
Hi,
I have dataGridView1 with a DataSource (categoriesBindingSource).
I didn't use the vs.net workbench to bind the second datagridview
(dataGridView2).
I used this code:
bindingSource1.DataSource = GetData("Select id, parent_id, name FROM
categories where parent_id = '" + dgData1 + "' and a... more >>
Compilation error - user control
Posted by Zeba at 5/31/2007 2:31:29 AM
Hi,
I have a user control in which in have the following code :
<%@ Control Language="C#" AutoEventWireup="true"
CodeFile="RatingControl.ascx.cs" Inherits="UserControls_RatingControl"
%>
<script type="text/javascript">
function alterRating(rating)
{
var i;
var img = document... more >>
Suggestion for C#
Posted by Allan Ebdrup at 5/31/2007 12:00:00 AM
I have a suggestion for C#
I would like reader/writer locks to be built in to the language.
When you want to aquire a loct on an object o you write
lock(o)
{
...//critical region
}
I would like to be able to write:
readlock(o)
{
...//critical region that only reads shared data
}... more >>
Databinding takes high time
Posted by Mauro D. at 5/31/2007 12:00:00 AM
Hi,
In my usercontrol I bind the BindingSource I pass via property to all
the control inside the usercontrol.
For example
Control ctl=new TextBox();
ctl.DataBindings.Add("Text", binding, prop, false,
DataSourceUpdateMode.OnPropertyChanged);
via ANTS Profiler I see that it takes so muc... more >>
How to validate left argument in my operator == method
Posted by Johan at 5/31/2007 12:00:00 AM
Hi!
I have these to methods:
public override bool Equals(object obj)
{
if (obj == null)
return false;
Arg a = obj as Arg;
if (t == null)
return false;
return Id == t.Id;
}
pu... more >>
Add two times (or more) the same object in a tableLayoutPanel
Posted by Guillaume Charhon at 5/31/2007 12:00:00 AM
Hi,
I want to add two times the same picture box in two differents cells of
a TableLayoutPanel.
How can I do ?
I don't want to duplicate my picture picture box.
Thanks !... more >>
|