all groups > c# > december 2004 > threads for monday december 13
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
Two object on the same datagrid row
Posted by etantonio NO[at]SPAM libero.it at 12/13/2004 11:58:49 PM
Good Morning,
I've used a datagrid to show some web template images that you can see
at the address
http://www.etantonio.it/IT/Web/TemplateSiti/index.aspx
my idea is to put two photo on the same row, I know this is possible
with the datalist but how I can achieve the same using a datagrid ?... more >>
0.00007m -> 7E-5 ?
Posted by antonio. kim at 12/13/2004 11:51:03 PM
Hello.
I'd want to see the right value that inserted, but very small value like
0.00007m doesn't displayed exactly(displayed 7E-5).
ex)
decimal b = 0.00007m;
TextBox.Text = b.ToString(); => 7E-5
TextBox.Text = b.ToString("F"); => 0.00
TextBox.Text = b.ToString("0.00000"); => 0.00007 ... more >>
Testing
Posted by joko tingkir at 12/13/2004 9:27:35 PM
Hi,
i currently building project for my final year degree
and i using object oriented with c#
i want to ask if anyone know how to test the system that
using object oriented, im planning to use Black Box and
White Box but i dont quite understand on how to tested
the classes thax... more >>
SQL trees
Posted by Robert Schuldenfrei at 12/13/2004 8:52:50 PM
Hi NG,
After a break of two months I am back on my project of converting a COBOL
ERP product to C# and SQL Server. I now have to process a tree structure in
C#. Not only am I a newbie in C#, but SQL as well. So if these questions
sound stupid, please forgive me. All of my programming in... more >>
Regarding GetDefaultUserProfileDirectory
Posted by Visual Systems AB \(Martin Arvidsson\) at 12/13/2004 8:32:00 PM
Hi!
In c# I use [DllImport("userenv.dll")] to fetch the
GetDefaultUserProfileDirectory
But there are a LPTZStr and i don't know what the equalient is in c# for
that.
Anyone who can give me a code snippet on how it should look to import this
function?
Regards
Martin Arvidsson
... more >>
Threads, lock, many readers, one exclusive writer
Posted by timasmith NO[at]SPAM hotmail.com at 12/13/2004 8:20:52 PM
Hi,
I am so far familiar with the C# lock keyword, which I understand
prevents any other thread from entering the portion of code which is
locked, assuming you are locking the same object instance.
I have a cache of data which initially I locked when I write to it,
and I locked the same obj... more >>
conditional methods
Posted by Mark at 12/13/2004 8:15:39 PM
Conditional methods are throwing me for a loop. I understand that if I
compile the BLAH class code below in a Release mode project, it will not
include the "Message" method. However, let's say that I have another method
that CALLS this method, like the foobar class. Won't the compiler bomb? O... more >>
Code generator for making those pesky property accessors
Posted by thechaosengine at 12/13/2004 7:11:22 PM
Hi all,
Does anyone know of a decent code generator that would take in the details
of the variables I would like my class to have and then make the property
accessors from that information?
It seems I spend ages at the begining of a project just writting that same
old very elementary cra... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Objects, objects, so many objects! ;-)
Posted by thechaosengine at 12/13/2004 6:59:02 PM
Hi all,
I have a very general but quite significant question about objects.
My question is, when should I create them? I know thats a crap question so
let me explain a bit further.
Lets take an example of user management against a database. Things I might
like to do include:
- Creati... more >>
Accent
Posted by Franck Diastein at 12/13/2004 6:54:15 PM
Hi,
I have a txt file with some text I want to send via mail... The text
contains some words with accents... With my code, I receive the mail,
but letters with accent are missing :-(
What am I doing wrong ?
// Loading text file
private string MyBody(){
TextReader ... more >>
Weird calculation problem
Posted by Gas at 12/13/2004 6:29:05 PM
I am new to C#, I want to perfoem a calculation and I have a weird out come
from the app.
Here is the code
double percentage = 0;
percentage = ctrl1.Height / (ctrl1.Height+ ctrl2.Height)
when I try to output the percentage, it is always 0.
(ctrl1.Height and ctrl2.Height are positive v... more >>
Weird calculation
Posted by Gas at 12/13/2004 6:25:57 PM
I am new to C#, I want to perfoem a calculation and I have a weird out come
from the app.
Here is the code
double percentage = 0;
percentage = ctrl1.Height / (ctrl1.Height+ ctrl2.Height)
when I try to output the percentage, it is always 0.
(ctrl1.Height and ctrl2.Height are positive ... more >>
Calling Regsvr32 on a .NET Assembly
Posted by Sahil Malik at 12/13/2004 6:23:22 PM
Fairly simple question !!!
The title says it all. But here is a further description -
I have a software that expects a COM DLL. Due to certain requirements we
have to create a .NET assembly instead.
I know we can do RegAsm, but the way we have to "load" this assembly into
another program ... more >>
Conversion VB.NET to C#
Posted by Fabio Negri Cicotti [MCP] at 12/13/2004 6:09:07 PM
Another question about convertions... how could I convert the code below to
C#?
Public Property Value(ByVal index As Integer) As String
Get
Value = dt.Rows(index).Item(MyBase.ValueMember)
End Get
Set(ByVal value As String)
dt.Rows(index).Item(MyBase.V... more >>
Dynamic Controls in asp.net using C# LOGIC..please help....
Posted by Irfan Akram at 12/13/2004 4:53:01 PM
Hello People,
I would appreciate your responses on this.
I am writing an asp.net web-application involving C#. I am actually building
a test hierarchy at the moment, which involves producing dynamic controls,
depending on user response.
To be more precise, I prompt the user for the num... more >>
Overloads modifier
Posted by Fabio Negri Cicotti [MCP] at 12/13/2004 4:48:08 PM
Hi all.
How could I convert the VB.NET "Overloads" modifier to C#?
Public Overloads Property DataSource() As Object
End Property
Grateful.
--
Fabio Negri Cicotti
Software Engineer
... more >>
C# escape function in XML ????
Posted by genc_ ymeri at hotmail dot com at 12/13/2004 4:12:37 PM
Hi ,
Does .Net have any method/function that escape charcters while writing a XML
file ????
Thank you in advance.
... more >>
Dragn'drop between user controls
Posted by Mats-Lennart Hansson at 12/13/2004 4:11:02 PM
Hi,
I've created a simple user control (System.Windows.Forms.UserControl) in c#.
Then I place two items of this control on a form. After this I try to drag
one control to the other and try to catch the OnDragEnter event. This
doesn't work.
My question is, how should I do this? If I try to dra... more >>
How to I do a http post from within a webform
Posted by Phillip N Rounds at 12/13/2004 4:11:00 PM
I have a webform, from which I have to submit info to another site. Their
instructions are to have a html form, with the following as the submit:
<form method="post" action="http://www.theirsite.htm">
<input type=hidden name="field1" value="value1">
<input type=hidden name="field2> value="valu... more >>
RichTextBox
Posted by Jeti [work] at 12/13/2004 3:50:58 PM
I have RichTextBox on my form... When I press the 'OK' button, form must
save contents of the RichTextBox on the disk... It wouldnt be a problem
usually, but it is because i need to save it as HTML. All tags must be
generated (fonts, styles, etc)... After that i would need to read HTML
document ... more >>
Date Convert
Posted by Islam Elkhayat at 12/13/2004 3:31:52 PM
In my C# Webapplication..
I enter the date in a textbox using popup Calender in the format
MM/dd/yyyy..
when i retrieve date from Sql server for updating using datarow to fill the
textbox the date format dd/MM/yyyy hh-mm-ss i want to convert it back to the
original format & ommit the time..
... more >>
Obfuscation
Posted by Yama at 12/13/2004 3:06:08 PM
This is a multi-part message in MIME format.
------=_NextPart_000_0011_01C4E125.468E7FC0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi ALL,
VS.NET 2003 comes with standard version of PreEmptive's Dotfuscator. I =
have used it but I wanted... more >>
Transforming polygon coordinates?
Posted by Adam Clauss at 12/13/2004 2:58:12 PM
I have a list of points (their coming in as decimal types, I can convert to PointF) that I am trying to draw to a form.
Unfortunately, the coordinate system these points are coming from is not like Windows Forms use. Instead of (0,0) being the top
left, (0,0) is in the "standard" graph positio... more >>
EXCEL.EXE remains in processes after Dispose...
Posted by Vagabond Software at 12/13/2004 2:44:26 PM
Scenario:
The end-user selects File-Save from my applications (WinForm) menu, =
specifies a filename, and waits waits for my app to write the contents =
of a dataset to an Excel workbook. The SaveXLReport method completes =
successfully, calls myXLClass.Dispose, and returns control to the user ... more >>
Event cancel
Posted by AntoS at 12/13/2004 2:24:43 PM
I would you like to capture a keyPress or KeyDown event and checking wich
characters was pressed and if the char is not allowed I want to Cancel the
event.
That's what I want:
In a textBox I want to allow insert of only number or character that I
select and if sameone press another char I sim... more >>
User Authentification on windows application
Posted by freddy at 12/13/2004 2:01:01 PM
how do I use windows security in windows apps. This is not for asp.net... more >>
keyboard and system inavtivity
Posted by Pohihihi at 12/13/2004 1:52:26 PM
Hello NG,
I want to find if there is any user input (via mouse and keyboard only) even
my app do not have focus (minimized or in background). How can I do that in
managed code?
Thx,
Po
... more >>
setting Username&password while using DirectoryInfo()
Posted by siddharth_jain_1 NO[at]SPAM rediffmail.com at 12/13/2004 1:23:05 PM
Hello
I am trying to get a list of shared files and subdirectories in a
particular folder on a server.
For this I am using DirectoryInfo in the following way.
DirectoryInfo folder = new
DirectoryInfo("\\\\server_name\\shared_folder_name");
FileInfo[] fiArr = folder.GetFiles();
Director... more >>
Weird Socket issues
Posted by Ian Frawley at 12/13/2004 1:17:46 PM
Hi all
I am running a standard client server socket type thing and I have started
getting this exception
Exception: System.IO.IOException
Message: Unable to read data from the transport connection.
Source: System
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset,
Int... more >>
inserting C# variables into XPath expressions
Posted by studen77 at 12/13/2004 1:05:02 PM
Thanks in advance to anyone who can help :)
I'm trying to extract a specific NodeSet out of an XML file; however, I'd
like to include a C# string variable as part of the XPATH statement; so far
I've been unsuccessful and I'd like to know if this is even possible and if
so how to do it.
An ... more >>
Hiding Base Class Properites from derived class instance
Posted by Microsoft at 12/13/2004 12:59:53 PM
Base class:
class AssetBase
{
string _clli;
public string CLLI
{
get
{
return _clli;
}
set
{
_clli = value
}
}
}
In Derived Class I want to give dif... more >>
ITextFont and c#
Posted by Ram at 12/13/2004 12:36:49 PM
I am working with Richtextbox and tom in c#. Everything works fine, but I am
unable to get the ITextFont object from the IDocument interface nor do I see
functions GetFont and SetFont in ITextRange and ITextSelection. What's
wrong? Found that windows2000 has default Richedit 3.0 ( Riched20.dll.)a... more >>
c# security
Posted by freddy at 12/13/2004 12:23:02 PM
I have two questions:
1. How do I use windows security in my applications login screen. This is
not for asp.net
2. How can I use msde in my c# application both win forms and web forms, is
there a book on this.... more >>
How to get a system font ?
Posted by Herve Bocuse at 12/13/2004 12:22:07 PM
Hi,
In C++ I was used to this code to get a GUI system font :
LOGFONT lf;
::SystemParametersInfo(SPI_GETICONTITLELOGFONT,sizeof(LOGFONT),&lf,0);
HFONT hFont = ::CreateFontIndirect(&lf);
How can I get such a font in C# ?
Thank you
Herve
... more >>
.NET Regex href
Posted by Ryan Moore at 12/13/2004 12:19:51 PM
I am trying to write a regex expression which extracts all href links
from a HTML page... I'm currently using the following:
href\\s*=\\s*(?:\"(?<1>[^\"]*)\"|(?<1>\\S+))
but it has a problem with hrefs enclosed in single quotes, such as:
<a href='anotherpage.htm'>
I'm not a regex guru, ... more >>
Session State Question?
Posted by Leon at 12/13/2004 12:04:42 PM
Is it a good idea to load a user username/email and password into session
state if you will be validating information against those credential
through-out the use of the web application? or is it best or more secure to
just get that information from the database when needed?
... more >>
Math problem
Posted by Sebastián at 12/13/2004 11:33:18 AM
Hi all,
I have to randomlly pick numbers, but not any any number, it has to be from
a predefined set of posible values. Is there an "easy" way to do that????
TIA,
Sebastián
... more >>
a |=b, a | b and a || b (why not a ||= b?)
Posted by Mats-Lennart Hansson at 12/13/2004 11:29:05 AM
Hi,
Why isn't it possible to use a ||= b? To increase efficiency, I only want to
evaluate as much as neccessary. Do I have to write it the "longer" way (a =
a || b)?
Thanks,
Mats-Lennart
... more >>
newbie trying to understand escape characters in strings
Posted by teds NO[at]SPAM intex.com at 12/13/2004 11:04:26 AM
Hi,
I have the following simple code:
string foo1 = "My\rLine\rIs\rHere\r";
string foo2 = @"My\rLine\rIs\rHere\r";
When I do a Console.WriteLine() on each variable, the foo2 is displayed
with the \r displayed but foo1 is garbled. Why is that?
Also, suppose I'm given a string with \r u... more >>
FileSystemWatcher bug?
Posted by John Lee at 12/13/2004 10:43:14 AM
Hi,
I wrote a small program that copy a list of files to a specified folder one
by one, i.e. this app will copy one file into the specified folder and wait
until it's consumed (deleted) then copy another one in. Here is what my
code:
// other codes to get a list of files
while (morefile... more >>
Re: Abstract Base form - can I fake it?
Posted by Rachel Suddeth at 12/13/2004 10:37:31 AM
Hmm... this is a good start. But I guess what I'm looking for is a way to
ensure they actually get called. Except that I would only want them to be
called in a weird place (like form load event) IF they were the base
methods. We wouldn't want to trigger the real things at a goofy time...
Or... more >>
Any way I can launch origram with parameter
Posted by Steve at 12/13/2004 10:13:02 AM
I used System.Diagnostics.Process.Start(str) to launch application.
str is based on the registry setting, in registry, it might be
str = rundll32.exe "%ProgramFiles%\INTERN~1\hmmapi.dll",OpenInboxHandler
str = "C:\PROGRA~1\MICROS~4\OFFICE11\OUTLOOK.EXE" /recycle
str = "C:\Program Files\Interne... more >>
This C# code to VB
Posted by G Dean Blake at 12/13/2004 10:08:40 AM
I have this code snippet in C# that I have to convert to VB
object o = null;
if (mode == PageTrackingMode.ByApplication) {
o = Page.Application[HitsKey];
}
else if (mode == PageTrackingMode.BySession) {
... more >>
Re: Abstract Base form - can I fake it?
Posted by Rachel Suddeth at 12/13/2004 10:00:11 AM
I don't see how this will help. I need to call the methods in the base form.
So I'd have to implement the interface in the base form. If I do this,
wouldn't any derived form inherit those implementations? So the developer
would still not be forced to inherit them.
If I'm wrong about any of ... more >>
Image Property in the designer
Posted by Adam Dockter at 12/13/2004 9:56:01 AM
I am trying to create image property that will work in the designer. I want
the image to be written to the resource file for the class.
Here is what I have so far, but I am running into a wall here. The property
comes up okay in the designer with the drill button and the file selector.
But a... more >>
How to Inherit attribute with interface ?
Posted by Microsoft at 12/13/2004 9:43:53 AM
I have Interface defined with custom attribute. My class implements the
same interface , but I'm not able to see any attributes derived from
interface.( I did set the inherited to true) .
... more >>
How can I use VB DateDiff function in C#?
Posted by Derrick at 12/13/2004 9:34:26 AM
I've included
using Microsoft.VisualBasic, cranked up a VBCodeProvider, the only class I
see in there, don't see DateDiff as a method though?
Thanks in advance!!
Derrick
... more >>
Datagrid binding to hash table
Posted by Rob Lykens at 12/13/2004 9:31:01 AM
I have a hash table and want to bind it to a datagrid. Anyone know how to do
this without interating throught each key value pair?... more >>
How to make hyperlink clickable in RichTextBox?
Posted by chrisben at 12/13/2004 9:25:11 AM
Hi,
I am using .NET 1.1. I put a web address to a RichTextBox and set its
DetectUrls property as true. After the app starts, it underline the link
automatically but I cannot click it.
How can I make it clickable in RichTextBox?
Thanks
Chris... more >>
Base Address Proprty
Posted by Steve Guidos at 12/13/2004 9:23:01 AM
We are writing a set of Windows Services using C#.NET that will run on the
same server. One of the developers here said that we should assign each
service its own Base Address using the Properties page, so that the services
won't conflict with each other. I cannot seem to find any informatio... more >>
How to transform a font into bold ?
Posted by Herve Bocuse at 12/13/2004 9:16:58 AM
Hi,
I have a C# font instance. I would like to instanciate a font equal to this
one but with the bold attribute. What is the shortest way to create the
second one from the first one ?
Thank you
Herve
... more >>
enumerations and out of scope values
Posted by Claire at 12/13/2004 9:06:27 AM
I have an enumeration of constants as follows.
public enum eDeviceErrors
{
NoError = 0,
ENOENT = 2,
EBADF = 9,
EACCES = 13,
EINVAL = 22,
Checksum = 40,
SeqNum = 41,
InvalidTour = 42,
CommandNotRecognized = 43,
FOPEN = 44,
LENGTH = 45,
TERMINATOR = 46,
FWRITE = 47,
FCLOSE = 48,
FGE... more >>
property get and set accessors
Posted by Mike P at 12/13/2004 8:50:29 AM
What does it do when you have a property with get and set accessors like
this?
public int PasswordAttemptWindows { get; }
Thanks,
Mike
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!... more >>
C# newbie question
Posted by Herve Bocuse at 12/13/2004 8:35:33 AM
Hi,
I have written a mini custom control in C#. In my assembly, there are 2
controls at the same level in the namespace hierarchy. The problem is that
when I add the dll to the toolbox in visual studio, the entry in the toolbox
takes the name of one of the 2 controls, and not the one I would l... more >>
Instantiating an object dynamically in C#?
Posted by DotNetJunkies User at 12/13/2004 8:34:17 AM
Hi,
Does anyone know how/if you can instantiate a C# reference type object dynamically? More specifically, my project has a number of classes that I've created and in some cases it would be very handy to be able to instantiate them based on a string variable representing their class name.
Here... more >>
How to call C# dll from VB6?
Posted by Jan at 12/13/2004 8:21:07 AM
Hi-
I'm new to C#, .NET. We have a C# dll that we need to work as an AIC with
Biztalk Server 2000 (since BTS 2000 does not support components built with VS
..NET). We were thinking we could write a VB6 dll that is compatible with BTS
2000 , and then call the C# dll from the VB6 dll. Is thi... more >>
IInternetProtocol's Read method (pulling my hair out)
Posted by biogates NO[at]SPAM yahoo.com at 12/13/2004 8:15:21 AM
I'm writing a small app in C# and I managed to let the browser call my
IInternetProtocol's Start and Read methods.
Problem is: I can't pass the data back to IE.
I have tried various signatures for Read, including:
public int Read(
IntPtr pv,
int cb,
out IntPtr pcbRead
);
public int Re... more >>
"Safe" event source to write to
Posted by Kevin C at 12/13/2004 8:11:40 AM
Is there a safe Application log event source? By safe, I mean one that will
always exist (excluding any manual deletion) on any and all normal xp, 2003
installations. I thought "Application" was one but apparently its not.
Kevin
... more >>
secure socket programming
Posted by laimis at 12/13/2004 8:11:02 AM
Hey guys,
Has anyone here done done socket programming with c# where you would connect
to secure server over SSL? After numerious searches online on google, I am
almost to the point where I believe that .net framework doesn't have any
classes for SSL sockets. Is that true?
So if I want to m... more >>
"Requested registry access is not allowed" and Web Service call
Posted by Clint at 12/13/2004 8:05:17 AM
Hey all -
I'm having a really confusing problem concerning a web service. Right
now, I have an application that needs to call a web service that does
nothing but return "true" (this will obviously change once the
program's fully built to actually do something, but for testing, it
works).
T... more >>
TextBox ID problem
Posted by Josema at 12/13/2004 6:13:03 AM
Hi,
I have a TextBox inside a usercontrol, in the onInit method i put its ID
property to a string value, like this: MyTextBox.ID="test";
but when the user control is renderer into the internet explorer and i see
the source code, i see that <input type text id=_ctl1_test>
Why im getting... more >>
How to obtain
Posted by palmouf NO[at]SPAM hotmail.com at 12/13/2004 5:36:54 AM
Hi everyone,
I am looking for a function and/or a DLL which could provide me the
List of files in use by a Process (under Win2k or Win XP)
I hope you have an answer. I am now using an Executable file which
gives me the result and use an output redirection to get the different
filenames, bu... more >>
Outlook access Pop-up
Posted by W Akthar at 12/13/2004 5:15:00 AM
Hi,
I have written a console application which accesses
emails stored on outlook and information about them into
SQL Server.
The program works but I have click yes to all the pop-ups
that appear to say another program is trying to access
outlook. Is there a way to stop this pop-up from
... more >>
Problem with DataBinding (DataTable to ComboBox)
Posted by Stijn Goris at 12/13/2004 5:07:04 AM
Hi all,
I have 3 Comboboxes i want to bind with 3 different DatTables. I use
this.cbxProductCategory.DataSource = myDataTable;
this.cbxProductCategory.DisplayMember = "PTCA_DESCR";
this.cbxProductCategory.ValueMember = "PTCA_CODE";
to bind the data.
Although I 'm 100% the data is i... more >>
SystemParametersInfo and pvParam
Posted by Mohammad-Reza at 12/13/2004 3:59:01 AM
In SystemParametersInfo API, type of its pvParam is PVOID.
I want to know what type I must use to both set and get of this api works
properly.
... more >>
MDI
Posted by Hayaku at 12/13/2004 3:37:37 AM
How to detect active MDI Child inside the MDI parent?
thax... more >>
Array of string to Enum types
Posted by Popoxinhxan at 12/13/2004 3:21:01 AM
Hi guy, i just wondering that is it posible to convert the array of string to
enum types dynamically, for example i get the list of countries name from
database and would like to convert all of them to Enum. If so please show me
the way to do it
Thank you very much
Thomas... more >>
process communication between vb6 and c#
Posted by AMunk-Wendlandt NO[at]SPAM istis-dot-de.no-spam.invalid at 12/13/2004 2:51:47 AM
Hello,
i have two applications (once in vb6 and once in c#) which have to
communicate together. They have to send and receive strings.
I used api-method sendmessage, but it doesn't work.
in vb:
Private Declare Function SendMessageByStr& Lib
"user32" Alias "SendMessageA" _
(ByVal hWnd... more >>
Few questions
Posted by ×™×•× ×™ גולדברג at 12/13/2004 12:23:01 AM
Hi,
1. Is there some good c# printed magazine?
2. I see this forum has not many activity,
where can i find c# forum with more activity?
3. visual studio 2005 has release version already?... more >>
Validate DateTime pattern
Posted by diemos at 12/13/2004 12:19:07 AM
Hi,
How i can check if a string is a valid DateTime pattern?
In java i can use the class SimpleDateFormat that throw an exception when is
initialized with an invalid datetime pattern. There is any class in C# that i
can use?
"yyyyMMdd" --> Correct format pattern
"dd44fgfd" --> Incorrect fo... more >>
|