manders's Q&A profile
Visual C# DLL Import (help please) 2 Questions
I need to import a DLL file in one of my Class.cs Files this is what i have but i dont think its correct: [System.Runtime.InteropServices. DllImport ( "blah blah blah.dll" )] I am not sure what you are trying to do so this could be way off. But if you add the .dll file to your References folder you can then include the proper using statement. ex. add msxml6.dll to the resourses the appropriate using statement is using msxml2. You can then use any function inside of the .dll. I don't know if that helps at all but that is how I have done it in the past. ...Show All
Software Development for Windows Vista Credential Provider / User Session Question
Hi, Is there any way for a credential provider to associate some of the data that is provided by the user at the logon UI page with the subsequent session that the user receives I think the answer is no, since none of the ICredentialProviderCredential methods expose any information about the user's session, but I was wondering if there was some other API that I could use during the ReportResult function to get some form of unique session identifier. Thanks Couple corrections: Even prior to Vista, winlogon could exist in sessions other than 0 (Terminal Services connections, Fast User Switching). Also, WTSGetActiveConsoleSessionId returns the TS session id of the session currently bound to the physical dis ...Show All
Visual Basic not sure it this goes here or not
I am using vs 205 team suite. I am at this point creating a crx app but everytime i try to save i get an error. An unhandled win32 exception occurred in devenv.exe[3612] the number changes, and then exits. when i restart and try to ope the project i get the same message on opening the project. How can i fix this Event Type: Error Event Source: .NET Runtime Event Category: None Event ID: 1023 Date: 12/8/2006 Time: 2:41:42 PM User: N/A Computer: SCOA-858815 Description: .NET Runtime version 2.0.50727.91 - Fatal Execution Engine Error (7A2C4D12) (0) For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. ...Show All
Visual Studio How to catch .net 2003/5 solution tree drag and drop event
I am using EnvDTE to build an addin for .net 2003/2005. I am trying to catch the drag and drop event of the solution tree for both file items and folders. From the EnvDTE module, I can't find anything which is really useful to do this. Also, found that IVsHierarchyDropDataTarget and IVsHierarchyDropDataSource interfaces in the VSIP provide support for drag and drop, but I have no idea to hook them up with the IDE's solution tree so that we could catch the event. Please help on this. Thanks very much. Ivan Hi Ed, I tested your sample code and my code again. I found that you are right that drag and drop a solution item to a project folder and drag and drop an item from one project to another pro ...Show All
Visual C# How To Copy To Clipboard Like MSPAINT
Hi, I would like to be able to copy a bitmap to the clipboard using a method similar to that used by Paint. If you use a program like ClipCache Plus (a free version 2.9 is still available), it will keep copies of items that have been sent to the clipboard. If you use Paint, it will copy to the clipboard in such a way that ClipCache can see it. If you use the Visual Studio 2005 Clipboard.SetDataObject(ObjectName, true); It does copy to the clipboard. But it is not available to ClipCache. I have also tried Clipboard.SetData and so on. It doesn't work. Does anyone know how to do it. In Delphi I used var AFormat : Word; AData : THandle; APalette: HPalette; fBitmap.SaveToClipboardFormat(AFormat,AData,APalette); Clipboard.S ...Show All
SQL Server How to invoke nested stored procedures in SQL Server projects in VS.NET 2005?
Hi, I would like to use a stroed procedure within another stored procedure ( nested sp ) in a SQL project in VS.NET 2005. Since I have to use "context connection = true" as connection string, I wont be able to use this connection for another sqlconnection object. Because its already open. and If i try to use a regular connection string ("server=localhost;...") it will raise a security permission error. Having this problem, Im not able to use nested stored procedures. Would anyone please give me a hint how to resolve this issue Hi, you didn’t post the securiy set you are running on for this procedure, but as of the error message, I guess you are running safe, which is normally ok for the type o ...Show All
Visual FoxPro Report designer - Creating an argument for a field
This is probably a really basic one for you guys but I'd appriciate some help. I have a table which contains multiple rows and I want to pull out a specific value within that I would type into a command runner: use emmfil set filter to fileid="02" Then I would want the field Value1 How do I do this in a report designer Thanks Ben Normally you prepare the records beforehand, then run the report command to show your report on the filtered set. Beware of your example use of SET FILTER. If you do not have the proper Rushmore-optimized conditions, depending on the size of the table and the incidence of hits vs. miss on the filter condition, this command ...Show All
Smart Device Development Type.GetConstructors() - InvalidProgramException on CF, works fine on the standard framework
I have a piece of generated code that the CF (2.0SP1, August patch) just won't accept. The code is working just fine on the big framework, but mscorlib in CF gives me an InvalidProgramException. The context of the call to Type.GetConstructors(): protected virtual object CreateInstanceWrapper(Type type, params object[] args) { object instance; #if !CF instance = Activator.CreateInstance( type, args ); #else ConstructorInfo constructor; Type[] argTypes; argTypes = GetTypeArray(args); constructor = type.GetConstructor(argTypes); if (constructor == null) throw new ArgumentException("There is no matching constructor"); instance = Activator.CreateInstance(type); constructor. ...Show All
Windows Forms Binding to BindingSource
Hi, I have a complex object that has a List<T> that contains a List<T> too. I would like to bind this object to a BindingSource and use the BindingSource.DataMember to reach the inner List<T>. In the documentation I found the IListSource interface that looks perfect for this task so my object implements this interface. In my implementation bool IListSource. ContainsListCollection { get {return true;} } But if I run this code the DataMember has no affect and the BindingSource is binded to the public propertys of the outter List<T>. I put a breakpoint to the ContainsListCollection{} property but it is not hit at all. What is wrong What are the interfaces that I have to implement in my classes to solv ...Show All
Windows Forms Windows Forms Connection String Encryption
I have tried multiple methods of encrypting connection strings in app.config and other encrypting in code. Most would put the encyption methods in the code and encrypt the connection string and it would be satisfied. But think like a hacker for a second. Build a simple app, add a connection string to the application. Build the app. Go to your project directory->Bin directory and find the app exe. Rename it to app.txt and open the app in notepad. Make sure notepad is set to wrap, go all the way down to the bottom of the file and you will see the connection string in plain text. It will look like J EData Source=localhost;Initial Catalog=database;Integrated Security=True 1.0.0.0 ) Imagine if the username and password bei ...Show All
Windows Forms (VS2003)Owner Drawn Listview Item Height
How do you set the item height of an ownerdrawn listview in 1.1Framework Our target framework is 1.1. I know that ownerdrawn listview is available in 2.0, but we are not currently keen to moving to 2.0 as of now because of business reasons. I need to create a listview with variable item height in report/detail view. What message should I send to set the desire height of the listview item. Just to set the general item height will be a start. Has anyone done this My custom listview is an implementation of virtual listview. The listview doesn't really have an item collection. Most drawing are done using the API calls. For some reason even when the MEASUREITEM event is cau ...Show All
Visual C++ How to validate a xml file with external DTD file in msxml4
I'm confused in how to validate xml file with external dtd file. With msxml4,the parser will automatically validate the xml file if the file have the doctype such as <!DOCTYPE MYXML SYSTEM "aaa.dtd"> but i am not sure everyone announce it in his xml file. so how can i test that the doctype have been announced ,and how can i validate the xml file with my dtd file manually This question is outside the scope of this forum - for the scope of the VC General forum please look at: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=19445&SiteID=1 For such issues please use the newsgroups at http://msdn.microsoft.com/newsgroups. OTP Thanks Dami ...Show All
Visual Studio 2008 (Pre-release) Subscribing to a PageFunction's Return event from another Window
I have a series of PageFunctions and two Windows. One window is the main window for my application, and the other is a window that just contains a Frame. From the main window, I launch the second window, and pass a PageFunction to it that it navigates to. Before creating the window I subscribe to the PageFunction's Return event. The PageFunctions work and allow me to navigate through each one. When I reach the end I call OnReturn(), and it calls OnReturn for each PageFunction along the way recursively, exactly like the sample code. However, the Return event that I subscribed to from the Main Window is not called - I cannot comprehend why. Am I right in assuming the Return event has something to do with a NavigationService that my Mai ...Show All
Visual Studio Express Editions How to Display messagebox texts in multiple lines
hi all In messagebox.show "aaaaaaaaaaaaaaabbbbbbbbbbb" will show the entire mesage text in one single line how do i add a newline to this text so that messagebox box text is in 2 lines followed by OK button Line1--"aaaaaaa" Line2--"bbbbb" Thnks all thnks had to make a small correction though MessageBox.Show( "aaaaaaa" + cstr(Environment.NewLine) + "bbbbb" ) ...Show All
Visual Basic Debugging Error
Hello to all, I am a newbie to VB programming and currently I am viewing the vb '05 express tutorials. I am getting an error that I cannot find any information on. Right now in the tutorials, we are creating an RSS reader application. When I click to refresh the RSS feeds I get the following error: System.Net.WebException: The remote server returned an error: (404) Not found at System.Net.HttpWebRequest.GetResponse() at RSSReader.RSSManager.ProcessNewsFeed(String rssUrl) Can anyone provide help with this Please feel free to email me at: greg.petrosh@gmail.com Thanks Greg ProcessNewsFeed(String rssUrl) The Url page specified can not be located on the server (standard 404 error)...make sure you have t ...Show All
