all groups > c# > october 2005 > threads for friday october 28
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
Inheritance and Interfaces
Posted by GSL at 10/28/2005 11:49:59 PM
I need help understanding why the following code causes an
InvalidCastException?
//I created an Interface
public interface IFoo
{
string a {get;}
}
//Then a class that implements the interface
public class Foo: IFoo
{
string a {get "something";}
}
//Then a special class that de... more >>
Banning an IP programatically?
Posted by Brian Kitt at 10/28/2005 10:08:02 PM
I know how to ban an IP from the firewall. Is there some slick way to code a
trap on my website to check IP and redirect them to a 'banned' page? That
way they have the option to contact me if they are legitimate (via contact
information on that page). I know that I could, at the top of eve... more >>
How to find IP owner?
Posted by Brian Kitt at 10/28/2005 10:05:01 PM
I have a C# Web Application, and we are getting banged repeatedly by a web
crawler at a specific IP address. I did an internet lookup on the IP address
(http://www.ip2location.com), and it just says it is owned by Cox
Communications. I don't know if it belongs to a specific customer of Cox, ... more >>
Another form issue with MainMenu
Posted by Marty at 10/28/2005 7:37:28 PM
Hi,
I have this issue where a form that contain a
System.windows.forms.mainmenu has its height increased by the height of
the mainmenu at object creation level.
Here's the idea:
//form creation
frmMyForm myForm = new frmMyForm();
//frmMyForm constructor
public frmMyForm() : base()
... more >>
Form positionning top left
Posted by Marty at 10/28/2005 5:15:12 PM
Hi,
When creating a form, how can we set its property .left and .top to be
handled when the form is showed. Because, if I first assign values to
..left and .top, and secondly I call .show(), then the form does not
display at the correct screen location.
ex:
System.windows.forms.form my... more >>
delete folders, subfolders and files (some maybe read only or hidden)
Posted by Pete Gomersall at 10/28/2005 5:04:42 PM
Hi All,
I have seen many examples of deleting folders with subfolders and files.
(system.io.directory/info etc delete method)
However, I cannot find a decent code example which will work where some
folders/files maybe read only or hidden. I know, basically have to change
the file attributes ... more >>
Form won't stay away...
Posted by Tim at 10/28/2005 3:52:32 PM
Hi
I have the following code to open a form modally. It works great only the
second time I have to close it twice, the third time 4 times.
I am using Dispose(), why is it coming back so much?
Tim
MM.Forms.frmPriceCalc fCalc = new MM.Forms.frmPriceCalc();
fCalc.RegPriceCalc = true; //r... more >>
Problem updating Access Database
Posted by (delta7 NO[at]SPAM nospam.co.uk) at 10/28/2005 2:58:58 PM
Hi,
I'm new to C sharp and currently writing a small program that uses an Access 2003
database.
I am currently having a problem when updating a row that includes numeric data.
When updating just the text fields in the row everything works fine with the
following command:
dbComman... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
I need help on the best why to query network status
Posted by Christopher C at 10/28/2005 2:41:02 PM
I am currently working on an app the will be a shell replacement. Part of the
goal is to list the current network status; basically I need to know if the
network card is plugged in. I am currently using WMI to query all adapters to
see if they have a connected status. The status is updated eve... more >>
System.OutofMemoryException
Posted by Mike L at 10/28/2005 2:21:05 PM
This is for a Win form.
Before I made changes to my text boxes this code worked. I don't think I
touch any code relating to my datagrid. Code should populate my datagrid
with blank data, this use to work but now I get a
"System.OutofMemoryException", on the DataRow dr = dt.NewRow();
... more >>
Transparent Textboxes
Posted by Mike L at 10/28/2005 2:21:03 PM
This is for a Win form.
After creating my new Textbox Class, all my instances of my new Textbox
Class are transparent. My textbox class inherits
System.Windows.Forms.TextBox, why would my text boxes be transparent? How do
I fix this?
... more >>
Streaming large files over network
Posted by A.M-SG at 10/28/2005 2:07:36 PM
Hi,
I have a ASP.NET aspx file that needs to pass large images from a network
storage to client browser. The requirement is that users cannot have access
to the network share. The aspx file must be the only method that users
receive image files.
Essentially, the aspx file is an i... more >>
View Contents of CHM file within .NET app?
Posted by Jon Pope at 10/28/2005 1:35:49 PM
Is it possible to view the contents of a CHM file within IE? I've attempted
to do this by right-clicking on a CHM file then selecting "Open With..." and
finally selecting "IE", but nothing happens.
What I'm attempting to do is allow the user to open an MDI child within
their .NET app and v... more >>
upper limit to Session variables?
Posted by Amy at 10/28/2005 12:16:38 PM
Is there an upper limit to how many Session variables you can
transfer? I'm working on a utility application that passes info from
a web form into a pdf. There's no database access, so I'm using
Session variables, but it's going to end up being a lot of data. Is
this the best way to do it, or... more >>
viewstate - datagrid and intermittent errors.....help
Posted by deevoy NO[at]SPAM gmail.com at 10/28/2005 12:08:50 PM
Hi-
I'm developing a asp.net web application and everything has proven fine
on the dev and acceptance environment.
We've moved the code up to our windows server 2003 prod environment and
get the following intermittent error when browsing the web page through
a client browser (the action causing... more >>
How to pass SQL Command and Parameters to another form?
Posted by Tim at 10/28/2005 11:57:46 AM
Hi,
I am trying to pass a SQL Command, complete with parameters and their values
from one form to a modal form.
The modal form has;
public void GridDataPreload(System.Data.SqlClient.SqlCommand cmdPreload)
{
}
the calling form has;
fSaleItems.GridDataPreload(this.cmmSQLUpdateSaleReview... more >>
P# compiler
Posted by alberto at 10/28/2005 11:48:55 AM
Does somebody know where I can find the P# compiler?
Thank you
... more >>
Reflect field inside method
Posted by John Bailo at 10/28/2005 11:46:18 AM
Is it possible to Reflect a variable inside a method?
I can Reflect a class field using GetField, but can I reflect a
variable/field from inside member?
For example, I want to Reflect samp inside of the method:
public int myMethod()
{
string samp = "five";
// Get type infor... more >>
HELP - Global hooks
Posted by Víctor at 10/28/2005 11:31:20 AM
Hello,
I'm doing a kind of Windows TaskBar application and I've found a problem.
When I want to show open application's buttons I need to search in each
Process running at PC and system becomes too slow. I thinked to modificate
the process by using a global hook to intercept Window Opening,... more >>
A few easy VS 2005 questions
Posted by Jules Winfield at 10/28/2005 11:11:45 AM
I'm loving VS 2005. These are my questions and comments so far:
BUG: Autoformatting
================
I've turned off virtually all autoformatting, but there is still one place
where it rears it's head even after it's been turned off. Reproduce the
problem as follows:
1) Turn off all auto... more >>
Char Unicode value and converting to byte
Posted by Gidi at 10/28/2005 10:57:03 AM
Hi,
I'm writing a C# win application program, and i need to transfer my hebrew
letters from unicode to ascii, now if i use the ascii encoding it writes me
??? instead of the hebrew letter i've entered. I know what the Ascii value of
each letter, so i understood that i can transfer my string... more >>
string.Format performance
Posted by A.M-SG at 10/28/2005 10:48:10 AM
Hi,
I have the following code at the heavily demanded server side service:
strResult=str1+"\\"+str2+"\\"+str3+"\\";
Would it be better (performance wise) that we change it to this:
strResult = string.Format(@"{0}\{1}\{2}\",str1,str2,str3);
Which one is faster?
Thank you,
Alan
... more >>
Why is my data library constantly out of sync?
Posted by Robert W. at 10/28/2005 10:45:04 AM
I have a WinForms app in which I have several data object libraries. One of
them is called "DataObjects" (excuse the unoriginality of my naming!).
Anyhow, I keep on getting messages like this when I compile my main app:
Warning: The dependency 'DataObjects, Version=1.0.2127.16824,
Culture... more >>
How can... audio + text quesion
Posted by Raj Chudasama at 10/28/2005 10:20:45 AM
I am streaming an audio presentation with which i will also have some text.
I would like to remember the text that was displayed with the audio. I want
this to be replayable later thus requires that text be displayed at the
appropriate time as the original presentation. (make sense?)
what ... more >>
IntelliSense not available for some classes
Posted by Dominik Gorsler at 10/28/2005 10:19:29 AM
Hi,
for some of the classes in my project, IntelliSense does not seem to be
available, whereas for others everything works fine.
I believe that for all the classes I have added after a certain date this
information lacks somehow.
I tried to rebuild IntelliSense information by deleting the o... more >>
VS.NET 2005 Available to download MSDN
Posted by Shawn B. at 10/28/2005 10:11:31 AM
Greetings,
Looks like we can download VS.NET Professional from MSDN subscriber
downloads, along with Visual SourceSafe 2005, Visio for EA 2005, and SQL 2k5
Developer.
My DSL only has 180kbps so do download the VS.NET ISO alone (3,7GB) would
take about 48 hours. SQL 2k5 is 2.7GB, that wo... more >>
How to insert a Page Break between each RenerControl(HtmlTextWriter)?
Posted by Rudy Ko at 10/28/2005 10:03:09 AM
Hi, All:
I'm populating database records into a panel controls and want to render
that panel into a HtmlTextWriter which will creating a word document. Do you
know how to insert a page break between each records?
Thank you for the help.
Below is my code:
Response.AddHeader("Content-D... more >>
Getting Class and Method name at runtime
Posted by gmccallum at 10/28/2005 9:26:02 AM
Is there a way to get the name of the class and method in code when not
running in debugger.
For example:
class myclass {
const string modulename = "myclass";
public void mymethod()
{
const string methodname = "mymethod";
string output = "You are in " + modulename + "." + me... more >>
N-Tier, is the right choice?
Posted by Adine at 10/28/2005 9:12:32 AM
Hi,
I need to develop a program to control electronic instruments. We have so
many different instruments but we can group them. Each group has some common
functions. When user choose an instrument, the other instruments may not be
needed at all. So I was thinking if I want to write one exec... more >>
Total Newbie : How to create virtual directory/sub-directories??
Posted by aepearson NO[at]SPAM gmail.com at 10/28/2005 8:33:14 AM
First off, yes, I used the search as a first step. But I am a complete
newbie when it comes to C# and a lot of the help I found was of no use
to me because of my limited knowledge of the language and how it works.
So please bear with me, haha.
What I need:
--A command line executable applic... more >>
ActiveX problem
Posted by alexmaster_2004 at 10/28/2005 7:45:05 AM
Hi There
Consider the following error that I receive when trying to instantiate the
web browser control:
An unhanded exception of type 'System.Threading.ThreadStateException'
occurred in system.windows.forms.dll
Additional information: Could not instantiate ActiveX control
'8856f961-340a-11d0-... more >>
question on VS 2005 Launch
Posted by Daniel at 10/28/2005 7:38:12 AM
Hi,
Seen on the VS.NET 2005 Launch page : >>All attendees will receive a full
version of SQL Server 2005 Standard Edition and Visual Studio 2005 Standard
Edition.<<
Will this version be crippled (in time) or will this truly be the full
(Standard) version?
Cheers,
Dan... more >>
tread complete notification
Posted by bill at 10/28/2005 7:12:53 AM
How would I signal the main app when a thread has completed a task.
The thread must remain actice. Every time it reads a given number of bytes
it must let the main app know, then wait until more data shows up. The
number of bytes it reads varies.
Thanks,
Bill
... more >>
Problem while casting
Posted by sunil at 10/28/2005 7:09:02 AM
hello there
I was doing a project in VB.net and i used the following code to access the
element of the parent form
#################Code #####
DirectCast(Me.Owner, PhysicalInventoryfrm).drpInvName.DataSource =
inventoryCombodataset.Tables(0)
#########
where "PhysicalInventoryfr... more >>
Intellisense not showing definitions
Posted by MDB at 10/28/2005 6:43:25 AM
Hello all, I have buildt a class library for my co workers to use, using C#
and vs.net and for some reason, when they reference this class in their
projects the Summary, params and returns are not being displayed in the
intellisense. Is there something special that I need to do for this to s... more >>
How to wrap winpcap
Posted by Nuno Magalhaes at 10/28/2005 6:40:11 AM
How can I use WinPcap or PacketX.dll to catch any packets that flow on
my machine network adapter?
Is there any sample code on how to do this?
I would like something like this... and without using any additional
..dlls:
-----------------------------------------------
using System;
using... more >>
Performance Hit for String.IsNullOrEmpty()?
Posted by Ken Wilson at 10/28/2005 6:18:28 AM
In spite of the obvious advantage of not encountering a
NullReferenceException unexpectedly in your running program is there
an offset cost in performance for using String.IsNullOrEmpty() over !=
""? If so, would it be of any great significance if a large number of
strings were being tested ove... more >>
Conversion of HANDLE from C/C++ dll into IntPtr in C#
Posted by noe at 10/28/2005 6:01:59 AM
Hello,
I am writing a class in C# that uses
[DllImport("DllWin32Ndisuio.dll")]to call functions from a C/C++ dll.
-------------------------------------
//Code in C# in Platform .NET
[DllImport("DllWin32Ndisuio.dll", CharSet=3DCharSet.Auto)]
public static extern bool ConectarNdisuio ( ) ;
... more >>
Wrapping WinPCap with DLLImports
Posted by Nuno Magalhaes at 10/28/2005 4:19:21 AM
Hello all,
Below I have a function that captures a packet and sends that packet to
a Receive function (wether it is sent or received).
I'm asking what functions should I use (what imports should I use and a
sample of source code) in order to get a "byte[] buf" filled with a
packet and using... more >>
DataGridView.ScrollToRow(int rowIndex)
Posted by Brian Keating at 10/28/2005 3:51:02 AM
Hi there does anyone have any idea on how to implement this function?
How i wish that DataGridView had a GridVScrolled function like the old
DataGrid but it doesn't so i'm wondering if there is another approach?
thanks in advance
Brian Keating... more >>
Newbie to C#
Posted by N at 10/28/2005 3:48:06 AM
Hi
I need to create a form that has a navigation panel similar to the outlook
bar in MS Outlook. Do I need to purchase a 3rd party tool for this, or is
this control available within C#. I am creating a windows application.
TIA
... more >>
TreeView CheckBoxes
Posted by James L at 10/28/2005 3:44:05 AM
I want to remove check boxes for the child nodes but keep a check box for the
parent node. Does anyone have any ideas?
Thank you kindly.
Warm Regards.... more >>
How do i have multiple cursors in my application.
Posted by berylwilson NO[at]SPAM gmail.com at 10/28/2005 3:37:34 AM
Hi all,
I have an MDI application, where the user can have more than one child
windows. Im trying to have a cursor for each child window and the
position of the cursor has to be synchronized with the cursor in the
active mdi child.
For this i have tried using a picture control with a arrow ... more >>
error handling
Posted by jack at 10/28/2005 3:26:19 AM
hi all
im facing a problem in error handelling.
what im doing is getting the images from the database to my
csharp application form .. now here in some of the records contains
images along with the data where as some as has null value ..
who to trap this please help
thanks f... more >>
SQL 'Unknown Error'
Posted by quilkin at 10/28/2005 2:07:02 AM
I am getting a System.Data.SqlClient.SqlException with a message string of
'Unknown Error'. Happens occasionally when creating a "new SqlCommand(...)"
while the same command works perfectly happily hundreds of other times. A
side effect is that the connection closes.
..NET version is 1.1, sam... more >>
Parsing text for hyperlinks
Posted by Sam Collett at 10/28/2005 2:04:22 AM
Say I have
string foo = "Some text http://www.google.com more text
fred.bloggs@somewhere.com more";
How could I parse it to find the links and store the results in a
string array, i.e. to get
string[] bar = ParseText(foo);
// bar[0] = "Some text ", bar[1] = "http://www.google.com", bar[3... more >>
Math parser
Posted by Janiek Buysrogge at 10/28/2005 12:00:00 AM
Hello,
Does anyone know if there is a library or a sample project that can
parse strings with mathematical expressions inside ?
eg. string math = "(23 + 48) ^ 2 - (7.76 * 3.14)";
parser should calculate the result of this.
Atm I have my own parser, but it can only handle very simple
expr... more >>
XML comments questions
Posted by Clive Dixon at 10/28/2005 12:00:00 AM
Q1: The intellisense summary info for a class only seems to update after a
change to that class's XML comments if I remove the reference to the project
from the current project and add it back again. Why so, and how do I stop
this?
Q2: The <seealso> tag seems to be required (by Vis. Stu. 20... more >>
ByteArray to String
Posted by Chris at 10/28/2005 12:00:00 AM
What is the best way to convert a bytearray into a string ?
I thought I could do it using the code below, but is there anything
faster/easier than this? Thanks!
Chris
int aLength = 100000;
byte[] myByteArray = new byte[aLength ];
string myString = "";
for (int i=0; i<aLength ... more >>
novice question
Posted by gordon at 10/28/2005 12:00:00 AM
Hi,
i am learning c# at home in my spare time (what a life), and i am working
through some examples. I run the following code and i get the following
error when the if condition is not met.
An unhandled exception of type System.FormatException' occurred in
mscorlib.dll
string charval=... more >>
Crystal Report question...
Posted by MounilK at 10/28/2005 12:00:00 AM
Hi all,
I am very much new to the world of Crystal Reports. On my server I
have say..10 reports(.rpt's); which are modified once in a while. On my
clients there are copies of these reports(.rpt's). What I'd like to do is
that each day when the client fires up, it checks the version of ... more >>
C# DataSet and CrystalReport in Windows Form
Posted by Jason Huang at 10/28/2005 12:00:00 AM
Hi,
Now that I've built up a DataSet and a CrystalReportViewer in Form1. Also
the CrystalReportViewer is pointing to CrystalReport1. The Form1 can open
the CrystalReport1.
However, I don't know how to have the CrystalReport1 or CrystalReportViewer
use the DataSet.
How does a textbox in ... more >>
Concurrency violation (new try)
Posted by Vladimir O¾ura at 10/28/2005 12:00:00 AM
I am building a pocket pc application that requires a datagrid. I am
inserting a new row this way:
private void mInsert_Click(object sender, System.EventArgs e)
{
try
{
DataRow dr = this.ldb.DohvatiDataSet.Tables[tableName].NewRow();
dr.BeginEdit();
for(int i = 0; i <... more >>
Logging Framework
Posted by Stanley Cheung at 10/28/2005 12:00:00 AM
hi all,
I want to install a (FREE) log framework to my application.
which logging package is easy to use?
or
which logging packaga is most popular?
Please advise. Thanks.
steambun
... more >>
Displaying only certain results in a DataGrid
Posted by scott at 10/28/2005 12:00:00 AM
Hi all, Iv got a slight problem with a datagrid and the ability to only
display certain things in it.
I have a Data grid which is connected to a data table.
The data table is connected to a data set which in turn gets its info from
an xml file and xml schema.
I am able to view... more >>
C#.NET COM interoperability: Arrays of UDT's in COM
Posted by Raj at 10/28/2005 12:00:00 AM
Hi,
This is regarding using Arrays of UDT's in COM.
The following is a short description:
- We basically need a structure, struct MAIN_STRUCT which must contain a
dynamic array of another struct, struct SUB_STRUCT. We have a interface
function that is callable by the client, which take... more >>
I need help to find cute cursors that drag glittery or have ...
Posted by TiggerBaby505 at 10/28/2005 12:00:00 AM
ok have u ever been on a website someone makes and they have these really
cool cursors that have some glitter or bouncy balls followin them? well i
need help to find out where to go and look for them... i really want to be
able to download or make them for my site... can anyone plz help me?
Tigg... more >>
Adding data to Deleted columns in a DataGrid?
Posted by scott at 10/28/2005 12:00:00 AM
Hi all, got a bit of a problem with a datagrid.
I have a datagrid that gets it information from a data table which in turn
is connected to a data set. The data set is linked to an xml file and an xml
schema for the rules.
The table that i have displayed in the datagrid has 2 columns ... more >>
|