|
Okay so I have a problem where I want to take any particular Xml Element such
as:
<window id="AdminWelcomeDlg" width="370" height="270" nominimize="yes">
And while the program is running to dynamically create a class that contains properties that map to each of the individual attributes, I believe it may be possible with reflection, but before I try this I wondered if nayone had any better ideas, or can advise if reflection would not be able to accomplish this.
Dave.
|
|
|
|
|
I need to create two funktions in Client-Assembly, delegate on Server must call the funktions. Any idea how?
|
|
|
|
|
Hi,
You can use interface approach for communication between client and server. Define delegate in shared dll (ur common file). Define one class that derives from EventArgs. Define events in the common interface. Use that common interface in client. Give event handlers to the events (here u can give ur functions that u want to be called from server). In server raise simply raise the events.
Jayant D. Kulkarni
Brainbench Certified Software Engineer in C#, ASP.NET, .NET Framework and ADO.NET
|
|
|
|
|
:(Hi all, I m new in c#, so plz plz help me making DataEntry Form using DataGrid alongwith Combo and DTP on it. plz plz i m worry about it.
reply on dcet99@hotmail.com
|
|
|
|
|
You haven't stated what your problem is, i suggest you search the articles on codeproject for DataGrid, there are some great articles here that explain everything in more detail than you will get on the forums.
Kev
|
|
|
|
|
http://www.codeproject.com/cs/miscctrl/RenDataGridComboBoxColumn.asp
may be useful to you.
|
|
|
|
|
Dear Guys,
I’m stuck up at some point in my chat application. I’m using remoting (SAO), for my application.
When client and server are on the same machine they work quite fine as expected, but when I shifted client on another machine, it throws the following exception. I’m using TCP channel. Using HTTP also it throws the same error. Anybody, who has worked on remoting, please help me.
Server encountered an internal error. For more information, turn on customError
s in the server's .config file.
Server stack trace:
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage req
Msg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgDa
ta, Int32 type)
at ChatMediator.IClientImplement.SendMessageTome(IClientImplement clientObjec
t)
at RemoteServer.Mediator.SendMessageToAll(IClientImplement ici) in E:\Jayant\
RemotingChatApplication\RemoteServer\Server.cs:line 73
Jayant D. Kulkarni
Brainbench Certified Software Engineer in C#, ASP.NET, .NET Framework and ADO.NET
|
|
|
|
|
hi,
I have a form with this.FormBorderStyle = FormBorderStyle.None; and I would like to display the standard shortcut menu that usually pops up when the user right clicks on a application button in the taskbar.
How can I do this? Any suggestion is highly appreciated
It would be cool to add some custom entries to the menu (as winamp does, see sceenshot[^]) but maybe I'm asking too much.
Thanks in advance
Jocker
_______
JeniuS - the file Organizer
|
|
|
|
|
private const int WS_CHILD = 0x40000000;
private const int WS_CLIPCHILDREN = 0x2000000;
private const int WS_MINIMIZEBOX = 0x20000;
private const int WS_MAXIMIZEBOX = 0x10000;
private const int WS_SYSMENU = 0x80000;
private const int CS_DBLCLKS = 0x8;
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.Style = WS_CLIPCHILDREN | WS_MINIMIZEBOX | WS_SYSMENU;
cp.ClassStyle = CS_DBLCLKS;
return cp;
}
}
|
|
|
|
|
Hi all, i'm looking for a way to create a windows shortcut using C#.
I know about the COM library, IWshRuntimeLibrary but i'm having problems
using that on a windows 2000 machine
Is there a way of doing this without using a com object, just using .Net
libraries? It seems like a massive oversight if this functionality
has been missed from the .Net framework as shortcuts play a huge part
in the way windows is used by end users.
Any help / advice on this would really be apreciated.
Cheers
Kev
|
|
|
|
|
Hi,
take a look at this:
ShellLink
it uses some COM interfaces, but it does this automatically
I found it very useful in a couple of projects
Jocker
_______
JeniuS - the file Organizer
|
|
|
|
|
That works great, thanks.
Kev
|
|
|
|
|
Does anyone know how to write strings into VS_VERSION_INFO?
For example i would like to change the InternalName of an executeable?
Not just version number...
any help would be much appreciated
Mepho
|
|
|
|
|
How can I make the GUI of my application transparent when I develope that in C#? Any idea guys?
Regards
|
|
|
|
|
It depends on what parts of your GUI you want to make transparent, windows forms have a Transparency Key property and an Opacity property. Try playing with these to get the effect that you are after.
Kev
|
|
|
|
|
Hi!
I'm having a problem with the AppSettingsReader class. What I want to do is to retreive a value based on a key from a "App.config" file in my application.
The problem is that when I compile the code everything is ok (no errors, no warnings), but when I run the method (see below) I get an ConfigurationException (see below) that I don't understand. The exception occurs when the code tries to instantiate the "confReader" variable:
//code snippet:
System.Configuration.AppSettingsReader confReader =
new System.Configuration.AppSettingsReader();
The method is in a System.Windows.Forms.Form class.
Can anyone help me?
Thanks in advance!
//The Exception:
"An unhandled exception of type 'System.Configuration.ConfigurationException' occurred in system.dll
Additional information: This is an unexpected token. The expected token is 'EQUALS'. Line 4, position 12."
//The method:
private string GetConfigurationValue(string key)
{
string confValue="";
System.Configuration.AppSettingsReader confReader =
new System.Configuration.AppSettingsReader();
if(key=="")
{
throw new Exception("key is empty");
}
try
{
confValue = (string)confReader.GetValue(key,typeof(System.String)).ToString();
}
catch(InvalidOperationException ex)
{
MessageBox.Show(ex.Message);
}
catch(ConfigurationException ex2)
{
MessageBox.Show(ex2.Message);
}
catch(Exception ex3)
{
MessageBox.Show(ex3.Message);
}
return confValue;
}
|
|
|
|
|
The error says that there is a problem with your config file, not the code.
What does your config file look like? Remember to check the "Do not treat <'s as HTML tags" at the bottom of the message window before you click Submit.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yes!
Thank You!
I spotted the error in my config file. I forgot a '=', just as the exception message said. The code works now!
Wow... Sometimes I even impress myself when I do that kind of mistakes...
Thanks again!
OKB
|
|
|
|
|
I have written a class called Call in c# using serial comms to retrieve certain data from a remote device. The class includes methods like InitializePort(), MakeCall() etc. It also includes events like GotData and CallTerminated. These events are picked up by the calling class Device and are passed on to the GUI that is calling the Device class and the GUI responds accordingly.
The Device class has events like GetData which the GUI calls.
So far all these methods do not return values. Each caller (GUI and Device) call methods and terminate exceution; they just respond to events.
Each GetData function execution takes a different time since the amount of data to be retrieved is arbitrary.
I now need to execute a number of GetData calls in sequence (as part of a loop) from the GUI (or some other class calling the Device
class methods) and therefore need to wait until each call returns a value back to me before I proceed with the next execution.
How do I do that? I am new in .Net and have no experience in multi threading or asynchrnonous programming.
Thanks in advance
Regards
Chris
Thanks and Brgds
|
|
|
|
|
Hy there,
How can I check if the ASP.NET is installed on a server machine.
Thanks,
AdoSun
|
|
|
|
|
Do you mean if the .NET runtime is installed, or if it is installed AND IIS knows about it ?
You can check the folder in the windows subdirectory for the .NET folders, and while I don't know of a way to know if IIS knows about .NET, it's fair to assume it does, and if not, you can run aspnet_regiis once you have found the folder. There are also registry keys you can use, a quick google will tell you about those. I suggest the folder thing first only because I was thinking about if you can't tell that ASP.NET is registered with IIS.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Actually is important if the IIS knows about it.
I want to check this from a C# code.
|
|
|
|
|
IIS would never KNOW about .NET being installed as IIS has nothing to do with that. You may be able to some sort of SystemInformation check as to find that information, but IIS is not the way to go about that.
|
|
|
|
|
ExpertComing wrote:
IIS would never KNOW about .NET being installed as IIS has nothing to do with that.
Very wrong. ASP.NET is registered with IIS as an ISAPI filter. Therefore, it's registered with IIS, and IIS knows about it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
There is one dirty dirty trick... Open C:\{windir}\system32\inetsrv\MetaBase.bin and look for e.g. "X - P o w e r e d - B y : A S P . N E T" string in it. Actually there are all the mappings as well, but file format is unfriendly. (okay, that's because I view it in notepad )
Idea look for it in MetaBase is from this article: http://www.codeproject.com/aspnet/teniistips.asp[^].
David
|
|
|
|