kevlar623's Q&A profile
Visual Studio amazing System.InvalidCastException!!!!!!!!!!!!!!!!!!
dears, I 've writen the code below.although it enters the If statement and finds the type of objIDesignerHost.RootComponent.Site.Container.Components ,, MiscellanistControls.Label.Label . it doesn't allow to cast it to this type and gets System.InvalidCastException!!!!!!!!!!!!!!!!!!!!! ----------------------------------------------------------------------------- if (objIDesignerHost.RootComponent.Site.Container.Components .GetType().ToString() == "MiscellanistControls.Label.Label" ) { try { object ttt = objIDesignerHost.RootComponent.Site.Container.Components ; MiscellanistControls.Label. Label b = (MiscellanistControls.Label. Label )ttt; MessageBox .Show(b. ...Show All
Visual Basic Is it possible to change the method body of a parameter's methods (SET or GET) within the current assembly.
I would like to change the method body of a parameter's methods (SET or GET) within a class defined in the same assembly as my application program. Is this possible Thanks for your reply. The probem is I cannot because I am writing a persistence tool and the classes will be written by a third party software engineer using my tool. That person 'registers' the object with the persistence tool and the tool handles everything else. When the person accessed a property within the class he/she created (proxy loading), the system is to then (and only then) automatically look up the value from the database. As it is, I have to force the developer to always inherit from special class and call a 'lookmeup' function, for example, from the basecl ...Show All
Windows Forms How to serialize with TreeView?
How to serialize with TreeView in .NET 2.0 Awesome! Many thanks to all who contributed. I found it interesting (ok, annoying) that the latest version of the framework contained class(es) for working with XML and the ASP.NET treeview, but nothing for the windows treeview. This technique has shaved days off the current task I am working on. Again, wow! and many thanks. ...Show All
Visual Studio Tools for Office Conditional Format Events
Is there any way to catch when the user adds a conditional format to a range of cells in Excel 2007, VSTO 2005 SE Thanks Chris Hi Chris There's nothing special built into VSTO for this. To find out the best way to capture this event, I suggest you ask the specialists in the excel.programming newsgroup. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Invert screen
Is there a reasonably easy way to invert (make a negative of) the whole screen TIA, David. That will work, but you'll have to make the source sprite white to get correct results. The standard blending equation is SourceColor * SourceBlend + DestinationColor * DestinationBlend. With SourceBlend = InverseDestinationColor and DestinationBlend = Zero, that becomes to SourceColor * InverseDestinationColor + 0. If SourceColor is white (aka 1), the end result is just InverseDestinationColor, but other SourceColor values will give different results. If you set the blend to SourceBlend = InverseDestinationColor and DestinationBlend = InverseSourceColor, you could even crossfade between normal and inverted re ...Show All
Visual C# moving tools
help......its friday...its snowing.....i need to go home.... but first I have to fix this I want to use the timer control which is in visual c#. But my app is built in web developer.....how can I get the timer control out of c# and onto the tool bar in web dev .........and it does't drop and drag. I dont mind just getting it on the page, let alone the tool bar. Anybody that can help me with this will be in my praises all weekend richard You can't use System.Windows.Forms.Timer in a web app. You could use System.Timers.Timer but keep in mind that a web app is stateless so as soon as the page request is complete the code goes away. If you have a timer attempting to call page method then chaos will ensue. You can ...Show All
Windows Forms can't remove or stretch background image in visual basic 6 (sp6)
i know this is prolly a big newbie question but... i can't seem to remove or stretch a background image on one of my forms in my visual basic 6 project. i added it via picture property in the form's properties and now it says (bitmap) and i can't make it say (none) to clear the picture. thanks in advance Hi, The simplest way to achieve what you require is the following: Create an 'image' control from the toolbox. The image control allows you to select a picture and then specify "Stretch" to true or false using the properties panel. Lets assume that the 'image' control were named Image1 (by default). It is important to note that the 'image' control is different from the 'picture' c ...Show All
Visual C# Types and Variables
Is it possible to make a Type into a Variable When i select the item i want to navigate with nothing happens Any Ideas p.s I'm Using a tabs system pps this is part of a favourites system. ...Show All
Visual Basic How to save active page displayed through I.E.6 under text page.
Hello, I would like , through Visual Basic 2005 command, save under c:\test.txt an active sheet displayed on the screen through I.E.6 browser. I am working Windows XP . Any support will be welcome ! See http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1133806&SiteID=1 Sub Main() Dim strHTML As String = _ GetPageHTML( "http://www.microsoft.com/" ) Console.WriteLine(strHTML) Console.WriteLine( "Press enter to exit" ) Console.Read() End Sub Public Function GetPageHTML( ByVal URL As String ) As String ' Retrieves the HTML from the specified URL Dim objWC As New System.Ne ...Show All
Visual C++ (MSVCRT) _iob disappeared?
What can I do to replace the functionality of _iob Seems to be missing in MSVCR7/8 (using VS2005). Hello, I'm facing exactly the same problem. I need to compile with a library that was compiled using VC 6.0. Of course I have no way to recompile this library as it's part of a product from another company. Did someone have a way to avoid this problem I tried to make some stubs, I check in the header file (stdio.h, wchar.h) and so on... Many thanks in advance Laurent Flahou ...Show All
Visual Basic Include files in build
Hi I want to make a custom installer for an application, the files it installs should be included in the exe and extracted from the exe to a folder when the user installs the application. The installer should be a single file like a msi installer.. Thanks // Lasse LasseJ, Have you tried the Installation class This class provides the foundation for custom installations. The following example demonstrates the use of the Installer class. It creates a class which inherits from Installer . When Commit is about to complete, Committing event occurs and a message is displayed. Imports System Imports System.Collections Imports System.ComponentModel Imports System.Configuration.Install ...Show All
Software Development for Windows Vista Can DataExchange service hold variables?
I would like to know whether "LocalCommunicationServices" could have a .NET property to hold data returned from within the workflow .This way the host can get hold of this property and tap the data out instead of using events where the same activity would raise a custom event and the host would recieve the data through the events arguements.(This is a long way of getting things done.....). The doubt is whether the information on this property is volatile especially when whe have our runtime hosted in a webservice and caters to many client calls. Thanks in advance.... Thanks Tom...never saw it that way,though we have multiple runtimes in my scenario.I still think that we could have ...Show All
Visual Basic Creating a Image Gallery
Hi. I'm creating an image gallery in VB.NET 2005. I've got my basic interface nearly complete and need some help. So my first question is how I can create a list of image I've imported. I'd like to do some sort of gallery where there is all the images loaded into the program as a list. Then you click on the thumbnail/file and it opens in the gallery. I think that the best way would be to use a ListView but I can't figure out how to put images in it. To start, I've put a few images into the resources if that helps. I'm just not sure where to go from here. If you're confused, just say so and I'll try and clairfy it. Why dont you create a text file and add all of the paths of your images. Then use LineInp ...Show All
SQL Server insert image into database
how to insert n image.jpg into the database what should be insert query Hi, It stores the value in this format only for image.... but this is not a best practice, you should rather store the location of the files / images only and rest work should be done from the Front End Application so that you want lagging behind performance problem refer a nice research @ MS for Blob or not http://research.microsoft.com/research/pubs/view.aspx msr_tr_id=MSR-TR-2006-45 HTH Hemantgiri S. Goswami ...Show All
Internet Explorer Development CSS background centering problem
With the help of some simple CSS code i have turned a humble <a> tag into a nice button. The CSS code works fine in Firefox and Opera, in IE however i have a small problem. To achieve the button effect i use two small pictures. One picture for the unselected state and one for the selected state. The pictures must be centered under the text inside the <a> tag. Everything works fine if the text is small enough to fit into the specified width of the <a> tag. If the text is longer than the width the overflow is hidden. But... the picture is now not centered around the text, the top of the picture is at the center of the text. The following code demonstrates the problem. The pictures are 119*22 pixels. ...Show All
