all groups > c# > july 2007 > threads for monday july 23
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
Why is C# more prfferred than VB.NET.
Posted by Snehal at 7/23/2007 11:04:03 PM
Why do software industries go for C# than VB.Net ?
Wats the exact difference...
Which can be the best option..
... more >>
Looking for Hash table with sor and search method
Posted by sam at 7/23/2007 10:35:01 PM
I need to store and sort a list of key/value items. The key is a date (year
and month) like this yyyymm and the value is a string.
The key must not be unique and accepts doublon.
With this Table I need to sort by key (date) and make a search for
extracting some items.
Wich collection can do t... more >>
Items in toolstrip and menustrip disappear?
Posted by Doc John at 7/23/2007 7:03:44 PM
After I've added the menustrip and the toolstrip to my MDI windows Form (and
I've added their respective items), I notice that the items disappear.
They're still in the code, but the association between the bar and the items
(i.e. toolStrip.Items.AddRange) disappears. How come? This is happeni... more >>
Increment Version ID
Posted by shane at 7/23/2007 5:55:15 PM
I want to be able to give the customer a visual representation of a product
ID number for ever time the program compiles. Currently we save each
instance and have to reply on a very long global ID to communicate
versioning between our developers and clients. What is the best method to
increm... more >>
Attempted to read or write protected memory. This is often an indication that other memory is corrupt
Posted by Sugandh Jain at 7/23/2007 5:46:48 PM
Hi,
I am getting the error message
Attempted to read or write protected memory. This is often an indication
that other memory is corrupt.
It was not coming until yet, for around 2 months. Now, may be the records
have increased and so i am getting this.
anyone has any idea why and when do w... more >>
adding a hard coded number to a short creates a build error
Posted by TS at 7/23/2007 5:33:50 PM
short x = 1;
//this has build error saying missing conversion
x = x + 2;
Why can't you just add this?
I guess the 1 is a literal that translates to an int32?
How would I accomplish this statement?
... more >>
Editing Existing Excel Worksheep in .Net
Posted by anthony.gilliam NO[at]SPAM gmail.com at 7/23/2007 5:32:27 PM
Hi programmer people.
A vendor of mine uses an Excel workbook as an order form. I'm trying
to write a csharp code in VS '07 that could import the workbook and
edit it.
I am able to import the workbook into my project. What syntax do I
use to initialize the workbook as an object so that I... more >>
OT Fantasy Football
Posted by steve.falzon NO[at]SPAM at 7/23/2007 4:33:11 PM
Hi Folks
The new footy season is almost with us, in England anyway :)
I've just created a public league on the Times **FREE** fantasy
football league game so if anyone wants to join up please do.
My league is called Red Dwarf Crew and it's public so no password
needed.
The game seems p... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Screen logger class
Posted by Andrus at 7/23/2007 3:21:11 PM
How to create screen logger class from WinForms application.
It should have the following methods:
Open() - creates a window in screen
Writeln(string s) - writes text to this window
Close() - closes the window
The issue is with Open() function.
How to create a window which remains in scr... more >>
how to validate QueryString?
Posted by Jassim Rahma at 7/23/2007 2:10:01 PM
I have an ID which I pass from the QueryString["id"]. The id is integer only
and I want before performing any action to validate if the Id is valid
integet.
... more >>
trim the string
Posted by seema at 7/23/2007 1:54:08 PM
Hi,
I have a string line = " DOL : 12/04/09 "
I want to remove the white spaces and to get the string like
line = "DOL : 12/04/09" ;
i have th e following coding but it is not going to if statement.
line.Trim();
if... more >>
bind Dictionary to DropDownList
Posted by John Grandy at 7/23/2007 1:38:43 PM
Is it possible to bind a Dictionary to a DropDownList ?
The most obvious code fails :
Dictionary<string,string> dictionary = new Dictionary<string,string>
dictionary.Add("Name1","Value1");
//add some more items ...
DropDownList.DataSource = dictionary;
DropDownList.DataBind();
The d... more >>
Custom DataGridViewColumn. Doesn't accept some of the chars. Help
Posted by lbelkova NO[at]SPAM netzero.com at 7/23/2007 1:25:31 PM
Hello,
I've created a custom DataGridViewColumn. Everything work well, except
for some reason the column doesn't accept some of the chars: "q", "."
and "'". Did anybody have a similar problem?
Please let me know. Any help will be gratefully appreciated.
Thanks.
my code:
public class R... more >>
Easily distributable database
Posted by JB at 7/23/2007 1:10:08 PM
I'm writing a data driven app, its all just about finished but i
havent decided how to store the data.
I'm looking at some form of database. Requirements:
Easy to Distribute, hopefully just some hard disk files.
Relatively quick to query.
I think in this case, speed is secondary to ease of us... more >>
install web service in a Setup Project
Posted by Rogelio at 7/23/2007 12:56:03 PM
I know this has been answered, I just can't find it.
can someone point me to a URL or thread that shows how to install a web
service in a Windows Setup Project ? I need to install a windows app, but it
must install a web service in IIS too.... more >>
Help tracking class property initializations
Posted by at 7/23/2007 12:55:25 PM
I have a class with public members, and I need to know whether those
members have been explicitly initialized. I could accomplish that
with a class like this:
class C
{
private bool m_isSet = false;
private object m_object;
public object MyObj
{
get
{
... more >>
strings
Posted by seema at 7/23/2007 12:54:04 PM
Hi,
I have a following strings
strA = " 1 my first work out".
strB = "2 my second work out"
strC = " My last work out"
My strA and strB first char is int and strB first char is " ". I want to
check if in a string first char returns int (1, 2 or ---) then do this
otherwise do ... more >>
event handling for list view question
Posted by a at 7/23/2007 11:51:16 AM
Hi,
I have a 3-column listview. It has to return the value of the cell when the
user click the listview.
The SelectedIndexChanged event and ItemSelectionChanged Event only return
the row information (ListViewItem).
If I want to return the cell value of the second and the third column, which
... more >>
Unmanaged pointer
Posted by eusebiu at 7/23/2007 9:57:29 AM
Hello... I am making a Sytem.IntPtr with Marshal.AllocHGlobal(int)
(Allocates memory from the unmanaged memory of the process using
GlobalAlloc - MSDN Definition for Marshal.AllocHGlobal) and after
copying the data from a byte[] buffer to the IntPtr(with
Marshal.Copy), I send the IntPtr to an un... more >>
C++ wrap to C# efficiency
Posted by chrisben at 7/23/2007 9:44:01 AM
Hi,
I have some C++ static library which I would like to wrap and use in C#
applications. It appears that I have two options.
1. Wrap the static library as dynamic library (dll), use unmanaged C++. Then
invoke the method in C# by DllImport.
2. Wrap the static lib using managed C++, whic... more >>
ClickOnce Updates
Posted by Looch at 7/23/2007 9:03:35 AM
All,
Does the folder that an application will look to for updates need to
contain the source files for the project, or the published .exe and
associated files?
Thanks in advance.
... more >>
.NET Binary Remoting
Posted by Jeremiah Gowdy at 7/23/2007 7:58:35 AM
I am interested in deploying .NET binary remoting in a few applications, and
I have learned how to do remoting via interfaces so that I don't have to
share the actual class code with the client (although the interface
definition has to remain in a shared DLL). Now I am trying to figure out
... more >>
Website that will allow a user to restart a service on another computer.
Posted by Mufasa at 7/23/2007 7:53:47 AM
I have a website that does all kinds of maint. functions for our systems.
One of the things I'd like to do is be able to restart a service that's on
another computer. Can somebody point me in the right direction to do that?
I think there may be issues of user privileges.
TIA - Jeff.
... more >>
Missing Navigate Backward Button in Standard Toolbar in Visual Studio 2005
Posted by samueltilden NO[at]SPAM gmail.com at 7/23/2007 7:48:18 AM
I started a new job and the version of Visual Studio 2005 that I am
now using does not have the Navigate Backward Button nor the Navigate
Forward Button in the Standard Toolbar, and they are not available
when I Add or Remove buttons from the Standard Toolbar.
(I had these two buttons in the V... more >>
How to disable validation on a datagrid
Posted by JoZ CaVaLLo at 7/23/2007 5:28:23 AM
I'd like to disable the validation on a datagrid, in order to validate
only when the user click the OK button. How can I do this?
... more >>
On-Demand automatic .NET installer
Posted by shimon at 7/23/2007 3:24:04 AM
Hello
I would like to create an installer to my C# project.
BUT
1) I don't want my user to install the .net framework 2 manually,
because many will just give up installation.
2) I don't want to create an installer with .net of 22 or more MB
because my application is only 2 MB so it is ... more >>
How to set the max heap size in C#?
Posted by Paul at 7/23/2007 3:00:45 AM
Dear all,
I am writing an application which constructing a fairly big tree for
some financial pricing application. How can I increase the heap size
of the .NET runtime environment?
I have tried doing it in Java before which I can set use the /mx flag
in the java runtime. How to do equivalen... more >>
How to limit program can only run one instance.
Posted by Boki Digtal at 7/23/2007 2:47:18 AM
Hi All,
How to limit the c# program can only run one instance at the same
time ?
Thank you!
Best regards,
Boki.
... more >>
When set border as none. screen looks strange.
Posted by Boki Digtal at 7/23/2007 2:38:09 AM
Hi All,
I want to make my form's border as MSN like. ( no border )
However, sometimes, it still can show up the border for user to choose
other functions.
The issues is - when I set border between None and 3DFixed, the
background ( maybe desktop or another application form ) often become
... more >>
The right way to dispose a NativeWindow?
Posted by tomko at 7/23/2007 2:22:48 AM
Hi,
What is the right way to dispose of a NativeWindow? I guess the
NativeWindow is managed code and will be cleared by the GC, but the
window handle it is holding is a native handle!
I'm using the standard dispose code:
NativeWindow nativeWindow;
protected void Dispose( ... more >>
serializing a COM object
Posted by at 7/23/2007 1:35:31 AM
Is it possible to serialize a COM class for which you don't have the
source code? Obviously it won't work without the [Serializable]
attribute, which I can't add, and implementing ISerializable on a
derived class won't help because I don't have access to the private
fields that I would need to w... more >>
String in the exe file.
Posted by Boki Digtal at 7/23/2007 12:59:35 AM
Hi All,
I have some special strings in c# code, and I complier it to exe file.
I opened the exe file by a UltraEdit, I can't find the string I define
in code.
Does that mean other people can't find the string as well?
Best regards,
Boki.
... more >>
How to create assembly
Posted by Andrus at 7/23/2007 12:00:00 AM
I have 120 .cs files in single directory containig POCO s like:
Entity1.cs:
namespace Model {
public class Entity1 {
string property1;
public virtual string Property1 {
get { return property1; }
set { property1 = value; }
}
}
}
Entity2.cs:
namespace Model {
publ... more >>
Can this be done via .net generics? How?
Posted by Andy Bell at 7/23/2007 12:00:00 AM
Can this be done via .net generics? How? The % signs below are just to show
how I want to do it, I realise they're not valid syntax.
public abstract class BaseSelectionRequirement {
...
protected Type mControlType;
protected string mFieldName;
protected Type mFieldType;
protecte... more >>
system tray or windows services?!!
Posted by Jassim Rahma at 7/23/2007 12:00:00 AM
did you see the CNN or BBC dekstop news alert software? I want to develop
the same but for banner advertisment and I want to if I should do it as
system tray ir windows services?
... more >>
WithEvents question
Posted by Yoavo at 7/23/2007 12:00:00 AM
Hi,
Is there an equivalent code for "WithEvents" (of VB6) in CSharp ?
Yoav.
... more >>
Only writing 1 byte to a file stream on one pc in office
Posted by Claire at 7/23/2007 12:00:00 AM
Hi,
I read image data from a database and cache them locally to file via a
filestream.
One of my users commented that his application isnt showing images. On
checking his file cache I found that most of the files were only 1 byte in
length. I deleted all the files, re-ran the application and ag... more >>
<newbie> 2-dimmensional generic list, how?
Posted by Jeff at 7/23/2007 12:00:00 AM
..net 2.0
I'm trying to create a 2-dimmensional (sorry if i speld it wrong).
List<string, string> hello;
this code doesn't work
What I want from this is a list where each item holds 2 values. one value
specify the type of info the other value have. The field specifying the type
could b... more >>
Text file into array of words
Posted by Bhagya at 7/23/2007 12:00:00 AM
Hello All,
Suppose the Contents of Text file is:
Name Age Address
AAA 5 #22
BBB 8 #99
-------------------------so on
Can anybody tell me how to split this and insert this into a
multidimensional array??
... more >>
asynchronous design pattern and event
Posted by marian.kovac NO[at]SPAM gmail.com at 7/23/2007 12:00:00 AM
Hi, I have this simple sample code:
class SearchRange
{
static int m = 0;
static void Main(string[] args)
{
Discover discover = new Discover();
// Add discovered device handler
discover.DiscoverUpdate += DiscoveredDeviceCallback;
// Add progress handler
discover.Progress... more >>
Invalid page fault
Posted by Adrian at 7/23/2007 12:00:00 AM
I am getting the error"Invalid page fault".
I cannot reproduce the error while in VS, so I don't know what to look for.
Any suggestions?
Many thanks,
Adrian.
... more >>
<newbie> Dictionay.ContainsValue problem
Posted by Jeff at 7/23/2007 12:00:00 AM
..net 2.0
I have a Dictionay object Dictionay<int, string> in my app. This dictionary
holds values like these:
0, "NOOB"
0, "HELLO WORLD"
0, "TEST"
1, "BUG"
1, "CRASH"
1, "NOOB"
I want to perform a check against this dictionay object to determine if a
specific key & value already exi... more >>
|