Answer Questions
Looper_Kwok How can instances of ClassB catch and respond to Shared Events in ClassA ?
How can instances of ClassB catch and respond to Shared Events in ClassA Just to add some explanations... The thing if on the constructor of ClassB. As the ClassA Event is shared, you just need to add an handler to it. If it fires, any and every handle will catch it. On the Module1 Sub Main I declare the two classes and set the 'P' property that actually fires the event. You can add another ReadLine to make the execution stop after the event is fired so you can see the "I catched it!" message : Sub Main() Dim myClassA As New ClassA Dim myClassB As New ClassB Console.ReadLine() myClassA.P1 = 10 Console.ReadLine() End Sub Hi. As you said "Share ...Show All
Duncan Stewart How to change an attribute at runtime
Hi there, I need to change the "Browsable" attribute for one of my class' properties at runtime from "true" to "false". The only way I can see how to do it is via "ICustomTypeDescriptor.GetProperties()" which means implementing the latter interface on my class, creating a customized "PropertyDescriptor", etc. Basically a lot of work for something so simple. Is there an easier way to do this. Thanks. What are you trying to do A class attribute is an attribute of a class, not an instance of a class; "runtime" really doesn't have a bearing. Thanks very much. Unfortunately, it has to go through the same painful process I was hoping to avoid. While I can certainly leve ...Show All
Fippy Using asymmetric algorithm to protect your application
I have a web application, it is a CRM and I want to protect it checking the max number of license saved into the DB. For example if a customer have a 10 users license then into CRM cannot be registered more than 10 users. Number of max users is saved into the DB but I want to encrypt this data so an user can't modify manually it. I want to encrypt it with an asymmetric key because I want the CRM can decrypt data but only my persoanl win32 keygenerator can encrypt it (if web application cannot decrypt data is because the string saved into the DB is not valid then the login isn't permitted). The problem is that all asymmetrics algorithms have a public key to encrypt data and a private key to decrypt it. I want an algorithm that has a public ...Show All
SerialSeb page cannot be displayed, etc.
hi, on friday i chose to run ad-aware, spyboy-search and destroy, ccleanup and maybe another program, all which were installed over the summer to reduce viruses or harmful things on my computer. however, when i was prompted to reboot the computer, i did so, but now my internet connection will not work. i feel like i have looked through every help and support article online...I ran network diagnostics and all sorts of things. some of the things that stuck out were "DNS" "TCP/IP Protocol" something called "SyM WMI service".. But those were all problems that showed up on friday. maybe someone will know what's wrong:) Thank you for any help you can give! ~Katie This forum is ...Show All
PaulWoodcock NamesSpace for MS-Access
Hi, What NameSpace needs to e given when MS-Access is used Please be noted that am absolutely new , guide me. System.Data.OleDb is the namespace you need for MS-Access. Database1.mdf is not a namespace. It’s a value you have to give OleDbConnection as part of the connection string. Zlatko I Have some problems here too... this is the code... using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; //Usamos el NamesSpace necesario //using System.Data.OleDb; using System.Data.OleDb; using Database1.mdf; <---- I HAVE PROBLEMS HERE the error says: cannot find the type or name of space ...Show All
xochi Tcp disconnection problem
I'm writing a Client-Server model solution. I'm using TcpListener and TcpClients. I use StreamReaders and StreamWriters to communicate over the underlying sockets and I'm having some problems. I'm using ReadLine() and WriteLine(). First off, how do I know when there is a disconnection You would think there was an exception thrown, but it just blocks forever. So I have to use Thread.Abort() and this is hardly ideal. Also the TcpClient.Connected property shows true when indeed there is no connection. The problem there is two-fold. If I shutdown the server the client thinks it's still connected. Also, if I choose to close a connection myself during one of the StreamReader/StreamWriter blocking calls I must raise an exception (u ...Show All
Xadja Can you help me please
How can in the database to save project Example: I create database in the MS Access and i export to VB Express edition, but in the form i create button with name "Save" and when you clicked , it will save the your new fatures (Name,Lastname,City,Country,State etc). Just Save no .txt or others. Thank you! Dr.Virusi wrote: How can in the database to save project ... ...i export to VB Express edition, How did you "export" to VB....are you using a dataset Fundementals of ADO: http://msdn.microsoft.com/library/default.asp url=/library/en-us/ado270/htm/mdconadofundamentals.asp Overview of Saving Data: http://msdn2.microsoft.com/en-us/library/ms299758.aspx Yes! Using a ...Show All
NozFx App install failes with Windows app & .Net 2.0 (VB 2005)
I have a Windows application I wrote, it works fine. You can install the .Net Framework 2.0 on a machine and run my .EXE, and it works like a charm. I published it to a share, and then ran the setup.exe from the share on a clean machine. The .Net Framework installer ran and rebooted the machine, but then the following error popped up: Application cannot be started. Contact the application vendor. Clicking Details brings up the install log: PLATFORM VERSION INFO Windows : 5.0.2195.262144 (Win32NT) Common Language Runtime : 2.0.50727.42 System.Deployment.dll : 2.0.50727.42 (RTM.050727-4200) mscorwks.dll : 2.0.50727.42 (RTM.050727-4200) dfdll.dll : 2.0.50727.42 (RTM.050727-4200) dfshim.dll : 2.0.50727.42 (RTM.050727-4200) ...Show All
JeevesIndia StDev returns NaN
Hi Everyone: When using the code to calculate the StDev of a data column, it returns NaN. But all other aggregate functions, like Sum, Count, Min or Max return a number on the same data column. It seems this function has a limit on the maximum number of rows it can hundle. The number of rows in the column is 46712; if I reduce the row number to 46064, it works. DataTable.Compute("StDev(DataColumnName)", "") Does anyone has this problem before Does anyone know under what condition, this function returns a NaN Thanks. Sorry, I hate to say this but there's nothing we can do at this point unless some customers file a hotfix request with proper business justice. So you migh ...Show All
Stuby085 problem converting string to datetime datatype
This code has been working for 2-3 mnths; now when we have moved both the site and the backend to a new server it throws this error... "Conversion from string "29/02/07" to type 'Date' is not valid." Dim username As String Dim reqrddate As Date = Format(CDate(txtrequireddate.Text), "dd MMM yyyy").ToString Dim nhi As String Dim eventnum As Integer Dim accnum As String = "" Dim reqstdate As String = txtrequestdate.Text Dim delivery As String '= "" Dim ward As String = txtward.Text Dim i As Integer Dim Item As String = Nothing Dim j As Integer Dim acclength As Integer <--more code --> Dim sql As String = "insert into requests ( [User_name ...Show All
ron nash Why does the String CompareTo method return inconsistent results?
Does this make sense Why "*".CompareTo("A") -1 "*A".CompareTo("A") -1 //ok. compares as less than, both times. "_".CompareTo("A") -1 "_A".CompareTo("A") -1 //ok. same results... "-".CompareTo("A") -1 "-A".CompareTo("A") 1 //what ! inconsistent results... why This is causing problems in our application, because the sorting on the DataGridView is unpredictable, and the users of the application are complaining. I can't think of any reasoning that would explain these CompareTo results. Any ideas BTW I found more results ...Show All
dsl_beginner Getting value from textbox inside repeater
Hi, I having a bit a problem getting the text value from a textbox that is in a repeater. Below is the offending piece of code:- protected void Repeater1_ItemCommand( object source, RepeaterCommandEventArgs e) { int rowid = (e.Item.ItemIndex); TextBox tmpQty = ( TextBox )Repeater1.Items[rowid].FindControl( "txtQty" ); Label tmpName = ( Label )Repeater1.Items[rowid].FindControl( "lblName" ); Label tmpPrice = ( Label )Repeater1.Items[rowid].FindControl( "lblPrice" ); HiddenField tmpID = ( HiddenField )Repeater1.Items[rowid].FindControl( "hidProdId" ); qty = tmpQty.Text; name = tmpName.Text; price = tmpPrice.Text; pid = tmpID.Value; } Repeater1_ItemCommand is declared in ...Show All
Malleswar WSE2202: The stream is not in a valid format
I have a server running WSE 3.0 and when I test our client against these servers I occasionally receive the "WSE2202: The stream is not in a valid format" fault. I understand that this is related to the MIME formatting but have been unsuccessful in determining what exactly causes this error by going through the incoming packets. Any suggestions/help/pointers would be really appreciated. Arjun ...Show All
chipjollyroger is File transfer possible with webservices ???
Is it possible to tranfer a file (PDF or other) by using Webrsivces How can i do that thanks wim thanks it works One can expose a result in a webservice as a string and pass the file info via that route. Such as the Hello World method does when you create a webservice from scratch and comment out Hello world. Or you can have a web service return binary data of the file or wrapped in Xml...its up to the designer of the webservice. ...Show All
cdemez Question about generics....
I have several classes that inherit from abstract class B, which itself inherits from abstract class A. I want to be able to call the DoSomething() method from class C and class D and have that method then call the base methods from A and B. Now this I’ve achieved. However, I want to create a generic list class and get that list class to iterate through its collection and return the relevant strings from the calls DoSomething(). In this case I would want s1 = “ABCABCABC” and s2 = “ABDABDABD”. Is this possible Any help you can provide would be much appreciated. Thanks in advance for any help you can provide. public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { C c1 = ...Show All
