-
- project namespace issues
by steveareno
- 3 Replies
- Last post
by steveareno
- I have a project that was working fine. I made some significant changes to the project, and then started getting an error saying some objects don't belong to the namespace, even though they are in the same project and have the namespace at the top of the class. It appears some pointer got messed up and now only newly added objects appear in the autolist members for the namespace. In fact, some obj
-
- Does not exist in the current context
by Shiloh Madsen
- 1 Replies
- Last post
by Freqy
- Ok, this has got to be one of the most utterly newbie questions out there, but this is my first programming class and I am stumped. At the momment I am simply trying to pass the value in a listbox to a messagebox. When I try to compile the code I get the message that VegetableLst does not exist in the current context. I know (think) I need to somehow pass that variable to the event handler, but am
-
- DLL Returns object {string[]}
by QuinDennis
- 12 Replies
- Last post
by QuinDennis
- Greetings,
Calling a DLL method that returns an array of strings, but I can't cast to string[];
object o = myMethod();
string[] s = (string[])o; //generates "Unable to cast object of type 'System.String[\*]' to type 'System.String[]'.
(I had to put the \* in, without the \, it treats it as a different [\*] as a different char)
The Autos window shows the data proper
-
- Public partial classes
by thukralz
- 8 Replies
- Last post
by Kusala
- Hello Everyone,
How to access these public partial classes:
I have something like this
public partial class test : System.Web.UI.Page
{
// What ever I need here
}
I have a second class
public partial class test1 : System.Web.UI.Page
{
//Code here
How can I access test from here
}
-
- Using OutLook Attachement Functionality(Temporary Internet Files) in C#
by SonuK
- 1 Replies
- Last post
by Satya SKJ
- Whenever an attachement is opened in Outlook it save the file in Temporary Internet Folder\User and then open it as read only.
I want to do same in C#. But the problem is that Enviornment class only gives temporyInternet Folder path not user path.
And also if the file is opened second time it should save as _2 as in outlook becuase it gives error if we try to delete temporary file in C#.
-
- Trim transparent whitespace from Image
by MMike
- 2 Replies
- Last post
by MMike
- I would like to trim the alpha whitespace from an existing Image (read from a png). For example: A big transparent image with a small solid circle somewhere shall be trimmed down to a rectangle bearing the circle. Is there some high level method I can use
-
- Anatomy of a DLL?
by Sanophy
- 2 Replies
- Last post
by utkuozan
- Hi everyone, I wasn't sure where to ask this, but how would one go about finding out what methods are present inside a DLL See, what I'm trying to do is create a program that exports multiple sound files as overlays so that they play at the same time. I've debugged the "sndrec32.exe" that is in the windows directory (because the overlay is possible from that program) and there are num
-
- How do do this ( a constant value is expected )
by andrewcw
- 4 Replies
- Last post
by bretonne
- I had some constants that worked well in this switch statement. But a better design would be to use them as enum types, as follows, however now the switch cant compile.
public const string HWPARAMETER = "HWNOPARAMS" ; // I want to consolidate these in the enum
public enum ioTypes { MANUAL,VIRTUALCH,HWPARAMETER,HWNOPARAMS,TMSTIME}
private void Measurement
-
- Image.FromFile generates FileNotFoundException sporadically
by SpockMonster
- 2 Replies
- Last post
by Peter Ritchie
- I have code that performs Image.FromFile("MyImage.bmp").
MyImage.bmp is in my Startup project (a Windows Forms project), and has the property "Copy to Output Directory" set to "Copy always". I am quite sure that this bitmap is always in the deployment folder.
In both Development and deployed on Clients, I occasionally get a FileNotFoundException from thi
-
- How to check the number of files in a certain folder?
by Pipz
- 5 Replies
- Last post
by Ichi_Programmer
- Hi, I would like to know how to create a code in which my application will check all the filenames on a certain folder before saving a certain file. I would also like to have something like, before the file is to be saved, it will check that the filename is not existing and can create that file in that folder filename : site[x].txt << where "x" is an array folder : C:\temp\ Please help. Than
-
- restart computer using c# code
by chire
- 14 Replies
- Last post
by Lalit Dubey
- Hi guys. Could you please explain me how to restart the computer using c#... What I found on the internet was only for XP....but what about the other OS I know that for xp it is using Microsoft.Win32; and then System.Diagnostics.Process.Start("ShutDown","/r"); But what about the other OS Also I have one more question. Is there a way to retrieve the OS of the user...so that depe
-
- conditional attributes
by leonard_fredrick
- 3 Replies
- Last post
by leonard_fredrick
- Hi,
can anybody say about the use of conditional attributes..
Regards,
Fred
-
- HEAP and STACK
by Sidheshwar
- 2 Replies
- Last post
by Jim Tomasko
- Hi All,
I am new to .NET and learning C#,
I want to know, what HEAP and STACK, where exactly they come into Picture in Application and What things we have to consider with regards to HEAP and STACK.
Rgds
Sidheshwar.
-
- Reg:Multiple inheritance
by sithanathan
- 10 Replies
- Last post
by Stefan Van Reeth
- Hi Guys,
Multiple inheritnce not supported in C# But we can achieve this using interface right.
plz find the code below.I have implemented multiple inheritance using interface
public interface coolbaby1
{
void caller();
}
public interface coolbaby2
{
void caller();
}
public class Multiple : coolbaby1 , coolbaby2
{
-
- Passing properties as delegates
by Jalf
- 14 Replies
- Last post
by Alois
- Let's say I have the following: class Foo { private int myInt; public void SetInt(int i){myInt = i;} } And then somewhere else, I have this: delegate void MyDelegate(int); // Define a delegate that matches the signature of the Foo.SetInt function class Bar{ void DoStuff(MyDelegate someDelegate){ .... } // A function taking the delegate as an argument } Now I can easily pass SetInt as a de
-
- Installing a c# app with .net framework
by Oscarfh
- 11 Replies
- Last post
by Oscarfh
- Hi, I want to create a wizard that also installs the .net framework. Is this possible Thanks
-
- WndProc Problems
by AFLood
- 8 Replies
- Last post
by Mick Doherty
- This question may be better suited for C++, but I decided to come here first. My WndProc method is currently catching WM_NCPAINT,but for some reason the painting is only temporary. If I run the program normally, the painting effects don't show up. If I put a breakpoint at the end of WndProc, then I find that the window is painted, but then simply unpainted once the method returns. So far, my only
-
- No symbols loaded for .DLL on debug???
by dl0haus
- 2 Replies
- Last post
by dl0haus
- I have an unmanaged .DLL that I'm using from C#. When I'm debugging the .DLL with an application (C#) as the startup application I can't debug the DLL. None of the breakpoints that are active in the .DLL code are there; its saying that
The breakpoint will not currently be hit. No symbols have been loaded for this document.
These breakpoints are in the .DLL and not in the C# applic
-
- Casting via Reflection?
by Darin V
- 8 Replies
- Last post
by Darin V
- I have a container.DataItem object which can be an instance of any one my data objects. In my method a field name is passed where I need to get the value from the field name in that data object. Since at run-time I don't know which data object that is I have to figure it out and then get the value from field whose name was passed in. This is what I think I should do but GetValue() takes an object
-
- Class question
by MikeyFunk
- 4 Replies
- Last post
by MikeyFunk
- Hi,
I'm quite new to C# and trying to get my head around classes, so bear with me!
I've added a class.cs file to my project which contains :
static class GlobalClass
{
private static string m_globalVar = "" ;
public static string GlobalVar
{
get { return m_globalVar; }
set { m_globalVar = value ; }
}
}
Els
-
- Access file
by ChunYip
- 2 Replies
- Last post
by ChunYip
- hi all,
Just wondering are there any methods/commands similar to "su" in linux
i am going to write a program in c# to allow users with their passwords to access a particular file in my server, but i don't want to grant users themselves a right to read and write. Instead, i want users to use the "default" identity to access the file. this is something similar to mount a d
-
- Help on properly handling WMF (MM_ANISOTROPIC) image in RTF file when extracted
by nullstring
- 3 Replies
- Last post
by Citizen on the earth
- Help on properly handling WMF (MM_ANISOTROPIC) image in RTF file when extracted To view the actual image http://jayzonr.somee.com/landolt/wmfproblem.jpg i have exhausted my self looking for workarounds, so hopefully i can find the answer here so basically what i just did:
Code Block (shorten....)
// the Text value is the HEX from RTF which is the image
Text = "92923009019
-
- Error: ArrayList out of Range
by Knu
- 6 Replies
- Last post
by Peter Ritchie
- Hello, I'm reposting this from VC# 2005 Express forum. I have a very simple, yet very strange problem. Here's the full exception text: http://img50.imageshack.us/img50/9030/error4kv0.jpg and the corresponding code:
public class eList : ArrayList {
public void RemoveInherit(Element e) {
for (int i = Count - 1; i >= 0; i--) {
if (i >= 0 && i <
-
- C# compiler BUG - const delegate assignment within a structure definition
by Ali Jannatpour
- 7 Replies
- Last post
by Peter Ritchie
- There is a bug in the C# complirer which Visual Studio crashing. The bug happends when writing a const delegate assignment within the a structure. for example:
public struct Temp { private const Action<bool> Foo = delegate() { return false; }; }
I searched everywhere to find a link for a bug report. I even called the support team. Unfortunately I couldn't do it online because
-
- c# embed java applet
by willthiswork89
- 4 Replies
- Last post
by kbcov
- is there a way to play a java applet on c# without using the webbrowser control
the applet i want to use is webbased but due to a focus bug in the webbrowser control im forced to try to find a better way to host and play the applet.