AdamB78's Q&A profile
Smart Device Development How do I provide Active Directory Authentication in .NET Compact Framework 2.0?
I need to provide authentication from the .NET Compact Framework application to a Windows Active Directory. But I figure out that there is no System.DirectoryServices Namespeace in the compact framework. Does anyone has any suggestion on providing a Active directory authentication to a smart client Thanks Alex. The LDAP API supported by CE 4.2 and 5.0 allows me to login to AD. I ended up writing a COM wrapper for the API as you suggested. My project is for Pocket PC 2003 and the SDK provided by micrososft is missing the wldap32.lib. So I make my Mobile 5.0 (the file is there is the 5.0 sdk) working but is waiting for Microsoft to send me the file. See, http://forums.microsoft.com/msdn/ ...Show All
Visual Studio Express Editions sub handling several controls
I want ALL my TextBoxes in form1 to have the same code in the TextChanged event. So I wrote: Private Sub TextBox1_TextChanged( ByVal sender As Object , ByVal e As System.EventArgs) Handles TextBox1.TextChanged, _ TextBox2.TextChanged, TextBox3.TextChanged, TextBox4.TextChanged, TextBox5.TextChanged, TextBox6.TextChanged, _ TextBox7.TextChanged, TextBox8.TextChanged, TextBox9.TextChanged, TextBox10.TextChanged, TextBox11.TextChanged, _ TextBox12.TextChanged, TextBox13.TextChanged, TextBox14.TextChanged ChangedSinceStarted = True Saved = False End Sub But... Is there a way to do it more practically Is there a way to write it more syntetic Is there a way to say that all TextBoxes in form1 must fol ...Show All
Visual Studio Express Editions Commercial version of VC#?
Is there a commercial version of VC#, or do you really have to buy the whole $1000 Studio packet with VB, C++, Java etc. to get it For example in Express versions you have New Project and Open Project in the File menu while in the commercial versions you have New and Open with a buch of sub items each. Also the New Project dialog is simplified because Express versions don't support multiple programming languages so you don't need to select the programming language for the new project. Tool\Options command in Express versions by default (you have a checkbox to change this) only show a small part of the available options while in the commercial versions it show all the options. The View menu h ...Show All
Internet Explorer Development Problem with cancel IE navigation by using Stop() method
Hello, I try to cancel IE navigation by using BHO written in ATL (I use as example a PopupBlocker by codeproject) and to make IE to navigate to "my" url. But Stop()-Method returns the program to Invoke(...) and causes BEFORENAVIGATE2 event again instead of to stop navigation. The IE will be navigated to navigation cancel site and then to http:///. That is a code example that I use: STDMETHODIMP CPub:: Invoke(DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags,DISPPARAMS* pDispParams, VARIANT* pvarResult,EXCEPINFO* pExcepInfo, UINT* puArgErr) { if (!pDispParams) return E_INVALIDARG; switch (dispidMember) { case DISPID_BEFORENAVIGATE2: *V_BOOLREF(&pDispParams->rgvarg[0])=VARIANT_TRUE; m_spBrowser-&g ...Show All
Visual Studio c#, debugger freezes up the system
There is a strange problem that I cannot solve. I have got VS 2005 + .NET framework 2.0. For some reason when I run an application under debugger the entire system becomes frozen (only the mouse pointer moves). Even in a the most simple console application: class Program { static void Main(string[] args) {} } when I run it the system becomes frozen. Any help P.S. C++ debugger works without any problem P.S.2 I tried to install SharpDevelop (an open source IDE for c#). It has the same problem. Thus the problem is not in VS but in .net framework itself. Hello EliMLi , Thank you for your feedback! You might want disable any special mouse drivers. Sometimes they interfere with performance. Also, take ...Show All
Visual C# How can I edit the Controls' properties while the app is running?
I'm running a C# project in VS2005. If I make a small change to one OCX's property such as a textbox's visible property in the editor while the client is running in debug mode I get a dialog box saying "property value is not valid." This option is enabled in my IDE. I have to hit "OK" and then press stop the app in order to edit. editing. This is happening at least 100 times a day and it is just too frustrating at times. This wasn't the same in VS2003, it would let you edit and would remind you to either continue execution or restart the compilation. Is this still available with VS2005 Please let me know if you have any good idea about this. Look at the PropertyGrid control. Andrej ...Show All
Visual Basic How to fill buttons texts with for each statement
Hello, I would be grately thanfull if someone could help me out with this problem. I have a set of 75 buttons named button1...button75, and I want to fill the text of the buttons with data I have inputed in a dataset. I am using a for each statement to get the information from the data rows, but I cant put the button name as a variable so that it changes to the next button to put the next text. Right now all the information is put only in one button, so it ends up with the last data from the dataset table. Please help Thank you, Alfredo you can get the button reference as fallows Dim intCtr as int32 = 1 Form1.controls("button" & intCtr.ToString()).Text = "Put Your Text here&quo ...Show All
Windows Forms How to get all mouse clicks in child controls
I have a parent user control. I want to capture all mouse clicks within the control, even if the mouse click is on a control within my parent control. How do I do this You can try and look for WM_PARENTNOTIFY and WM_MOUSEACTIVATE event. What I suggest you do is,create a WinForms Application and then change the property of the project to Console App,so that you can see the Console Window. In your user control, protected override void WndProc( ref Message m) { Console .WriteLine(m); base .WndProc( ref m); } you will see all the messages coming up in the Console.When you click on an underlying control,you will find that these two messages are sent to the userContro ...Show All
SQL Server Matrix group headers not exporting to CSV
Hi, I have a report with a matrix. When i run the report and export it to CSV, data is displaying properly but group headers are not. I am grouping my matrix by week in column grouping. When I run the report, it's properly grouping and displaying first sunday of week in the header. When I export to CSV, first sunday of week is not at all there. I also checked the property of the textbox Output = Auto. Is there any reason for this behavior Regards, ...Show All
Windows Forms TableAdapter Update Error
I made a TableAdapter and use ObjectSource to bind it to GridView, when I insert new rows it works OK, but when I try to Update or Delete it gives me this error: ObjectDataSource 'RegionObject' could not find a non-generic method 'Update' that has parameters: RegionDescription, original_RegionID. Version Information: Microsoft .NET Framework Version:2.0.50215.44; ASP.NET Version:2.0.50215.44 Thanks Alaa Bhr Software Developer Bradley wrote: The problem in this case is that your Update method takes three params: RegionID, RegionDescription, and Original_RegionID but only two params are passed to the data source by the data-bound control: RegionDescription and Original_RegionID. I suspect you need to se ...Show All
Visual Studio Breakpoint will not currently be hit. No symbols loaded for this document.
I have been 'developing' with Visual Studio 2005 for about 3 weeks now - primarily .NET class libraries developed with VB. I am coming from VB6, although I did a lot of development with Visual C++ several years ago, so I am still trying to come to terms with the debugger. I have read many threads posted by people who are having a problem with breakpoints, specifically with the message in the subject line above. There have been many suggestions on how to fix this problem. Sometimes these suggestions work, sometimes they do not. Most of the suggestions involve deleting DLL and PDB files and rebuilding, or restarting Visual Studio. None of them suggest any problem with something the developer has done or any problem with the configuration of ...Show All
Windows Forms Changing Form size at run-timeI
When i change the size of my form at programmatically according to a selectedItem in my combobox. There's a little flicker on the form ... the form contains lots of usercontrol. It isn't smooth... How can i fix this DeborahK wrote: Are each of your user controls though setting this as well (Check the designer file...) yup .. well... i did for everypanel that contains the usercontrol ... something like this .. SetSizeFct() { this.Suspendlayout(); this.panel1.SuspendLayout(); .... //change form Size ... this.panel1.ResumeLayout(); this.ResumeLayout(); } Or did i have to do it for everything controls in the panel as well ...Show All
.NET Development PDF Encoding using StreamWrite and StreamReader
Hi All, I'm looking for the correct Encoding (or method) to read and write PDF files. When I use something like the code below, the generated PDF (Destination.PDF) is not the same as the Source.PDF used. StreamReader objSR = new StreamReader ( @"c:\temp\Source.pdf" , Encoding .ASCII); StreamWriter objSW = new StreamWriter ( @"c:\temp\Destination.PDF" , false , Encoding .ASCII); objSW.Write(objSR.ReadToEnd()); objSW.Close(); objSR.Close(); Thanks in advance! Since PDF can contain binary data and supports multiple encodings, I must once again warn against using anything other than binary access. Just because this is working with some files does ...Show All
SQL Server Replicate column to subscriber - even it if is unchanged in UPDATE statement
Set publisher database table column to 1. Replicate table to subscriber (column is also 1 on subscriber once it is replicated). Set subscriber database column to 2. Update publisher database column to 1 (even though it is already 1). Change is NOT replicated to subscriber (it stays at 2). This means that replication is comparing the insert statement to its current value in the database. Is there any way to change this behavior We want the the column to replicate to the subscriber. Peng, What a great stored procedure! It turns out that the command that is sent to the distributor for replication only contains the fields that change. For instance: Table has the fo ...Show All
.NET Development Parse XML that not start with <?xml version='1.0' encoding='UTF-8'?>
Hello, I am trying to parse the response of a server the problem is that it doesn’t start with < xml version ='1.0' encoding='UTF-8' > It has rubish before the xml declaration. Does C# provides any method to transform the string in a correct XML document Thank you. > not start with < xml version='1.0' encoding='UTF-8' > > is that a valid xml yet Some terminology first: we say that an xml document is valid , when it satisfies an xml schema or an DTD. Generally, xml documents are not required to have a DTD or a schema. In this case it is correct to ask if an xml document is well-formed . So, I interpret your question as whether the xml document is well-formed . Yes, in a well-formed xml do ...Show All
