Answer Questions
Simonth Microsoft .NET Security Warning
Hi all, I have developed a Windows Control Library that is called from a web page like explained in these sites: http://www.windowsforms.net/articles/iesourcing.aspx http://support.microsoft.com/kb/555687 All works fine, but if I open a modal dialog from my Windows Control Library, I got this message: Microsoft .NET Security Warning Never enter personal information or passwords into a window unless you can verify and trust the source of request. Source: localhost The permission sets at Runtime Security Policy to my strong name (of my DLL) is a copy of the FullTrust permission set with all permissions available selected. Anyone can help me This message doesn’t ...Show All
Christos25 Defining custom functions for code snippets
Code snippets allow you to use functions to do some processing on the data that gets inserted. AFAIK, currently there are only three functions available for C# (for instance SimpleTypeName). Would it be possible in any way to expand this set of functions For instance, I'm looking for a CamelCase function to be able to create a code sinppet that outputs code such as this: private int _myNumber; public int MyNumber { get { return _myNumber }; } Because of this naming convention, I only want to specify the type and name, and not as in the current propg code snippet, also specify the fieldname. Any ideas Building a refactor method sounds interesting. Any pointer on documentation for that Btw, I really th ...Show All
faina sleep for microsecond
hi i search for program that execute one command (such as read or write that not important) each more microsecond. i found the function in unix that do this and it's usleep() . i found that this can be execute in win platform from here: http://www.digitalmars.com/rtl/time.html#usleep but i don't know why this don't execute and when i run this example an error say that (errorc2371 time_t redefinition different of basic time ,error c2011 tm structure type redefinition! from file time.h) if any one have time.h that conatin of usleep or run and use this example plz help me with thank's Hi, As far as I know the StopWatch is a high frequency timer (quite precise) but you can use it to me ...Show All
Uwe Keim using 2005 dlls in 2003
I have a 2005 dll which i need to use it in my application in 2003. Is there any way to use it or i need to have 2003 dll. Thanks lili Aaron MCP wrote: ..... VS 2003 uses the .NET 1.1 framework while VS 2005 uses the .NET 2.0 framework. You can use .NET 1.1 components in .NET 2.0, but you cannot use .NET 2.0 components in an older environment. ya..agree... so there is no way to use 2005 in 2003.... :) If the 2.0 dll doesn't use any 2.0-specific features (like generics), you should be able to reference and execute it from 1.1. Hey lili-a, I'm afraid Visual Studios won't allow you to do that. VS 2003 uses th ...Show All
Leadfoot Practical use of multithreading???
Hi all, I'm not an expert on threading and to be honest I've not used threads directly before. I have an interesting problem I'm not sure how to tackle. Basically I'm developing a .NETCF2.0 application in C# and have a class that contains an event handler to recieve SMS messages using the PocketOutlook assemblies (API). When a new SMS message is recieved this handler parses it and stores the data within a SQL mobile DB. Now most of this processing is pretty quick but I'm a little concerned about the overhead it will have on the UI thread. My first though was to have another thread handle these events but I cannot find a way of doing this. Basically I want a seperate thread to use the SMS receieved event h ...Show All
killfr0g How to overload left shift (<<) operator in c#
It's quite easy to overload left shift operator in c++. I search all around web but could not find any suitable solution. I would like to overload << operator in c#. Something like this. public static void operator << (String Value) { Console.WriteLine(Value); } So, when calling from object of any class MyObject << "Hello World"; should print Hello World in console. Is that possible you can't overload left shift operator like this in c#. Because in the left shift operator, the first operand must be the containing type and second operand must be an integer. Hi, in C# the << binary operator can be overloaded but expects to take an int as one ...Show All
cpurick Events
I know how events/delegates works. its when implementing them that seems to be the problem with me. now... I have: a Form several classes the form knows nothing, it only knows about 1 class, which it instantiates. this class instantiates other classes. The form, nor do the other classes, need to know about each other. now, I have successfully created events which when raised from the main form, one of the classes acts upon it - thats all good. what I want now, is the complete opposite. I want to make an event where, in one of these classes (not the class the main form creates) I can raise so that the main form picks it up and acts upon it. Since I am mostly confused at times when events are involv ...Show All
nabeelfarid how to load datatable with xml
<tables> <row> <table_name>ticket</table_name> <record_key>68</record_key> </row> <row> <table_name>sales</table_name> <record_key>3001</record_key> </row> </tables> how can i load a datatable with above xml string How do we put the xml < a loan = " 1 " > < b Payee = " A " amt = " 300 " /> < b Payee = " B " amt = " 409 " /> < b Payee = " C " amt = " 390 " /> </ a > < a loan = " 2 " > < b Payee = " A " amt = " 200 " /& ...Show All
Bill Reiss Compare ArrayList
Hello, I have 2 sorted array lists. e.g. arrayList1 = a,b,c,d,e,f,h,k,l and arrayList2 = a,c,d,f,g,h,i,j ArrayList1 contains the list of strings that are to be compared against. Unfortunately there are thousands of strings in each. So I don't know if it would be any good doing something like; does arrayList[0] == arrayList[0]||arrayList[1]||.... (in a loop of course). Another thing, arrayList2 is getting its (distinct) data from a database so I can't really check it against arrayList1 there and then, as it would leave the connection open for longer... I don't know maybe this is an ok trade off I don't suppose there is an efficient arrayList1.compare(arrayList2) method out there ...Show All
DiasVFX How to set breakpoints in other projects when current is using binary references
This is in VS 2003 I haven't tried to set debug points in other projects that are tied to this project. What I mean is, I am building my windows form, running it and would like to set debug points in a couple of other projects that this one is using a binary reference to. We are not going to be using project references, because it's our standard not to. So I am not just going to add the other projets inside this solution. I tried to open my other 2 solution files, tried to set breakpoints, then ran my current project but it's not stopping at the breakpoints I set outside this project, in my other 2 solutions. I know the code is htting those methods but it's not stopping at my breakpoints outside this one I'm runnin ...Show All
Jarodtweiss DataTable
May i know the the way to fill data into a datatable and can i bind the data table to a datagrid as the datagrid's datasource To fill data into a datatable, use DataAdapter.Fill method (SqlDataAdapter.Fill, OleDbDataAdapter.Fill, ... ). and you can bind dataTable to a datagrid as the datagrid's datasource. for example, datagrid1.DataSource = dtable; if you have DataSet which has one or more table, you can use DataSource and DataMember property. for example, datagrid1.DataSource = ds; datagrid1.DataMember = "tableName"; I hope it works. soemoe thanks a lot... ...Show All
Alex K Attenuating SoundPlayer Volume
I use SoundPlayer to punctuate long file downloads and other processes and give me sound cues of the app state in broad sense. One problem I have now is that the volume is so loud that after a long pause it might frighten me a bit with some sounds. Manually adjusting volume in SoundPlayer 10 does not seem to help. I cannot get a hang of it although I tried numerous inroads. SendKeys.Send ( "VolumeDown" ); did not work. I tried to exploit Volume.exe: Set Volume Control Levels Using Visual Basic at http://support.microsoft.com/default.aspx scid=KB%3bEN-US%3bQ178456&%5d and another related sites to no avail so far. It may all boil down to controlling volume in MS kernel sound mixer or something, I do not know. Please, h ...Show All
Pockey Interfaces and Contravariance Q. - No Delegates
Hi I was wondering if there was any way to make something like this work: public interface IDataContainer { ... } public class RealDataContainer : IDataContainer { ... } public interface IDataProcessor { ... void Process(IDataContainer cont); } public class RealDataProcessor : IDataProcessor { ... void process(RealDataContainer cont) { ... } } I know that its possible with delegates and generics, I wanted to know if this was possible using some other tricks. VS2005 doesnt seem to like it. Any help would be greatly appreciated. Thanks. AM Like I said, I always have trouble remembering which is which out of covariance and contravariance. :) So I went ...Show All
Vikas H how to disable the event of index_change of ComboBox
There are two ComboBoxes in my application with the same items and should be changed synchronized. However, whenever there is a change to the index, the programe should write data to the Serial Port...So the problem now is, when I change the index of one ComboBox, the other one will also change, however the data will be written to the Serial Port twice... private void cbFreq _SelectedIndexChanged(object sender, EventArgs e) { comboFrequency .Text = cbFreq .Text; decimal freq = Convert.ToDecimal( cbFreq .Text); if(registers.GetFrequency().ToString()!= cbFreq .Text) registers.SetFrequency(freq); } private void comboFrequency_SelectedIndexChanged(object sender, EventArgs e) { cbFreq .Text = ...Show All
mtm81 Print Forms.Panel
I have a form that contains a single Panel (which contains a bunch of stuff). How can I print that Panel this looks like the chunk of code that i'll be needing to print out a log sheet with embedded barcodes and some other controls contained in a panel control which is the full size of an 8.5 x 11 page. what is the entry point to this process do i call DoPrintInBackground to get the panel "capture" started, and then it goes right to the printer or are there multiple calls to the different parts required to get from screen to paper thanks in advance for your reply. private void printDocument_PrintPage( object sender, System.Drawing. ...Show All
