all groups > c# > february 2004 > threads for thursday february 5
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
Factory and Garbage Collection
Posted by C P at 2/5/2004 10:41:46 PM
I'm coming from Delphi where I have to explicitly create and destroy
instances of objects. I've been working through a C#/ASP.NET book, and many
of the examples repeat the same SqlConnection, SqlDataAdapter etc. objects,
so I thought I'd create a class with a bunch of factory methods to create m... more >>
Setting Default Path for OpenFileDialog
Posted by Ed P. at 2/5/2004 10:26:05 PM
Hello, I have an application that uses an access database that is stored in my computer. I would like to set up a OpenFileDialog object to be able to select the source of this database (i.e. c:\database.mdb). If I move the database to another location I would like to change the path to that other... more >>
Am I doing it right?
Posted by Kevin at 2/5/2004 9:31:06 PM
Hi All
Can someone tell me if I am doing this correctly, or can possibly suggest better ways, if I'm not doing this correctly.
I have a windows application that I am writing,So I have a UI and I have another class that handles the inserts,updates etc to a specific table/s in the database,(I a... more >>
while accessing "custom document property", invalid cast error.
Posted by Sandeep at 2/5/2004 8:21:05 PM
Hi,
I am trying for word 2000 automation with c#. There I want to get all custom document property of the document as follows:
Microsoft.Office.Core.DocumentProperties props = (Microsoft.Office.Core.DocumentProperties)aDoc.CustomDocumentProperties;
(where aDoc is active Word document).
But t... more >>
File Sharing and multiple file handles
Posted by Tony Liu at 2/5/2004 8:13:52 PM
Hi, how can I create multiple new file handles of a file without having to
share to file to the other processes?
I have a file that will be accessed by multiple threads in my application,
each time a thread try to do something with the file, the thread will create
a new file handle. However, if... more >>
Transparent User Control
Posted by Mike Starkey at 2/5/2004 8:00:12 PM
I am trying to create a new user control. Is there anyway I can make the
control itself transparent but still display the oval I plan to draw on it?
Please help!!
Thanks, Mike
... more >>
cd info in c#
Posted by adrin at 2/5/2004 7:39:22 PM
hi i want my c# program to do the following:
1)read cdr serial number(does every cd have its unique serial/id number?)
2)read cdr capacity
3)read cdr producer/writing strategy/dye (this is enclosed in ATIP i guess)
4)free space
how can i implement it? i started writing winaspi wrapper but may... more >>
Creating a simple software license.
Posted by Hadi at 2/5/2004 7:18:12 PM
Hello,
I'm developing an application, which is free for non-commercial use but I
would like to be able to show something to the paid users that the software
belong to them. What is the easiest way for me to do this? I'm thinking a
simple hash of the user's name and company name will result to ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Generating an Image
Posted by Thomas Bauer at 2/5/2004 6:31:16 PM
Hi folks,
I want to write an aspx page that doesn't output text/html, but an image
(such as image/jpeg).
What type do I have to choose in MSVS.NET and what are the basic steps?
Is there any tutorial on the web?
thnx, regards,
Tom... more >>
Copy file problem !!
Posted by Paul at 2/5/2004 6:19:30 PM
Dear All,
I want to use web form to upload my file and copy the file to another
machine.
I can upload the file, but when I copy the file(file.CopyTo(".....", true))
to another machine(map network driver), it failed(error message : login
failed......).
So.... how should I do if I want the u... more >>
"Default" Command Button?
Posted by C# Learner at 2/5/2004 6:12:34 PM
Is it possible to set a command button to the "default" button of the
form?
Here's an example of what I mean -- press Start -> Run. Notice that
the "OK" button has a dark rectangle around it, and when you press
ENTER, this "OK" button's Click event handler is eventually fired.
I was expect... more >>
MS C# standards strategy
Posted by Brandon J. Van Every at 2/5/2004 6:03:20 PM
I think I've finally figured out MS's C# strategy. C# is now an ECMA/ISO
standard. However, that's only true of the current incarnation. The next
version, Whidbey, is not.
http://msdn.microsoft.com/vcsharp/default.aspx?pull=/library/en-us/dv_vstechart/html/whidbey_csharp_preview.asp
So th... more >>
Looping through datagrid rows
Posted by Dan at 2/5/2004 5:13:03 PM
I'd like to loop through selected datagrid rows and extract specified
columns from those rows. How would I do that?
Thanks...
Dan
... more >>
permission to call SetPrinter from C#
Posted by Stephan Perschke at 2/5/2004 4:28:49 PM
Hi,
I try to change some printer settings using the win32 api OpenPrinter,
GetPrinter and SetPrinter. I copied most of the code from this or
related newsgroups. However, OpenPrinter, GetPrinter and ClosePrinter
works so far but I cannot change the printer settings. SetPrinter
returns the erro... more >>
any free library for video capturing
Posted by Kanaiya at 2/5/2004 3:45:17 PM
hello
any free library for video capturing through any device and any
capturing card.
--
With regards,
Gangani Kanaiya.
... more >>
Setting a control
Posted by MFRASER at 2/5/2004 2:45:55 PM
I have a function that I can't seem to get to work properly. This function
is suppose to loop through a collection of controls and locate an existing
ojbect of that type. if it locates the control it uses that object if it
does not a new object is added.
public void SetMainControl(System.Win... more >>
Exception Handling Q
Posted by Vai2000 at 2/5/2004 2:31:24 PM
Hi All, my errMsg string never gets initialized when there is an exception.
Can someone explain me why?
Thanks
string errMsg=null;
try
{
MyFunction();
}
catch(Exception e)
{
throw new Exception("Failed in MyFunction",e.InnerException);
errMsg="Some error:
}
return err... more >>
How can i change the status bar icon OR task manager icon for my website?
Posted by Alice at 2/5/2004 2:31:05 PM
Hi all
How can i change the status bar icon for my website
Or
The icon shown in user's Task Manager for the browser process fetching my website
Thanks in Advance
Alic
... more >>
What is the best way to handle standard functions used everywhere
Posted by Gee at 2/5/2004 2:30:30 PM
I'm new to csharp and in other languages I used I have had a standard set of
useful function like QuoteString DeQuoteString which are used all over the
place. Creating a class everything I want to use it seems like lots of extra
typing.
The options I see are (Some may not be possible)
1. Crea... more >>
any way to keep a from from becoming Active
Posted by Laszlo Szijarto at 2/5/2004 2:30:27 PM
Is there any way to stop a form from ever becoming the Active Form in an
application?
Thank you,
Laszlo
... more >>
Book about XML and C#
Posted by C# newbie at 2/5/2004 2:10:30 PM
Hi guys,
Does anybody know a good book which talks about XML, C# and parsing,
searching issues in an XML file?
Thanks
... more >>
Finding a simple asp.net forum
Posted by Andla Rand at 2/5/2004 2:10:16 PM
Hi,
Can anybody help me find an asp.net forum in c# that is totaly free,
simple, easy, use sql server, only one projectfile with code behind and
supports the older version of visual studio.net.
I have tested about 8 different versions now and i'm still searching.
Yours sincerely
Andla
*... more >>
Installer - Custom Textboxes in UI problem
Posted by Craig at 2/5/2004 1:44:26 PM
I have added a 'Textboxes (A)' to my UI installer project along with a
custom action to pass the value back to a class I've written to override the
void Install function. As long as the text is very simple everything is
working just fine. I've tested it by writing the string out to a text file
... more >>
DataAdapter update
Posted by Ruslan Shlain at 2/5/2004 1:42:01 PM
Not sure who to ask about this so,
I have an app that grabs data from flat file and populates a dataset with
it. Then using update method of a DataAdapter I insert all that data in to
the SQL Server table.
I have a separate app, console app for now, that monitors queue table and
starts my other... more >>
Getting the dimensions of a multidimensional array
Posted by Durior at 2/5/2004 1:29:00 PM
A colleague has just showed me the [,] syntax that introduces
multidimensional arrays (as opposed to jagged arrays, which are similar
to C++ arrays).
So we defined such an array:
int[,] a= new [,]{{1,2},{3,4},{5,6}}
wonderful syntax, especially since "new" is used only once.
Anyhow, we w... more >>
Attributes can't find reference
Posted by Remco Bosman at 2/5/2004 1:24:58 PM
Hello co-developers,
I have been wandering the internet just looking for info on what attributes
there are and where you can use them for. I thought this was a very simple
query but as it seems there's not mhuch to find, unless you know what
attribute you want to use. I know now how to make my... more >>
NNTP class ?
Posted by Craig Kenisston at 2/5/2004 1:13:27 PM
Does this exist in the.net framework ? I can't find it. I could find SMTP,
though.
If it doesn't, could anybody recommend a component suite that includes smtp,
pop, nntp ? But mainly, that does include nntp.
Thanks,
... more >>
How to access fields in methods using Reflection
Posted by djp at 2/5/2004 12:55:39 PM
Hi,
I'm trying to access fields that are local to a method using reflection.
What BindingFlags value should I use and is this possible at all. So far I
was able to retreive class fields only.
Thanks
... more >>
FromBase64Transform truncating string
Posted by Cole Shelton at 2/5/2004 12:25:26 PM
Hi all,
I am simply trying to do a transform to a base 64 string and back, but for
some reason, the FromBase64Transform is return less bytes than it should. I
have verified that the base64 string is the same length as the one that was
output from ToBase64Transform. I also turned on DoNotIgno... more >>
Delete array item
Posted by Arjen at 2/5/2004 12:23:50 PM
Hello,
How can I remove an item from an array?
for ( int i = 0; i < myArray.Length; i++ ) {
if ( myArray[i].Status == "yes" ) {
// Delete from array
}
}
Thanks!
Arjen
... more >>
MSMQ Destruction
Posted by Bob Ans at 2/5/2004 12:01:09 PM
Hello
I have created MessageQueue called Req_MSMQ and have a PeekCompleted event added as follow
Req_MSMQ.PeekCompleted += new PeekCompletedEventHandler(OnRequestPeeked)
Req_MSMQ.BeginPeek()
When I destroy this object (Req_MSMQ) as follow, It doesn't clean up Memory properly.
Req_MSMQ.P... more >>
HTTP/1.1 500 Internal Server Error
Posted by Selen at 2/5/2004 11:53:17 AM
Hi
When I try to create ASP.NET Web Application I get error :HTTP/1.1 500
Internal Server Error
I tried aspnet_regiis -i
it doesnt work. What Can I do?
Thanks
... more >>
how to make complete setup
Posted by Kanaiya at 2/5/2004 11:48:35 AM
hello
how to mak complete setup so any dependencies and dll which we have
used are put in set file.
--
With regards,
Gangani Kanaiya.
... more >>
ok to use base. when I don't have to?
Posted by Daniel Billingsley at 2/5/2004 11:44:13 AM
I understand the conditions where you have to use base., but does it make
any sense to use it elsewhere to make clear to the reader that the method or
property you refer to comes from the base class? Or, would you find such
code insulting or clutter since you're smart enough to see that the clas... more >>
Accessing private data during finalize/dispose
Posted by TB at 2/5/2004 11:41:04 AM
I understand the basics of finalization and implementing IDisposable and how one is guaranteed access to managed objects only when working through the IDisposable interface.
My question is to what extent can I rely on access to my private data during the finalization process when *not* coming thr... more >>
Cannot start Service on a server configured as a member of a workgroup
Posted by Bryan at 2/5/2004 11:39:39 AM
We created a Windows Service with C#. The service will start OK on
computers that are a member of a domain, but when we try to start it on a
server that is configured for a workgroup we get the following error in the
event log:
Event ID: 7001
Description: The {Service Name}service depends o... more >>
Deploy .NET w/o Framework
Posted by Amalia Hernandez at 2/5/2004 11:36:24 AM
I would like to know if there is free software to link assemblies together,
deploy without whole Framework installation. so I could work my application
in any computer without Framework.
Thanks
... more >>
Request.Form error - idHidxml="<recordset><record>
Posted by Tom at 2/5/2004 11:16:10 AM
Hi
I have an aspx page which has javascript to configure xmldata. I added breakpoint to the button method. When I click submit button, it did not go to those breakpoint and show the following error
System.Web.HttpRequestValidationException (0x80004005)
Detect the potential danger of Request.For... more >>
non-null reference
Posted by Nico at 2/5/2004 11:14:55 AM
Wouldn't it be neat if I can declare a variable (or parameter or return
value) as a non-null reference.
Say I suffix it with '!' to say that it is always a non-null reference and
have the following signature for a method.
public TypeA! GetX(ClassB! p1, ClassC p2)
{
TypeA v1;
//some ... more >>
IL Code Security
Posted by Tim Mulholland at 2/5/2004 10:59:03 AM
This thread is intended to be more of a discussion thread - because i value
the opinions of the posters in this newsgroup, and especially the MVPs like
Nicholas Paladino and Jon Skeet (thanks to all of you for your help over the
years).
My company has been toying with moving alot of our applic... more >>
template for stickers
Posted by Ziver MALHASOGLU at 2/5/2004 10:56:02 AM
Hi sleepless passionate coderZ!
I wanna ask you a qustion abot Microsoft Word Templates.
I need to construct a template such that it will contain both static and
dynamic fields. For instance we can think of a phone book on a A4 paper
----------------------------------
First Name: Frien... more >>
convert to c#
Posted by Zürcher See at 2/5/2004 10:50:32 AM
Who can tell me how to convert the InternetSetOption in c#?
#include "Wininet.h"
#pragma comment(lib, "Wininet.lib")
static BOOL SetRegisterInfo(HKEY Key, LPCTSTR SubKey, LPCTSTR find, DWORD
set)
{
.....
}
void OnDisableWWW()
{
SetRegisterInfo(HKEY_CURRENT_US... more >>
datagrid crashes program when loading on the fly
Posted by polarz at 2/5/2004 9:52:39 AM
here are the lines of code that I've tried. All crash the program
shownVals is a string array
data is my datatable
//problem code #1
loop here{
((Form1)NewsMyWay.Form1.ActiveForm).data.Rows.Add(shownVals);
}
//problem code #2
((Form1)NewsMyWay.Form1.ActiveForm).data.BeginLoadData()... more >>
Adobe SDK
Posted by Jax at 2/5/2004 9:51:05 AM
I'm looking to use .pdf's in an application i'm creating, the SDK on the Adobe site said it was only for VB, C & C++
Where should I start
I want to print and view
Regard
Jax... more >>
Need ghost label to appear over Derived TreeView
Posted by Peter Flickinger at 2/5/2004 9:38:31 AM
I have been using a label with the TreeView control - to
simulate the ghost image of a node during drag/drop (so
that a ghost of the node appears to be floating next to
the cursor on a drag/drop).
This works peachy when I had a form that used the TreeView
control (from Microsoft).
The t... more >>
creating a process
Posted by Marco Martin at 2/5/2004 9:36:28 AM
Good Morning Group,
I've created an app that "runs in the background "(the window state is
minimized, the showintaskbar is false, and it displays a notify Icon.).
This program will be running on a server and will be doing scheduled
maintenance on a database. What I'm wondering is, would this ... more >>
Measure method performance?
Posted by dc NO[at]SPAM upsize.de at 2/5/2004 9:29:33 AM
Hi,
I am looking for a simple performance benchmark, I need a report of
how much time my methods need to execute - just to get an indication
of where it is best to start optimizing the code. Of course I can
benchmark every method by taking the start and stop time when the
program enters and e... more >>
Order Hastable by value
Posted by PABLO at 2/5/2004 9:21:05 AM
Hello
I have a Hastable, which I need to order it by value and not by key.
Regards... more >>
Object Parameters, they are passed as pointers, yes?
Posted by Derrick at 2/5/2004 9:07:16 AM
I saw the ref param keyword relating to base types. Just checking, if I
pass an object around to other class constructors, there will only be one
instance of the object, correct?
Thanks!
Derrick
... more >>
add nodes to existing xml document
Posted by wjenny NO[at]SPAM coair.com at 2/5/2004 8:43:04 AM
I have an existing xml file taht looks like this.
<?xml version="1.0" encoding="utf-8" ?>
<Aircraft>
<WCOJOItemType type="AircraftType" >
<WCJOItemCode>03</WCJOItemCode>
<WCJOItemDescription>B737-700</WCJOItemDescription>
</WCOJOItemType>
</Aircraft>
I want to be able to add nodes t... more >>
sluggish splash screen
Posted by andrewcw at 2/5/2004 7:11:09 AM
I implemented the simplest of splash screens ( static and on its own thread ). But it seem that when first called maybe 8 seconds elapsed before it showed up, the main form follows several seconds later.
Naturally recalling the application, the response is adequate
I have 10 classes in my projec... more >>
Write javascript 'into' a c# .NET webapplikation
Posted by nm NO[at]SPAM sondagsavisen.dk at 2/5/2004 6:55:40 AM
Help, I have following code:
-----------------------------------------------------
protected override void Render(HtmlTextWriter w)
{
if (helpString!=null)
{
w.write("<span class='tooltipiconouter'><img title =
'"+this.helpString+"' class='tooltipIconInner' align='center' src =
'../Lib/i... more >>
why won't JIT inline this?
Posted by trnospam NO[at]SPAM earthlink.net at 2/5/2004 6:31:46 AM
I have written a custom replacement for library function
Math.Pow(double x, double y) for the specific condition of y being
integer and >=0. It is twice as fast as Math.Pow(), but I cannot get
the compiler to inline compile it. I've tried many different
approaches, but nothing seems to work. ... more >>
figuring out c# declarations from a DLL of C functions
Posted by teds NO[at]SPAM intex.com at 2/5/2004 5:32:51 AM
Hi,
I'm trying to use a C function ( long int myFunc() ) from a DLL in my
C# program. I use DllImport("dllname") a C function and declare it as
[DllImport("dllname")]
public static extern int myFunc();
At first I used
public static extern long myFunc();
but that returned a bizarre ... more >>
Parameter question
Posted by Bernardo at 2/5/2004 4:41:07 AM
Hi
I have a class that have a Login Method that opens a Login Form
The client that calls the Login Method should receive the User_ID if logins succed
Is it possible to return from the Login form to the method the UserID and from the method to the client
//THIS IS THE LOGIN METHOD THAT WILL CAL... more >>
C# Casting Images from Resource Files
Posted by Code Guy at 2/5/2004 4:36:05 AM
Hello,
I am trying to execute the following code:
private void button1_Click(object sender, System.EventArgs e)
{
PictureBox c = new PictureBox();
c.BorderStyle = BorderStyle.FixedSingle;
this.Controls.Add(c);
ResourceManager rm =
ResourceManager.CreateFileBasedResource... more >>
'References' (pointers) in C# (without using unsafe)
Posted by _ed_ at 2/5/2004 4:00:48 AM
I'd like to build a class or struct composed of pointers to variables.
Does this require dropping into an 'unsafe' block, or is there a
trick?
....
int value1 = 1234;
bool value2 = false;
string value3 = "Hello Detroit";
public class x {
int *adr_value1 = &value... more >>
Where is the IS Industry Headed?
Posted by marty mcmahone at 2/5/2004 3:59:04 AM
Our university is doing some survey work to consider where the world
of IS is headed. Since most of those here work in that world, I'm
interested in your thoughts, especially if you think you have a good
feel for job skills needed now and job skills needed in the future.
The question is sort ... more >>
Outlook addin + .net + COM
Posted by v_anushya NO[at]SPAM hotmail.com at 2/5/2004 3:21:51 AM
Hi All
This is the error i am getting when i try to install my addin in some
other machine and works fine in development machine. I checked the
..net framework version it is 1.1 in developement and installation
machine. Also the outlook version is Outlook 2002 in both development
and installa... more >>
Styling a window.open with javascript in C# .NET
Posted by Nat at 2/5/2004 12:50:00 AM
Hi, I have following code:
-----------------------------------------------------
protected override void Render(HtmlTextWriter w)
{
if (helpString!=null)
{
w.write("<span class='tooltipiconouter'><img title =
'"+this.helpString+"' class='tooltipIconInner' align='center' src =
'../Lib... more >>
if I use MailMessage, I have some questions
Posted by Jason at 2/5/2004 12:28:03 AM
if I want to have mulitple use in
mail.From\mail.To\mail.cc
How can I do??
thx
... more >>
Form Input Focus
Posted by Stephan Rose at 2/5/2004 12:09:48 AM
Ok here's my situation...
Got an MDI application with a panel to my right that has a tree view
for the project stuff, etc.
Now if I select an item in the tree view, the tree view gains input
focus. After this happens, my MDI children no longer are able to
obtain keyboard focus and therefor... more >>
|