-
- Retrieving URL from IE
by Taffy11
- 9 Replies
- Last post
by Sheng Jiang (?êÉ)
- Hi All,
I am developing a windows application that will retrieve the url address from a internet explorer window, using c# within the .net environment (2.0). Is this possible and can you provide me with either examples or references. Thanks,
Kelvin
-
- Refactoring/Encapsulating several variables at once
by rishabhjivan
- 2 Replies
- Last post
by rishabhjivan
- I'm not sure if there is such a feature in the Visual Studio IDE, but it would be nice to have the ability to select multiple variables for encapsulation at the same time, especially if a class contains many variables. Anyone familiar with the Java NetBeans IDE will know what I'm talking about. In NetBeans the user is presented with a checked list of the variables from the class, in order to selec
-
- Declaring variable sized array in C#
by knji
- 4 Replies
- Last post
by Figo Fei - MSFT
- I an used to declaring a variable sized array in other languages using the following syntax
int myarray[ ];
Looks like in C# I have to specify a size. What if I do not know this size until run time, how do I declare such an array
Thanks in advance.
Klaus
-
- Q Event
by cisco0407
- 3 Replies
- Last post
by Peter Ritchie
- I need to fire a event any time a item is in the Q. please look at the code below is it right
public class QClass : Queue { public delegate void EventQ(object sender, EventArgs e); public event EventQ KickitemoffQ;
void KickitemoffQEvent(EventArgs e ) { if (KickitemoffQ != null) { KickitemoffQ(this, e);
}
} public overr
-
- access server machine on the same network.
by IMBack
- 4 Replies
- Last post
by IMBack
-
Is there away to access diffrent server machine that is on the same network, using web application.
when accesing web application, it would check if the user is currently on the network where the server machine located, than enable to access the files.
Thank you,
-
- How to convert a string value to a color value?
by Azurewrath
- 7 Replies
- Last post
by Azurewrath
- Hi,
I have 3 textbox controls, and whenever someone changes those values, I want to make it change the color of a picturebox.
Right now I use this code:
private void txtRed_TextChanged( object sender, EventArgs e)
{
picColor.BackColor = Color .FromArgb( Convert .ToInt32(txtRed.Text), Convert .ToInt32(txtGreen.Text), Convert .ToInt32(txtBlue.Text));
}
But it gives
-
- Getting %CPU usage for processes with WMI but keep getting results 0 or 100
by lcer
- 0 Replies
- Last post
by lcer
- Hello
I'm trying to get PercentProcessorTime from Win32_PerfFormattedData_PerfProc_Process via .NET system management. The returned value is 0 or 100 - nothing in beetween, clearly wrong. I found a similar problem description here: http://www.microsoft.com/technet/scriptcenter/resources/qanda/apr05/hey0421.mspx
Exactly my problem except here there seems to be a solution by using a refresh me
-
- Window message without creating a form?
by Tom B
- 6 Replies
- Last post
by Peter Ritchie
- Hello,
Do I need to create a form just so I can have a handle I want my
application to listen to window messages but it actually has no forms.
It seems a bit wasteful to create a form just to listen for window messages, cant I give my entire application a WndProc function I'd like to use the bare minimum resources to do this. The form will have nothing on it so I think the best way would
-
- Regarding hard code in C#
by bhasyamvinod
- 3 Replies
- Last post
by Gabriel Lozano-Moran
- hi,
I am developing a web-based application which needs lot of conditions to be checked .
For Example : if x=5 ... instead of hard coding the value 5 ...is there any method so that i can access the hardcoded values globally in my entire application.
In Asp we can use .ini file but .net has left .ini file .
Please suggest me the right method ..to overcome this problem
-
- invoke() method problem
by mersany
- 3 Replies
- Last post
by mersany
- I use invoke.Giving bellow. Invoke section win32 com and TAPI related function. When I try debug. This part wok once. But working section each time increase. For examle OnAfterOpen.Invoke(); ones work on the other hand ActModem_OnAfterOpen() run many times same Invoke. This part only call by invoke part. How can it be How can I solve this problem //invoke section if (OnAfterOpen != null &&a
-
- Using constants
by mshvw
- 3 Replies
- Last post
by boban.s
- Hello,
I'm rewriting a C++ project into C#.
In the C++ project there are many constants defined like:
#define RECEIVE_BUFFER_SIZE_MAX 60
Is there some equivalent in C# or can I only use the C# dummy 'constant' variable like:
const byte receiveBufferSizeMax = 60;
This means I have to re-develop many functions because somehow C++ constants must be replaced by filled C# 'c
-
- Cannot Convert type 'char' to System.DateTime'
by HarryBedi
- 14 Replies
- Last post
by ShellShock
- Hi guys I keep getting the following error when I try to iterate through an array
foreach (DateTime TimeStamp in theTickData[0]) //Cannot Convert type 'char' to System.DateTime'
{
if (TimeStamp >= dtEntryTime)
{
foreach ( string PG in theTickData)
{
if (PG == theDirection)
{
foreach ( double theRate in theTickData[1])
{
alEntryPointEURCHF.Add(theR
-
- Lock down to prevent internal software from leaking to general public?
by Khronos
- 2 Replies
- Last post
by RizwanSharp
- Hello,
I am making some tools that are supposedly used only by internal team and customers who use our services directly. I was wondering what are some of the stuff i can do to prevent the software from leaking to general public. The software allows us to view/edit some internal data which the general public should not be able to manipulate directly other than through our software.
I
-
- simple question about inheritance
by shimshon
- 3 Replies
- Last post
by Lowendahl
- hi all.
in my base class i set a reference to the ms.applicationblock.dataaccess.
class A inherits from the base class.
why cant i use the objects of the application block (like DataBase) in Class A
only if i set a refernece inside Class A, it will show me the objects.
doesn't it inhetis the reference laso
-
- Extending default classes
by Azurewrath
- 14 Replies
- Last post
by Azurewrath
- Hi, Anyone knows if I can extend existing .NET framework classes Like so: Array.ExistingMethod Array.MyMethod Also can I overload a default existing method Like so: Array.ExistingMethod (int n) Array.ExistingMethod (string s) // my version You can answer for C# 3.0 if you want. Thanks, Aw
-
- Change Default Project folder
by swaroop.m
- 3 Replies
- Last post
by nobugz
- Hi All,
When i create a Project using VS2005, by default a folder with the namespace gets created.
for e.g.
When i create a project with name Test.Test1.Test2.csproj and namespaceTest.Test1.Test2 under C:\MyProjects\
A folder with name Test.Test1.Test2 gets created, How can i avoid this
i want to create the project as C:\MyProjects\Test\Test.Test1.Test2.csproj
Any pointers would
-
- please help
by ranadheer mac
- 1 Replies
- Last post
by Martin Xie - MSFT
- hello friends i have a scenario like 1) i have a ByteArrayOutputStream 2) i need to check the first two bytes ,if they are 13,10 ,have to remove them 3) later ,i to convert that to byte[] any body please help how to do that without arraycopy regards OS
-
- RemoteObjectSourceException: Graphics is not marked as serializable
by Jeremy Jarrell
- 2 Replies
- Last post
by Jeremy Jarrell
- Hi
I'm trying to build a debugger visualizer for instances of System.Drawing.Graphics. However, when I try to retrieve the instance of Graphics from the objectProvider.GetObject() call I get the following exception:
RemoteObjectSourceException: Type 'System.Drawing.Graphics' in Assembly 'System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not marked as seria
-
- How do I make an XML schema document?
by Corrob
- 3 Replies
- Last post
by Corrob
- Hello, This is my first post. In visual C# express edition I add a new item to create an XML document but I don't know how to make an XML schema document.
-
- Performance Issue: Load assemblies on demand
by Juliano Nunes
- 5 Replies
- Last post
by Peter Ritchie
- By default, when running a .Net Application, all referenced assemblies are loaded at the same time, this increases the memory usage, what is unnecessary most times.
So, how can I load assemblies only when they are needed
-
- Protected and Protected Internal method
by Dhakir Raj
- 3 Replies
- Last post
by Bashmohandes
- Hi,
Can any one explain me what is the difference between protected and protected internal method
-
- ListView sorting... Why is 99 greater than 100?
by Evan Mulawski
- 6 Replies
- Last post
by Frank Boyne
- I have a sorted listview that works perfectly fine, for strings and dates.
However, 100 is always treated as the number 1.
How can I fix this
Code Snippet
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Windows.Forms;
namespace Provectasoft_GradeManager
{
class ListViewIte
-
- Newbie Question
by LarryLand
- 3 Replies
- Last post
by TilakGopi
- I'm switching worlds actually from C++ to C# and i can¡¯t get this to work:
It is a simple clock (counting seconds only), the problem is that the counter works fine in the first tick event, but in the second one when i try to read the value i get "" (i.e. nothing). The textbox that contains the count is public.
private void timer1_Tick( object sender, EventArgs e)
{
-
- How can I do undisposing?
by LORDTEK
- 8 Replies
- Last post
by Indian Ocean
- In my project, some menu items have shortcut in the main form so users can reach these forms whether select the menu item or click the shortcut item. Therefore, I want to block these same forms opening on the same time. For this reason, i must create object which is not influenced by disposing.
Thank you, regards...
-
- Reflection & casting issue
by Prezii_kploch
- 2 Replies
- Last post
by Deobrat Singh
- Hi!
I'm creating an application that uses plugins.
I have an interface:
public interface IFeature
{
....blablabla
}
and some class:
public class StubFeature : IFeature
{
...blablabla
}
I'm loading an assembly that contains IFeature and StubFeature, and use:
foreach(Type type in Assembly.GetTypes())
{
IFeature feature;