all groups > c# > september 2003 > threads for thursday september 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
Using RSA encryption with C# and Java
Posted by Bryan at 9/11/2003 11:23:12 PM
Hey guys,
I've been fighting with trying to use RSA to encrypt data in Java and
decrypt the data in C#. I've been able to create an X.509 certificate using
makecert and successfully access it in C# using WSE. After exporting from
certmgr as a CER, I can use it in Java using keytool.
My pr... more >>
displaying variables using + var + instead of {0}?
Posted by Robert Blackwell at 9/11/2003 11:06:16 PM
I decided to take a class at the local college here and I'm a little
confused about something.
int age = 5;
Console.WriteLine("You are " + age + " years old");
Previously, I had been reading Learning C# and I learned to type
Console.WriteLine('You are {0} years old",age);
The book I'... more >>
Using search from MS
Posted by timtos at 9/11/2003 11:01:33 PM
Is it possible to use the "search in files" feature from Windows?
Any API-calls?
Thanks a lot for information,
timtos.
... more >>
updating dataset from datagrid
Posted by Jim at 9/11/2003 10:58:41 PM
I have a dataset-bound datagrid and, when the user adds a row to the
datagrid and fills it with the data, I'd like to be able to update the
dataset (with the newly-added row) and then the database table (also with
the newly-added row).
Normally I'd do it with a DataAdapter method call but the ... more >>
SQLDMO error
Posted by Nanda at 9/11/2003 10:49:25 PM
when i run this code, i get
QueryInterface for interface SqlDmo.Namelist failed.
Dim sqlApp As New SQLDMO.Application
Dim NL As SQLDMO.NameList
Set NL = sqlApp.ListAvailableSQLServers
For index = 1 To NL.Count
cboServers.AddItem NL.Item(index)
Next
What could be the error... more >>
Debugging Class Libraries
Posted by Roland at 9/11/2003 10:18:22 PM
Hey All,
I included my Class Library project with my application project and cannot
manage to get the debugger to 'step into' my library source.
Any ideas?
Thanks,
Roland
... more >>
Split function
Posted by Reb at 9/11/2003 9:33:10 PM
Hi,
I could split only by a character. How do i split by a
string.
How can i do something like this.
e.g., somestring.Split("name");
Thanks
Reb... more >>
How to detect a USB Device Being plugged-in or unplugged?
Posted by jack at 9/11/2003 8:28:52 PM
Hello,
I'm trying to make a program what can let me know when a USB device is added
or removed from a system. If anyone has any ideas or help that would be
great!
Thanks in advnace,
Jack
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Binary file
Posted by Durand at 9/11/2003 7:47:10 PM
How can I write/read a structure into a binary file?
Thanks
Durand
... more >>
Item property and indexer
Posted by Dotnetjunky at 9/11/2003 7:24:13 PM
Hi,
I'm really get confused on this issue. Hope that someone can help me get
clear after this post.
Take the class System.Web.Caching.Cache for example. In the documentation,
there's a property called Item and the description is:
"Gets or sets the cache item at the specified key. In C#, t... more >>
Object must implement IConvertible.
Posted by Bill Cart at 9/11/2003 6:23:48 PM
This is a question from a confused newbe.I have an oldDbCommand component
called oleDbCmdAddDemoReq and an oldDbConnection called oleDbConDemoReq on a
web form. I have the following code:
oleDbConDemoReq.Open();
oleDbCmdAddDemoReq.ExecuteNonQuery();
oleDbConDemoReq.Close();
I get this erro... more >>
Delphi and C# Jobs
Posted by Trey Weaver at 9/11/2003 5:49:02 PM
I have written Delphi for years. I am finding it harder and harder to find
jobs. I am considering biting the bullet and start to learn .Net and C#.
But before I invest this time I was wondering how difficult it is to find
work. Is it just the recession or is it Delphi? I don't want to spend
... more >>
why .net cann't access Java webservice?
Posted by Xiao Quan at 9/11/2003 5:45:10 PM
i programed a java webservice, and a client by MS SOAP Toolkit. it work
well.
Howerver, a .net client cann't access the java webservice and report the
following exception:
unhandled exception£º System.Net.WebException: resquest failed because of
http status code 405£ºMethod not allowed¡£
... more >>
EventLogging not working
Posted by PeteZ at 9/11/2003 5:42:10 PM
Hi,
When I run a class (that logs events to the event log) on my local machine
it works fine, yet when I run it on a development web server nothing happens
(no events get logged in Event Log).
eg: System.Diagnostics.EventLog.WriteEntry (sSource, sMessage, iLevel);
I have the feeling that ... more >>
Xml Component
Posted by Ron Vecchi at 9/11/2003 5:15:50 PM
Hi all,
Is there any examples or tutorials out there on making a component that
manages an Xml docuemnts. As far as SELECTING DELETING UPDATING and
INSERTING data to and from. Similar to querying a database through sql.
I am looking to create a component to wrap up some of the coding nee... more >>
How to fire a constructor from a type object
Posted by Marco at 9/11/2003 5:12:25 PM
Howdy!
Given that:
Type type = Type.GetType("System.Windows.Forms.Button");
Question: How do I obtain a Button object by only knowing
the type object. In other words, how do I fire the
constructor of a type object (Button(), in this case) ???
Thank you and God bless.
_____
Marco... more >>
Windows forms - Open event
Posted by Paul Sampson at 9/11/2003 5:05:45 PM
There is probably a simple answer to this one. I've come from a VB6
background, where I've used the Open event on a form to load data
structures, bind controls, etc.
Unless I'm overlooking the obvious, I can't see how/where this is done in
C#. I have this line inside main() :
Application.Ru... more >>
Rectangle with round edges
Posted by Rudolf Ball at 9/11/2003 4:55:48 PM
Hi NG,
anybody has any C# code for a rectangle with round edges?
Thank you very much
Rudi
... more >>
Where is the source code of .NET framework?
Posted by André at 9/11/2003 4:51:51 PM
Hi all,
I am contructing a class derived of DataGridTextBoxColumn with very much
modification.
However, I need to see the code of base class to know what should I in some
inherited methods.
Where do I find the source of the class?
Thanks a lot
André
... more >>
how to get numeric input in winForm
Posted by Sam at 9/11/2003 4:32:54 PM
Why isn't there a numberBox Windows Form control like a
textbox control but for numeric (float) input? There
doesn't seem to be any easy or visual solution to this
VERY SIMPLE ISSUE in either version of Visual Studio. I
simply wanted to create a Windows app where a user could
enter miles ... more >>
Cannot implictly convert type 'char' to 'string'
Posted by Davor at 9/11/2003 4:25:45 PM
This is what I want to do:
int currentWord = 0;
currentWord++;
textBoxOtherLang.Text = orginalLanguage[currentWord];
But, I get a "Cannot implictly convert type 'char' to 'string'"
error when trying to do it. How do I fix it?
Thanks!
================
Davor Babic´
----------------
d... more >>
how to make a copy of object
Posted by keith at 9/11/2003 4:13:53 PM
Is there any way to copy an object which could be
e.g. a panel containing several controls?
Thanks... more >>
Path to executable
Posted by FireStarter at 9/11/2003 4:09:14 PM
Guys,
How can I get the path to the current executable at run time? I think the VB6
equivalent is App.Path.
Thanks for your help.
FireStarter
... more >>
Variable help (very simple question)
Posted by Davor at 9/11/2003 3:59:16 PM
Ok, this is what I want to do:
class test
{
public static void crap1()
{
// This won't work
firstInt = 6;
}
public static void crap2()
{
// Nor will this
firstInt = 2;
}
int firstInt;
]
So, basically, how should I write that
so that both of them can use 'firstInt'?... more >>
Printing a datagrid
Posted by Randy at 9/11/2003 3:52:47 PM
Hello,
I'm trying to get some ideas on this. If you were going to have to print a
datagrid control (about 20 columns of data), how would you do it. I'm trying
to figure out how to get it to look like a spreadsheet when it prints. How
do you hook this up to a button?
I'm totally lost on this...a... more >>
Websites with useful source code extracts on them
Posted by Colin Jack at 9/11/2003 3:45:51 PM
Hi,
I was wondering if anyone could suggest Websites with usable source code on
them...I've tried PlanetSourceCode.com but i've found the Website flakey so
am looking for another one to use.
Thanks,
Colin
... more >>
How turn 8bbp into grayscale?
Posted by Jeroen Ceuppens at 9/11/2003 3:45:21 PM
Is there an method available to do it ?
... more >>
Custom "Add Item"
Posted by Mark Sanders at 9/11/2003 3:21:41 PM
I am wanting to create my own "Item" for use in the "File|Add New Item"
dialog window. Does anyone know of any resources which would point me in the
right direction?
FYI: The item I want to create is an option to add a StronglyTypedCollection
class.
Thanks.
Mark Sanders
Lowrance Electro... more >>
Installing windows Service remotely
Posted by Bhavya Shah at 9/11/2003 3:21:16 PM
Hello,
I want to install an application as a Windows Service on a remote computer.
I know the procedure to install a windows service on a local computer by
using installutil.exe.
How can I install a Windows Service on a remote computer programmatically
through C#.
Regards,
Bhavya Shah
... more >>
How to add Systray icon when writing windows service using c#
Posted by Action at 9/11/2003 3:15:50 PM
I can add a systray icon in normal windows application...
but when i do it in windows service, the systray icon just don't show up
is that because i don't have any "component" to contain the systray icon?
please give direction...
thx
... more >>
[Outlook]add contact item
Posted by Marcel Stör at 9/11/2003 3:07:15 PM
Hi folks
Does anyone know how to add an object of type ContactItem to an _Items list?
_Items provides an add() method which, however, only accepts a Variant as
parameter... Here's what I do:
- logon to Exchange
- find default folder (public folder)
- navigate to the specific folder (contains... more >>
plain text printing
Posted by gb at 9/11/2003 3:00:03 PM
hi,
how to do this using C#.
open "LPT1" for output as #1
print #1, "some text here..."
print #1, "another text here..."
close #1
--
gb
... more >>
How to find URL of the site.
Posted by Anil at 9/11/2003 2:04:12 PM
Hi All,
Depending on the URL we want to display different content in the page. I am
not sure how to check the URL of the page (for ex.
www.domainname.com/movies/default.aspx?id=34)
Please let me know how to check that info.
If someone has got code, please send it.
Thanks,
Anil
... more >>
How to check the image availability on server
Posted by Anil at 9/11/2003 1:59:42 PM
Hi All,
we have hundreds of images on our server. They are shown on the webpage with
the unique id.
So, if the image is available then we want to show the image. If not
available then, we want to display a default image.
Please let me know how to do it. And if someone has got code, please s... more >>
Switch Statement Help
Posted by Scott C. Reynolds at 9/11/2003 1:23:49 PM
In VB6 you could do a SELECT CASE that would evaluate each case for
truth and execute those statements, such as:
SELECT CASE True
case x > y:
dosomestuff()
case x = 5:
dosomestuff()
case y > x:
dosomestuff()
END SELECT
such that if x were 5 and y were 3, it would execute both... more >>
List of Server Names
Posted by JB at 9/11/2003 1:14:20 PM
I'm trying to find out how to create a drop down that lists the Server Names
on the network. Much like Sql Server does when choosing some kind of
connection, it seems to autodetect them, so I'm assuming I can replicate
this. Any body direct me on how to do that?
Jason
... more >>
Namespace snags?
Posted by BH at 9/11/2003 1:13:04 PM
Hi C# & .NET detectives,
can you help with two problems I've encountered lately?
1) These seem equivalent to me but one fails and the other doesn't.
This fails with "type or namespace 'Security' could not be found" message:
//-----------
using System;
using System.Threading;
//...late... more >>
How to solve circular dependency
Posted by Henke at 9/11/2003 1:04:11 PM
I have this scenario.
public class A
{
public int numbers;
public class A()
{
}
public void SomeMethod()
{
B b = new B();
b.Check();
}
}
public class B
{
public class B()
{
}
public boolCheck(A a);
{
if(a.numbers > 10)
return t... more >>
Need COM Interop Guru help please...
Posted by Richard at 9/11/2003 1:01:16 PM
Hi,
I am coding in C# and working with COM objects that were
written in Java. The product documentation for the Java
stuff states that the MS JVM does not support interface
inheritance - and then the documentation goes on to give
VB6 examples of how to get to a base interface given a
c... more >>
VBA.dll
Posted by Karin at 9/11/2003 12:57:18 PM
Does anyone know what/which functions are included in this library
(VBA.dll)?
It has been added to my project and is causing me problem since I can't add
it to the gac.
I would like to find out which of the functions I'm using and hopefully I'll
be able to do a workaround.
Another solution... more >>
SendKeys.Send("^(P)"); not working
Posted by Gary at 9/11/2003 12:25:24 PM
I am trying to use the "System.Windows.Forms.SendKeys" class for triggering
the Ctrl+P key.
Syntax:
System.Windows.Forms.SendKeys.Send("^(P)");
This is not working ..what could be the reason..?
Situation:
I have a menu in my form, which is given a short key "Ctrl+P", now when the
form g... more >>
Casting an object as an Interface that it implements
Posted by Jeff Molby at 9/11/2003 12:01:52 PM
First off, this is a VB application, but I know you C# are used to working
at the lower levels like this, so I'm hoping this is an easy one for you.
Then you can continue to feel superior to us VB-types <G> BTW, I am somewhat
proficient in C#, but my bosses and coworkers barely know VB, so no, I ... more >>
Insert rich text box into database
Posted by Jim P. at 9/11/2003 11:54:23 AM
I have a rich text box that I want to 'insert' into my SQL2K db. But I'm
not sure how to handle it. Do I convert it to XML first? Do I place the
rich text box in an object then insert it as a binary object?
thanks.
... more >>
COM interop problem
Posted by DeepDiver at 9/11/2003 11:51:44 AM
Hey,
i have problems with the COM interop stuff of .NET.
I have a COM component with following interface:
interface IActionSet
{
void foo();
}
interface IController
{
void Init( IActionSet* as );
}
i added this dll to my .NET project, implemented a C# class which implements
IA... more >>
Windows Menu in MDI app.
Posted by Ahmet AKGUN at 9/11/2003 11:43:56 AM
Hi;
In .net is there a way to atumatically show links on currently open child
forms in one MDI application ?
I have found Cascade Tile like commands but could not find a way to
automatically add Child windows
links under Windows menu.
any idea ?
Ahmet
... more >>
DLLImport and Unable to Load DLL
Posted by Michael Tissington at 9/11/2003 11:41:16 AM
I have a C# function that calls into a C++ DLL
I have placed the DLL in the 'bin' folder of my asp.net project
I'm using something like
[DllImport("Keycode.dll", EntryPoint="GenerateKey")]
However when I try to call the function I'm getting an error 'Unable to Load
DLL'
Should I specif... more >>
Threading a method with parameters
Posted by C.K. at 9/11/2003 11:38:56 AM
Hello,
i have a method1(int i, int j);
What is the code to thread it?
the Threadstart, just takes a function name, not parameters.
TIA
... more >>
put bytes array in bmpdata, how?
Posted by Jeroen Ceuppens at 9/11/2003 11:33:23 AM
I created new bitmap file, bitmapdata, now a want the pixeldata that are in
the array bytes[] put into the bmpData, what should I change in the code
unsafe? there is something wrong with p[0] = (byte)(bytes[0]); is makes all
the pixel in some color..........
// this code will be replace by... more >>
Menu Designer
Posted by Ruslan at 9/11/2003 11:29:48 AM
Does somebody know where can I find information about Menu Designer?
I make a component and it need to look similar to MainMenu component at
design time. It is not inherited from MainMenu
... more >>
Multiple FileSystemWatchers
Posted by Ken Madden at 9/11/2003 11:22:42 AM
I want to create multiple fileSystemWatchers in a Windows Service to
constantly watch multiple folders for file creations and then execute
certain code based on these actions. The problem is that these directories
are not part of the same directory so I cannot use the subfolder flag. The
numbe... more >>
Question on Assignment
Posted by Bruce Vander Werf at 9/11/2003 10:55:51 AM
Because Rectangle is a value type, I know I can do this:
Rectangle rect1, rect2;
rect1.Top = 34;
rect2 = rect1; //copies members
rect1.Top = 46; //does not affect rect2
But what about an object that provides static members, like IQAddress?
IQAdress addr1, addr2;
addr1 = IPAddress... more >>
how to update the COMBOBOX TEXT ???
Posted by thomaz at 9/11/2003 10:50:46 AM
When i make an update in my database, the modifications=20
are showing in all TEXTBOX but i can=B4t see the new values=20
in a combobox text. If i close the form and open it again=20
the new values will appear in the combobox text.
How can i see the values in a COMBOBOX text after an=20
update ... more >>
Design time problems
Posted by Chris Capel at 9/11/2003 10:24:36 AM
Is there any boolean flag set during design time that a UserControl can test
to see whether to run code that only works during runtime (because of
complicated initialization)?
Like this:
public class MyControl : UserControl {
public MyControl() {
InitializeComponent();
... more >>
Microsoft Virtual Machine Transition Guide
Posted by Jon Prisbe at 9/11/2003 10:13:08 AM
Is it available yet?
... more >>
any good book for learning C#?
Posted by Action at 9/11/2003 9:26:17 AM
is Microsoft Press's "Inside C#" 2nd Ed. good enough?
thx
... more >>
Setting Input mode for serial communications.
Posted by Peter Krikelis at 9/11/2003 9:16:14 AM
Hi All,
I am having a problem setting up input mode for serial
communications.
(Sorry about the long code post).
The following code is what I use to set up my comm port.
// Constructor for Form with an AxMSCommLib control on it
named "com"
public SerialTerm()
{
// Initialize... more >>
Running Windows Forms app from server
Posted by Karin at 9/11/2003 9:13:57 AM
Hi,
The old version of my program was written in VB and it was stored on a
server but run on several different clients which all had the necessary
dll:s installed.
Now I would like to use the same approach with my C# program but I can't get
it to work. I have created an rwc for the old dll.... more >>
DataGrid Multiple Selection
Posted by Ahmet AKGUN at 9/11/2003 8:58:49 AM
Hi;
How can we get multiple selections on a datagrid ?
There is one property called CurrentRowIndex but it always retrieves last
selection.
On grid I have lots of selections, all selected using Ctrl key and I need
all of them.
Any way to get all selections ?
Thanks...
... more >>
Hash table
Posted by john sutor at 9/11/2003 8:53:42 AM
Does anyone know why, when you remove an element from a hash table
(hashForm.Remove(ict)), the count does not get reduced?
hashForm.Count
... more >>
SqlDataReader vs. DataSet
Posted by lakshmi at 9/11/2003 8:39:12 AM
Hi all,
My requirement is I need to have three different
recordsets open at the same time. Traversing through the 3
recordsets, I would check on the data and based on some
rules, return an object from my function.
Will it be efficient to use a SQLDataReader or a DataSet
for this situatio... more >>
Numpad plus/minus keys won't work in datagrid
Posted by Tomas R at 9/11/2003 8:33:36 AM
Really weird. The ordinary plus/minus works, but not the ones on the
numpad?!
What I've bound to the datagrid is a DataView with a few columns having
numeric values with datatype Int32. (Comming from an SQL Server). The column
have a DataGridTextBoxColumn of course, and I found somewhere on th... more >>
carriage returns in command window
Posted by lewis NO[at]SPAM moten.com at 9/11/2003 8:23:58 AM
I'm having some problems when debugging datasets in C#. During
run-time, I arrive at a break point in my code and goto the command
window. I type MyDataset.GetXML()
The results are a lot of text with \r\n in it and is very hard to
read. I have to keep scrolling left and right as the text do... more >>
Api in C#
Posted by Weimin Zhang at 9/11/2003 8:21:09 AM
I would like to access my ini file from C#, but looks
like C# doesn't support the Api function,
GetPrivateProfileString() which I used to read from an
ini file in VS 6. Is there anyway to use this function,
or other ways to access an ini file from C#? Thanks.... more >>
by reference call to unsafe void** argument
Posted by netronproject NO[at]SPAM hotmail.com at 9/11/2003 8:02:23 AM
Context: C# wrapper around Tivoli LDAP C library.
I understand that something like
"public static unsafe void init(void** LDAPObj)"
has to do with a byref call.
Question: How do I have to wrap or call this function?
Note: the init function is a DllImport with the same parameter(s).
... more >>
Deriving Form Events
Posted by Ryan Wade at 9/11/2003 7:42:03 AM
I want to create a base form to derive all my forms from. In the base for I
want a KeyPress event to fire that when the enter key is pressed it acts
like the tab key and moves to the next control. How would I set this up in
my base form and how would I set it ip in forms that derive from it.
S... more >>
Substring
Posted by Mike P at 9/11/2003 6:13:35 AM
If I want to get the last 4 characters of a string is this the right way
to do it?
int intCardLength = Convert.ToInt32(strCardNumberUnEnc.Length);
strCardNumberUnEnc = strCardNumberUnEnc.Substring(intCardLength -
4, 4);
Or is there stuff (Length, Substring) that is zero-indexed that ... more >>
C# applications using to much memory
Posted by Lucian at 9/11/2003 5:50:21 AM
Hi i'm newbie in .NET especially in c#. I must say that
even the most simple application created uses a lot of
memory (almost 10Mb on 256Mb RAM system), and i really
don't know how can i manage this part. Can someone giveme
some answers?
Thank you.... more >>
Get only filename from a directory
Posted by Michael at 9/11/2003 5:07:51 AM
I get all files from a directory an write it into an
array. Then I want get only the file name with file
extension without the full path.
//code
string[] aFilenames;
Directory.GetFiles(comandline.GetParameterValue
("sDirectory"));
for (int i=0; i < aFilenames.Length; i++)
{
// here I... more >>
SAX parser
Posted by Kam at 9/11/2003 4:43:16 AM
Hello
Does C# support use of SAX parser?
If yes, what need to be done?
Thank you
Kam... more >>
DirectoryEntry.Properties["userPassword"][0]
Posted by petra.chudzinski NO[at]SPAM t-systems.com at 9/11/2003 4:22:22 AM
Hi
I have problem reading the userPassword - Property from an Entry with
the person-Schema using Microsoft Dotnet. I use DirectoryServices
library and LDAP in my class. The code I used is as following:
DirectoryEntry de = new
DirectoryEntry,gAllgemein.IBMLDAPServerPathBenutzer,"cn=root","ld... more >>
System.Data.SQLClient Question
Posted by Buddy at 9/11/2003 3:42:28 AM
Hello,
I have two machines a server and a workstation, I've
installed SQL Server 2000 on the SERVER pc, will I need to
all install SQL Server 2000 Client on the workstation
machine for me to use the System.Data.SQLClient functions.
Can someone point me to any documentation stating this.
... more >>
session variable giving 'Object reference not set to an instance of an object' error
Posted by james_crane NO[at]SPAM btinternet.com at 9/11/2003 2:53:38 AM
Hi,
Thanks for reading...
I am authenticating users in a web app thus:
sqlCommand2.Parameters["@username"].Value = txtUserName.Text;
sqlConnection1.Open();
string userEmail = (string)sqlCommand2.ExecuteScalar();
sqlConnection1.Close();
Session.Add("userEmail",userEmail);
System.Web.Sec... more >>
reading contents of text file into string
Posted by Mike P at 9/11/2003 12:55:09 AM
How do I read the contents of a text file into a string in my program?
Thanks,
Mike
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!... more >>
How can I convert an Int to a BitArray ?
Posted by Marc Lefebvre at 9/11/2003 12:38:19 AM
How can I convert an Int to a BitArray ?
Or
How can I format an Int to a binairy string ?
Thank's
Marc Lefebvre
... more >>
How I can access UDDI at runtime
Posted by Greatfree at 9/11/2003 12:00:19 AM
Dear all,
UDDI has widely been accepted by the developer community to list and
integrate XML web services. Unfortunately UDDI is still viewed as a yellow
pages web service directory. This leads to the belief that UDDI can only be
used at design time as a look up mechanism. The real value of UD... more >>
|