-
- Underline blues (big time)
by PaulLeBlanc
- 14 Replies
- Last post
by PaulLeBlanc
- Hi, from what I can tell you don't get underlines until manual compile, which is fine with me. My problem seems to be that the compiler won't flag local variable problems at all. Can this be To wit: class EditorTest { Foobar foo = new Foobar(); // this gets flagged and Foobar is underlined public static void Main(String[] args) { Foobar foo = new Foobar(); // this does not get flagged.
-
- Screensaver Description String
by J.C. Coelho
- 2 Replies
- Last post
by Vojta
- Hi there, I'm trying to finish up a screen saver I wrote in C# using the GDI+ and .net 2.0. I have a few last things to go, the main one being adding a resource that shows up in "Display Properties" > "Screensaver" as the screen saver name. I know that with Win32 you simply add a string resource that reads something like STRINGTABLE DISCARDABLE BEGIN IDS_DESCRIPTION "My
-
- Interfaces, Operators and Conversions
by dhakehurst
- 14 Replies
- Last post
by EBF_2
- I am trying to define a class library.
The classes all implement an interface.
In addition I want to provide implicit conversion and operators for the defined types.
This is most easily illustrated if I use a simple example, such as providing my own
String class - MyString. (I actually want to do this with a a variety of different classes, the use
of MyString is simply a way to
-
- What is settings.settings?
by Jack Tripper
- 9 Replies
- Last post
by Jack Tripper
- i had a long post, but i lost it - so here's the abbridged version
What is settings.settings What is app.config
Is settings.settings a subset of app.config Is app.config a superset of settings.settings Is settings.settings a superset of app.config Is app.config a subset of settings.settings
Can the two get out of sync Does one override the other and therefore they are by definiti
-
- parse file location
by VooDoo Chicken
- 2 Replies
- Last post
by VooDoo Chicken
- hi, is there any class that can parse local files location as in, c:\somedir\anotherdir\somefile.txt, that can retrieve the filename, or the directory, extension or the base drive etc, without doing it by hand or with string modifiers, or without knowing all wildcards that may have a filename
-
- Vista doesn't start .sln and .csproj-files
by Wuschba
- 14 Replies
- Last post
by BT Mike
- I just installed a Windows Vista and Visual Studio on it. Everyting seems to work fine except of that I'M not able to double-click on a .sln/.cs/.csproj-file to lunch VS: Just nothing is happening. What is wrong
-
- Best way to handle a single access point to muliple senarios
by uncle hammy
- 1 Replies
- Last post
by OmegaMan
- I am trying to complete the security model for an app I am working on. The security model looks like this.... Level 1: yes/no, user has access to an application module Level 2: Define user's permissions to an application module (i.e. read, write, create, etc) Level 3: Defined user's permissions to a specific record within an application module (i.e. user may have no delete permissions to the "
-
- What should I do? ---help...
by shieldy
- 4 Replies
- Last post
by Paul Louth
- when I'm doing a MDI application, I have to catch the event : when the child window is closed by click the control box. that means I have to do something before dispose the child.
as :
mdiParent is form1, the child window is cld. should I add event process and How
thank you!!
-
- Bitmap image to a image stream
by Walter Igo
- 1 Replies
- Last post
by Peter Ritchie
- I have a bit of code that creates a avi file and it works with streams. I have a bit of code that will get a screen capture. but it creates the image (in memory) here is the code.
Bitmap theScreenShotBitmap = new Bitmap ( Screen .PrimaryScreen.Bounds.Width, Screen .PrimaryScreen.Bounds.Height, System.Drawing.Imaging. PixelFormat .Format32bppRgb);
using ( Graphics theGraphics
-
- Parse CSV and Populate Array/Controls
by Chazwazza
- 2 Replies
- Last post
by Chazwazza
- Hello, I'm having a problem with the implementation of a program. I have a file as follows (user supplied):
%Blasted Lands% Orc Outpost,-10859,-2663.38,7.80049,0 Altar of Storms,-11272.8,-2547.59,102.02,0 Dark Portal,-11853.6,-3197.44,-27.2186,0 Azureload Human Town,-11033,-3095.22,89.8189,0 %Burning Steppes% Dreadmaul Rock,-7924.68,-2624.44,220.958,0 Giant Orc Statue,-8066.68,-1621.66,132.982,
-
- Disable right-click mouse button
by Nikraz
- 2 Replies
- Last post
by Figo Fei - MSFT
- How can I disable the right-click on the mouse button in C#
-
- Unable to map a network drive using C#
by mesh2005
- 3 Replies
- Last post
by Parmesh A
- I tried to map a network drive using the code (at the end of this
post) but I got a "Login Failed 1326" which occur because of a bad
username or password. I'm sure that the username and password are
correct, I tried to map a drive using the Windows (Tools->Map Drive)
and it worked successfully using the same username and password.
The shared drive is on a linux machine using SAM
-
- Timespan between two times
by HarryBedi
- 3 Replies
- Last post
by Matthew Watson
- Guys,
I am trying to work out if a timespan I get bac is greater than a designated amount of time. However, my designated time always defaults to zero, even though it should be 2000 milliseconds.
The code is as follows.
public void WorkingTime (DataTable dt)
{
foreach (DataRow row in dt.Rows)
{
if (row["Action"].ToString()=="Working" &&
-
- Thread.Sleep
by Level255
- 3 Replies
- Last post
by Level255
- Hello,
I have a problem about Thread.Sleep
When I call Thread.Sleep my program is not response for awhile
public class MyClass
{
public myClass()
{
Thread _thread = new Thread( new ThreadStart(run));
_thread.Start();
}
private void run()
{
while (true)
{
mySleep(1000);
Console.writeln("Hello");
}
-
- question on operator overloading
by Paresh_Sen_3889e7
- 3 Replies
- Last post
by Paresh_Sen_3889e7
- Can anyone explain me with an example,
why we cannot overload C# operators for objects that we have not created
-
- string is a reference type, still while passing in function it doesn't behave like that
by bhavu
- 12 Replies
- Last post
by Matthew Watson
- Hi,
string is a reference type, still while passing in function it doesn't behave like that
I have below function
private void button1_Click( object sender, System.EventArgs e)
{
string s = "";
test( s);
Messagebox.show(s);
}
private void test( tring str)
{
str = "this";
}
When I run above program, it shows me e
-
- Which coding convention do you use?
by cyberjoe2
- 2 Replies
- Last post
by Gabriel Lozano-Moran
- Hi to all! I would like to ask you which coding convention do you use Regards,
-
- How to check if im able to rename a file in a directory?
by Akai
- 4 Replies
- Last post
by Matthew Watson
- Hi all
im writing a Windows Service program which checks a certain directory in my computer to see if there's any new files. If there's a new file created in the directory, i will rename the file. However if the HUGE file is being copied into my directory, i would need to check if the file is being used in any process. Only if the file is idle, i will call my code to rename it. Im using Fi
-
- C# or VB.NET
by Hooman0
- 4 Replies
- Last post
by CodeButcher
- Hi,
I wondered If I could choose C# or VB for my programming language because I am new in programming and I heard in order to learn C# I need to learn C++. Can anybody help me what should I do as a begginer in programming
Thankx
Hooman
-
- Instanciating generic without giving type;
by Steve Jackson
- 12 Replies
- Last post
by Thomas Danecker
- Hello all.
The below code won't work, but it shows what I am trying to do; Basically, I want to create a Generic class (GClass), create a class that uses it (SomeClass), then instanciate the second class from a third class, passing an instance of the Generic class whose type has been defined.
I don't want to make the second class (SomeClass) generic if I can avoid it, and I would wra
-
- Searching in a text file
by hadjici2
- 6 Replies
- Last post
by Sudeesh
- Hello
I have a text file with a list of numbers and names.For example
345623 John
234800 Jim
298756 Maria
with about 40000 such entries.
I would like to search the text file for a specific number and display the associated name. How can i search fast the text file I dont want to use any kind of collection if possible.
regards.
-
- How to call .NET 2005 assembly from .NET 2003?
by Jessica Alba
- 3 Replies
- Last post
by Figo Fei - MSFT
- Sample source code will be great.
Thanks
-
- Cancel downloading data from a Sql Db
by Handschuh
- 4 Replies
- Last post
by cjard
- Hi
How can I cancel/stop this command: adapter.Fill(table) I am executing GetData() in a BackgroundWorker - if it takes too long I want to allow users to quit downloading data.
public DataTable GetData( string sqlCommand)
{
SqlCommand command = new SqlCommand (sqlCommand, connection);
SqlDataAdapter adapter = new SqlDataAdapter ();
adapter.SelectCommand = command;
DataT
-
- bitmap.equal doesn't work
by Automation Expert
- 2 Replies
- Last post
by Automation Expert
- In the code below, the if statement is never true, though I expect it to always be true. The button does display the new bitmap. How can I create a comparison that tells me the current bitmap resource used by a button
(( Button )sender).BackgroundImage = PadTest.Properties. Resources .tabGreen;
if (PadTest.Properties. Resources .tabGreen.Equals((( Button )sender).BackgroundImage))
{
-
- Choosing generic types at runtime
by Nick Coleman
- 2 Replies
- Last post
by Nick Coleman
- Hi I think what I'm trying to do is impossible, but before I change my approach I thought I'd ask here. Say I have the following classes and interfaces: InterfaceA InterfaceB<T> where T : InterfaceA ClassA:InterfaceA ClassB:InterfaceB I know that I cannot cast from ClassB<ClassA> to InterfaceB<InterfaceA> but is there any way of declaring a variable of InterfaceB with out specifi