|
This question unfortunately requires a long time to answer. However, a few other tidbits.
COM is all about interface inheritence, and it uses an artificial construct, IDL and the registry, to maintain all of those interfaces. In .NET, an interface is a native type, and implementation inheritence is also supported.
COM is highly C++-centric, whereas .NET moves closer to the goal of being truly language-neutral.
COM also relies on Win32 and the registry to make it work. .NET is more self-contained.
|
|
|
|
|
Can anybody tell me how to implement a normal (2-state) checkbox for a column on my DataGrid? I have tried using every kind of .NET admonition ("AllowNull = false" on the style, on the column, etc.), but I always get a 3-state check box that at best is a hassle (extra clicking required to get where you want) and at worst causes an error if they leave it in the null state. I don't relish the prospect of watching my users' eyes glaze over as I explain to them the difference between "false" and "DBNull".
Any help will be greatly appreciated!
Doug
|
|
|
|
|
Hmmm... setting AllowNull on the DataGridBoolColumn to false should work (I remember I used it once and it worked).
To avoid the nullstate you could also set the NullValue property to either true or false.
|
|
|
|
|
You can set the AllowNull property on the DataGridBoolColumn to false and it will prevent the tri-state checkbox. I used a little reflection to get a reference to the internal DataGridTableStyle used by the grid (if there's a way to access that field via the public interface, please let me know how).
private void Form1_Load(object sender, System.EventArgs e)
{
DataTable tbl = new DataTable();
tbl.Columns.Add( "TwoState", typeof(bool) );
tbl.Rows.Add( new object[] { true } );
tbl.Rows.Add( new object[] { false } );
this.dataGrid1.DataSource = tbl;
DataGridTableStyle tableStyle = typeof(DataGrid).GetField(
"myGridTable",
System.Reflection.BindingFlags.Instance |
System.Reflection.BindingFlags.NonPublic).GetValue( this.dataGrid1 )
as DataGridTableStyle;
(tableStyle.GridColumnStyles[ "TwoState" ] as DataGridBoolColumn).AllowNull = false;
}
Josh
|
|
|
|
|
Thanks for all the answers, but setting the AllowNull is definitely not working wither for Column or Style. I am becoming convinced that this is because I am working with .NET Framework 1.1.
|
|
|
|
|
Hi All... Currently i am doing my banking application using ASP.Net,C#, SQL Server2000... i want some technical solution realated securities from you guys as follow..
i already logged to my application by using username and password.. after login page my home page Home.aspx coming on screen.. i have features all like Balance Inquiry, Mini Statement, Last Transaction, Private Banking, Net Banking in my Home Page in left menu side. All Features are working very well.. For Security Reason i want some technical help from all of you guys...
Problem is After my successful login page If i not touch the Home page or if i not click on any features available in home page for 10 minutes.. Like if i click on Balance Inquiry Link after 10 minutes that time Page Login.aspx want to open instead of BalanceInquiry.aspx... After my successful login by username and password i want to open page BalanceInquiry.aspx (do not want open Home.aspx Page Again)... For that what i have to do in my Application to make more secure... if u have any articles link then please send me..
Please Please Help me if you people have some technical solution... Bcz right now i am on mid way of that project... if u have any articles or articles link please help me out....
Regards,
Patel...
|
|
|
|
|
You'd be better served asking this in the ASP.NET forum.
But, off the top of my head, your session timed out. This means that anything you saved in a Session variable died with the time-out. So, if you're tracking the current page the user is on, that tracking information died too. I don't see how you're going to do this without actually compromising your security a bit by saving the last visited page in a cookie on the client side. And even then, that cookie will have to have a expiration because if you don't, the user could log in 3 days later and end up on the last page they visited instead of the home page.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi all,
I have written a small application that users can download from our website. How can I build a setup program so that it will detect if the framework needs to be installed and then install it without the user knowing?
Thanks for any help.
Linda
|
|
|
|
|
Search MSDN on "Bootstrapping" and "dotnetfx" or "Net Framework" yto find the various options for installing the framework as a prerequisite.
|
|
|
|
|
i know the procceses number,ip and system name of any system on LAN. How can I open that process on my system which is also connected on LAN keeping in view the security checks.
|
|
|
|
|
Define "open that process". What do you want to do with it? Security restrictions will prevent you from doing a lot of things...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
i want to open processes like web page, word document which is already opened on the other system. i know process id, system number etc..
|
|
|
|
|
You still haven't answered my question. What do you want to do with the process?!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
I'm developing an asp.net application which logs error in case of exceptions.
When it logs error teh following message displayed in event log.
Error loading an Event Sink of type 'Microsoft.EnterpriseInstrumentation.EventSinks.LogEventSink'. The Event Source of name 'Application' will not write events out to this Event Sink. The following exception was returned during the load:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: An error occurred determining if the Windows Event Log source of Application (Loan) exists on machine .. This may be due to an incorrect machineName parameter. ---> System.Security.SecurityException: Requested registry access is not allowed.
at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
at System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly)
at System.Diagnostics.EventLog.SourceExists(String source, String machineName)
at Microsoft.EnterpriseInstrumentation.EventSinks.LogEventSink..ctor(IDictionary parameters, EventSource eventSource)
--- End of inner exception stack trace ---
at Microsoft.EnterpriseInstrumentation.EventSinks.LogEventSink..ctor(IDictionary parameters, EventSource eventSource)
--- End of inner exception stack trace ---
at System.Reflection.RuntimeConstructorInfo.InternalInvoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Reflection.Assembly.CreateInstance(String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at Microsoft.EnterpriseInstrumentation.EventSinks.EventSink.CreateNewEventSinks(DataRow[] eventSinkRows, EventSource eventSource)
Can you please help me in this.
thanks in advance
Priya
|
|
|
|
|
I think "Requested registry access is not allowed" is the important part of the message. Have you checked whether your application is running under a user account which has the right to acess the registry?
|
|
|
|
|
hi,
I have two tables
Table1:Cust_Master CustID (identity type) CustName
Table2: Customer details
CustID
CustName
CustAddress
Cust phone
....
The tables are designed as: if the customer details has to be added it has to be first added to the Cust_master then get the Cust_Id (which gives autogenerated key) and then add it to Customer details table.
Now:
I want to show a editable datagird in WinForms where I give the user an option to add/modify and delete the customer details.
Can any give me the idea of how I can accomplish this.
Thanks
Satishrg
-- modified at 13:31 Wednesday 19th April, 2006
|
|
|
|
|
Hello folks.
I am a bit confused at the moment as to what best practice should be for my situation.
I have a solution containing the following projects:
1. Scheduler (NT service)
2. Web front-end
3. Scheduler command line interface (exe)
4. Business logic layer/DAL ()
5. Reports server dll
1. and 3. are new (replacements for some old vb6 code).
Previously, all I had to do to release was to compile and distribute the web front-end - all the dlls for the reports, DAL and BL were copied to the /bin folder and everything was hunky dory.
Now that I have added 1 and 3 they have their own /bin/ folders with their own copies of the 5.
How can I make them all reference the same dlls? Should I GAC the shared dlls when I install? Should i write a script to copy all the dlls and exes into the web folders /bin/ folder? whats the right thing to do?!
thanks everybody.
|
|
|
|
|
hamacatak wrote: Should I GAC the shared dlls when I install?
Yes, that's exactly the purpose of having a GAC.
|
|
|
|
|
hi there,
i'm developing a licensing website with asp.net this side is related to vb6 client and server code. the clients code and the website work perfectly together - the client gives any information needed by the server to calculate the LicenseKey to the asp.net website. Now there comes the problem...
<br />
Dim oKernel As LicenserKernel.cKernel <br />
oKernel = New LicenserKernel.cKernel()<br />
<br />
sReleaseKey = oKernel.CalcKey(sRequestKey, sSessionID)<br />
When debugging the website the object (oKernel) is made properly, the function is recognized correctly (i can see this during debugging - it displays what parameters are needed and so on) but all i get back from the function is: "NOTHING"
When i debug the server code on his own (manually giving him all the parameters the client gave to the website), it works just fine...
Another problem is that with every postback a new window is opened. i don't want a hundred of windows to be opened. poor users! this should be easy to solve and i don't understand why i can't do this on my own...
Would be great if anyone could help me with that
Thanks a lot in advance and have a nice day,
SanDee
|
|
|
|
|
I have a toolbar with buttons that contain images from an ImageList . The images appear correctly when the button is enabled. As soon as I disable the button the image dissapears from the button and the entire button area is grayed out BUT with no image on it. How do I fix this so that the disabled button shows a grayed out Image that the enabled button has instead of just a grayed out box?
|
|
|
|
|
The easiest way would be to adjust the used colors within the icons. .Net has a relatively simple algorithm to draw disabled images. If all used colors are 'very bright' than it is not able to draw it properly disabled.
|
|
|
|
|
How do I call a VB project from a C++ project or vice versa if they are in the same solution
|
|
|
|
|
References, add reference, projects
|
|
|
|
|
Solution Explorer-->References-->Add References-->Browse
and add the dll Tat's it.
"Aim to go where U have never been B4 and Strive to achieve it"
http://groups.yahoo.com/subscribe/dotnetforfreshers
http://himabinduvejella.blogspot.com
|
|
|
|
|
Hi!,
i am using .net Framework 2.0 and facing serious troubles.The same code runs well on Windows Xp but when I run it on Win2000 it gives error ,module could not be loaded
Can some body help????????????
|
|
|
|