|
The controls that come with the .NET Framework are a basic set of controls. They're not meant to be the "Be All, End All" of the Utimate ToolBox. If you need specific functionality, there are two methods of getting it. Either find and buy a commerical control library that offers the functionality you need, or (my personal favorite!) write it yourself!! That's what inheritance is for and why you have the Control Library projects in Visual Studio. You can make your own version of the control with the added functionality tacked on.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi guys -
When using the 'System.Configuration.ConfigurationManager.AppSettings("key")', it seems like it can only access the config settings defined for the primary assembly running in the app domain.
i.e. i have a program
MasterApp.exe
SOAPProxyLib.dll
Now, if i declare the following AppSetting value in the SOAPProxyLib.config:
<br />
<add key="key" value="value"/><br />
And then invoke it
<br />
Dim lstr As String = System.Configuration.ConfigurationManager.AppSettings("key")<br />
It returns nothing, but if i declare it in the MasterApp.config, this works fine, called from the SOAPProxyLib.
Is there any way i can put the settings i want for the library in the libraries config settings, and manage them independently to the rest of the app?
Cheers
Tris
|
|
|
|
|
The Catalyst wrote: When using the 'System.Configuration.ConfigurationManager.AppSettings("key")', it seems like it can only access the config settings defined for the primary assembly running in the app domain.
That's right! Only application get to use config files. DLL libraries do not get their own config files. This is because a DLL becomes a part of the process (or application) that's calling it. Anyone using your library has to be aware of the fact that they must put any configuration information your library needs into the applications config file.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Ahhh, cheers for clarifying that.
Mooooore documentation
|
|
|
|
|
Frndz,
Is there any class in .NET 2005 which has collections of all the months?
Regards,
Vipul Mehta
Sr. Software Engineer
NIIT Technologies Ltd
|
|
|
|
|
No there isn't. You'll have to write one if you want it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Not quite sure what you want, but you should look into the Calendar Class
|
|
|
|
|
|
Hi,
I would like to implement a textbox into my application that allows the user to enter hex, decimal or binary values (based on the selection of a radiobutton group.
For hex values, for example, I would like the entered data to be byte seperated by spaces like this: "0E 3C 32...". I was thinking that a masked textbox was the way to go, but a masked textbox only allows for a fixed length mask, it seems.
AFAIK it is not possible to specify a mask that is repeated for the length of the entered data.
Do I have to parse the content of the textbox and reset the contents whenever the user enters a single character, or is there a much simpler solution?
|
|
|
|
|
For a masked textbox you don't have to fill all of the mask spaces, so a mask: ###, can have a legal input of "1".
You can also set the mask to lengthen itself when the user wants to enter a number longer than the set mask.
|
|
|
|
|
I am trying to get the user and domain of a running process. I can do it using the WMI, but this has various problems (it's slow, it needs to run wmiprvse.exe). There must be a way of getting this information without using the WMI - does anyone know it? (I'm using C# under .NET2.0, but that should be irrelevant, any answer is going to involve a p-invoke, I'm sure)
Dave
|
|
|
|
|
The Windows API calls you will need are: OpenProcess to get a handle to the process (ask for PROCESS_QUERY_INFORMATION rights), OpenProcessToken to get a handle to the process's token (ask for TOKEN_QUERY rights), and GetTokenInformation to get the user account associated with the token (pass TokenUser as the second parameter).
That will get you the user's security identifier (SID). You then need to use the LookupAccountSid API to turn that back into a username and domain.
You can find sample P/Invoke declarations at www.pinvoke.net[^].
|
|
|
|
|
Thanks Mike, that's just what I needed.
Dave
|
|
|
|
|
Hi all,
I am new to .Net framework and ASP.Net programming. Now I have a job like this:
Application have to automatically check for certain condition( access Database table records for checking conditions) and if the condition met, have to deliver mail to mailId specified in a table (stored different mail Ids to different conditions). Regardless of any request reception server have to do this job. As a new .Net developer i know only how to use SMTPMail class and MailMessage class to send a simple mail. But i have no idea about how to make it automatically run in server.
Could any one please advice me to proceed this job?
I appreciate even a small amount information from you.
Thanks in advance.
Regards
Renu
Renu
|
|
|
|
|
I'm trying to create a subcategory inside a defined category that i have created (similar to the default collapsed font in the appearance default property).
how can i create something like that?
thanks,
Lior
|
|
|
|
|
Hi,
I have a problem in interop.
I have a c++ dll that has a function that takes the control handle as input and does some manipulation on the editable field.
// HINSTANCE SetInstanceHandle(HINSTANCE hInstance)
I have a .NET form in which I have a textbox control. Now I import the c++ dll and invoke the function. Now, I pass the textbox control's handle as Control.ControlAccessibleObject .Handle (which returns a IntPtr). This gives me an error quoting "The runtime has encountered a fatal error. The address of the error was at 0x79ef04d2, on thread 0x364. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack."
I dont know what this error imply. I am also afraid that my way of accessing the handle in .NET is wrong.
Please guide me to access this c++ function.
Thanks,
Mani
|
|
|
|
|
hi guys can u tell me how to enable LAN card using shell and c#.net.
hello
|
|
|
|
|
|
hey
thanks alot , its the same i was looking for
luv u )
|
|
|
|
|
hi
i want to configue my modam via shell ,, can I ?
i want to set number to dial in my own application
is that possible
thanks in advance
hello
|
|
|
|
|
Hi,
I have a problem in .NET custom wizards.
Am getting an error on opening a wizard. It quotes ..
"Could not run the
'C:\Program Files\Microsoft Visual Studio .NET 2003
\VC#\CSharpProjectItems\LocalProjectItems\..\ViewCodeWizrd.vsz' wizard."
I tried the suggestion in the link http://www.petedavis.net/dotnet_articles/wizardfix.html.
But this doesnt seem to work though.
Could any one please guide in this.
Thanks,
Mani
|
|
|
|
|
hi guys i am trying to disable my lan adapter card and again enable it ,,
i am using WMI and the following code ,, but i am getting an exception
"The method is not implemented by any class" why is that ? and how to resolve this issue ,,, can any help me please,,,
=========================
ObjectQuery oQuery = new System.Management.ObjectQuery("Select * from Win32_networkadapter")
string[] o = new string[1];
ManagementObjectSearcher oSearcher = new ManagementObjectSearcher(oQuery);
ManagementObjectCollection oReturnCollection = oSearcher.Get();
foreach (ManagementObject oReturn in oReturnCollection)
{
Console.WriteLine(oReturn["macaddress"].ToString().ToLower());
oReturn.InvokeMethod("disable",(object[])o);
i also use the same code with the statement
oReturn.InvokeMethod("enable",(object[])o);
====================
i am using win/xp , visual studio 2005
}
please help me out
thanks in advance
raaj
|
|
|
|
|
The documentation you're looking at is for Windows Vista. The Win32_NetworkAdapter class on any version of Windows below Vista doesn't have a Disable or Enable method. All they have are Reset and SetPowerState methods.
Enable and Disable don't show up until you run your app on Windows Vista.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
ok thanks alot
Actually i have also called reset method but it says same
method is not implemented
please help me
thanks in advance
-- modified at 6:13 Friday 13th October, 2006
hello
|
|
|
|
|
That's because the Reset mehtod doesn't have any code attached to it. You can call it, it's there, but it doesn't do anything. It exists if the manufacturer of the card wants to hang any code on it.
There's no way to do what you want using WMI if your code is running on Windows XP or lower.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|