How To Find ActiveX Properties Names Via Interface
Feb 19, 2009
Is there a method to find the property names for an activeX object via an interface? The property names I am searching for are the ones used in the OBJECT / param HTML tag. I have been searching through the documentation and found the IPropertyBag interface but when I call QueryInterface I receive the E_NOINTERFACE error.
Is it possible to get the MouseWheel event from an Interoped ActiveX Control?
I have a DXF Viewer (with measure) control I wrote in VB6 that is quite frankly... Huge. It would take an inordinate amount of time to rewrite the whole thing and supporting tools in VB.NET. The MouseWheel event is used to Zoom in and Out. The control has a MouseWheel_Input() method to accept MouseWheel data from the host.
I added all the VB6 Mouse events, the Enabled Property, and The ActiveControl Property in VB6. Recompiled and registered the control on my VB.NET development machine. Added the control to my new VB.NET project and verified it has a focus method.
'array Dim adapters As NetworkInterface() = NetworkInterface.GetAllNetworkInterfaces 'Need to output names 'adapter.Name' to another array for faster access. 'Iteration, slower
I would like to put all the network interface names into an array without using iteration (For Each, For i).Is there a way to get the properties ie. 'Name' of an array object and be able to array.getvalue() their names?
I don't usually use VB but now I must for an assignment. I would like to know if it's possible to change the display name for an object on a listbox. For instance, if I add to it a user defined class, there's a way to provide it's display name, instead of converting it to string and then add it.
This is what I have
Dim format As String = FormatOutput(object) Lista.Items.Add(format)
I would like to have the same output, but instead add the object.
Note: if such is not possible, then how can I associate the list box selection to the actual object? Doing it by index is painfull, because I'm using linked lists (ie., instead of arrays).
Note 2: python has a __str__ method which is called by default when the object is cast to string. Is there anything like it in VB?
I have several groups of files with idential names, but the files inside may or may not have identcal names, and may differ only in the size or date stamp. I want to combine them to save all unique directory names, and unique file names, and if the date/sizes are unique, then add some number on the end of the file name to make them unique as well. Only idential file sizes and names and dates will be discarded. How do you open directories to compare directory/file names and other properties?
I've created a Custom Control, and I will be placing a large number of instances of that Custom Control on my xaml page. In working with that Custom Control in the VB Code Behind, how do I do the following?
How do I reference the name of the Custom Control (in my VB code) which was clicked with the MouseLeftButtonDown event? For example, if I have 10 instances of my Custom Control in xaml, each with a different x:name (say 1-10), when a particular instance is clicked, how can I see which one was clicked? I've tried a number of things including e.OriginalSource.Name (which returns the component within the control which was clicked and not the name of the instance of the control). My Custom Control consists of numerous parts and pieces (Rectangles, Lines, Text, etc). Each of these items is a part of my layer. In VB code, once I can reference a particular Control, how can I hide or change certain parts of that control (such as hiding a Line, and changing the text). Also, I need to modify more than just the control which was clicked, so I need to be able to access properties of all of the controls, not just what was clicked. For example, if I click Control instance Test1, I also need to modify Test2, Test3, and Test5 in some way.
Here is some test code I through together as part of a Silverlight project using MS Blend 2. My control is much larger, and I need 200 - 250 instances/copies of that custom control, so I really need to know which control instance/copy was clicked.
I want to create a class (I think) that has properties that correspond to column names in a database table, such that they come up in Intellisense when I type the dot after the class name. Is this possible to do?
I am trying to load an actixex component in a VB project which was made in Visual C++.n VBA it works fine.In VB6, when I try to load the component on the toolbox I get an "Error 35005"In VB2008 the component can be added to the toolbox, but when I try to place it on the form, the following error occurs: "Failed to import ActiveX control. Please ensure it is properly registered."
In VBA you can have a Userform implement a custom interface and only the properties defined in the interface will show in the VBA Intellisense for the Userform. I tried to duplicate this functionality in VB.Net (2010) and all the base Form properties still show.[code]...
The project I'm working on (the same one I'm always asking about) has tabs as the main navigation. I've made some User Controls to sit above the tabs in an attempt to reduce the number of overall controls that are being used (to great success). Now, however, there's one control that overlaps some controls on a tab that are obscured by my newest UControl and I want to make the background transparent.I've seen that AtmaWeapon keeps pointing people to this page detailing how to make the background transparent. That's great and it worked for me. All I did was create the
Code:Protected Overrides ReadOnly Property CreateParams() AsSystem.Windows.Forms.CreateParamsand it worked the way I wanted. Yay. I did write the rest of it too as well as part from a post I saw on the msdn forums, but they weren't needed to get the effect I wanted.However, I've got a number of PictureBoxes on this UControl that should have a BorderStyle of "Fixed3D". However, when this UControl is repainted the borderstyle doesn't reflect this (Note to self: don't .Refresh() a control inside its own .Paint() event ). This doesn't happen the FIRST time they become visible, but only when they've shown up and are made to redraw (like toggling visibility). If the border changes programmatically they look fine
I have a main form, a separate plugin interface dll and another separate dll. Now this is my problem:I'd like to access the properties of the controls of the main form for manipulation in the other dll.
Example: MainForm Plugins.dll Data.dll
Main form have label control I define properties in the interface Plugins.dll from Data.dll I load Plugins to read the label control from the mainform.The question is how can I do that?
[code]For some reason I cannot change the color properties for the MonthCalendar control.[code]No matter what I change it to, it stays to its default color of white and black. Actually none of the color options work on any of the sections of the control.I am trying to hide the white border around the control and but a blue bar under the name of the month (top section).I have tried deleting the control and creating it anew on the form but no luck.It was working a couple of weeks ago.
How do I find out the hidden excel sheet name using ADO(OLEDB) in C#? In My Excel workbook there are a lot of sheets. Only one Excel sheet is in hidden mode. I need to find out the names of hidden sheets. My code finds both hidden and visible sheets.This is my code to find excel sheet names for all sheets. Is it possible/can any one tell me how to find out hidden excel sheet names without using Interop services in C#?
I've got a chart showing data as a part of a vb.net forms application. The Chart object makes a really pretty picture, but I need it to match the color scheme on the rest of the UI. How do I get the RGB values for the palette?
[code]It spews out the directories that contain the .my files [level2a & level2clevel3] and skips level2b which does not.It looks like this code for VB 6 would work:[code]I can get to the level1 directory. I am after an array of paths to subdirectories that contain matching file names.
I'm working on a little project that will inpart take the registry values for the exchange server configuration on a windows mobile device and then convert them to an OMA provisioning XML file. I have the xml code nailed, but we discovered in that process that the active sync exchange partner subkey is named differently on every device but, obviously the value names stay the same.
This is what I have so far but I'm stuck on obtaining the key name and then placing it into variable. Const branch As String = "SoftwareMicrosoftActiveSyncPartners" Dim ActiveServer As RegistryKey = Registry.CurrentUser.OpenSubKey(branch) Dim subkeys() As String = ActiveServer.GetSubKeyNames For Each subkey In subkeys 'some actions if name "Server" exists then Dim exchkey = Else messagebox.show "Exchange Server not configured. Please configure a server and try again"
I'm having trouble porting some .NET2-era C# to .NET2-era VB.NET. Specifically, I am trying to define an interface that an ASP.NET user control will implement.(For background, I am trying to re-implement Phil Haack's Model-View-Presenter example from several years ago: http://haacked.com/archive/2006/08/09/ASP.NETSupervisingControllerModelViewPresenterFromSchematicToUnitTestsToCode.aspx)
The C# interface I'm working from defines properties and events (IsPostBack, Load) that are already implemented by the base control.However, VB.NET is forcing me to explicitly implement these properties/events in the user control (Public Property IsPostBack() As Boolean Implements IView.IsPostBack...). I'd like to just define these in the interface and not have to do anything special in the code-behind of the implementing user control.I'm assuming that I can do this in VB.NET, I just don't know how. I've spent all sorts of time googling/bing-ing, and haven't come up with the answer.
This code gets all software that has an Uninstall Entry and it app path. However, given I have the app path, I do not know the name of the main .exe of the software. What ways are there to find the main .exe of a found application?
'Declare the string to hold the list: Dim Software As String = Nothing 'The registry key:
I am constantly receiving back objects and it would be very useful be able to print out all of their properties. Is there a way in VB to get all the properties of an object and print them out (to console)?
I'm wanting to dynamically create some controls relative to controls already placed on the forum at design stage, how do I find the locations of the controls that are already placed?For example, I have a label called lblDateTime, its location is (13, 167) and its size is (65, 13).In my code, I want to place a new label below this label.I've tried to set the location and size properties of the new label using the location and size properties of lblDateTime.Size works, no problem, but the location of lblDateTime always returns as 0,0.[code]I want to set lblMessage DateTime. Location to (13, 180), but I'm actually setting it to (0, 13)What confuses me most is that Me.lblDateTime.Size is returning the correct values, so it's not like my code isn't finding the control.
I have created some check boxes and buttons, and changed the names, but it seems like the system.properties saved both names now I would like to rename the button back to the original name but the name is being stored for some reason, and I cant access the original name, how do I clean this up?
i'm currently trying to test a program at home that i've written for an assignment at university. At the university they have a dedicated SQL server that i can connect to fine enough but to test and debug at home i have installed MySQL 5.1.
I now have trouble connectioning to MySQL the error message i get points towards that my program is acutally looking for an instace of MS SQL server and i don't know where to change this.
I have downloaded and installed "MySQL ODBC Driver-MyODBC 3.51" which some people have suggested corrects the problem, unfortunatly this doesn't work.
The current code i have is:
Dim strConnBuild As New SqlConnectionStringBuilder With strConnBuild .DataSource = "localhost" .InitialCatalog = "northwind"
I can't find any properties of the SqlConnectionStringBuilder that indicate what instance and protocalls it should use.
I am declaring an IList: Dim OrigVendors as IList OrigVendors = new List( of IVendors) I populate the OrigVendors variable and what I want to do is find all the objects that have the ID I am looking for. Then I need to update a property on that object for only the ones found. Is this do able with an IList or do I need to use some other type of collection? I am using VB.net.
i am trying to add a text file in Debug folder. But when i go to project tab to add a new item, there is no option to add a new item? What part of the setting needs to be changed? Using Visual basicExpress 2010.
It seems difficult to find good information on working with bitmaps. Specifically I am looking for .NET info on getting tile graphics to the screen. What I know so far is this. I need a picturebox for the display. I need a second picture box for a back buffer and then I need a third picturebox for the tiles that I would copy to the back buffer which then gets flipped to the screen.I need this to be done with .net controls and classes or functions and etc. If anyone has good information on this, please let me know. I am using visual basic 2008 express edition.
I need to write a code to find identical adjacent pixels in a bitmap image. It should work as the 'magical wand' in Photoshop. My images are always black and white (white background with car parts drawed in black). Given the x,y coordinate for a single black pixel in the whole image, the code should find (and paint with another color, say red) all other black pixels that are linked to that one, and so on, until all linked black points will be painted in red.
I need to write a code to find identical adjacent pixels in a bitmap image. It should work as the 'magical wand' in Photoshop.My images are always black and white (white background with car parts drawed in black). Given the x,y coordinate for a single black pixel in the whole image, the code should find (and paint with another color, say red) all other black pixels that are linked to that one, and so on, until all linked black points will be painted in red.This way, suppose that I have an image with 4 car parts drawed, then if I give the x,y coordinate of a black pixel, just THAT part to whose the black pixel belongs to should be painted in red. All other parts will remain black. Does it make sense?At the end, there are two pictures (before and after) to help understanding what I need to do to the images.I tried a simple 8-pixel adjacent approach for every pixel (starting on initial coordinate) but it turns out into a very stupid and endless looping algorhitm.
i want to create a html editor. to get started, i want the app to be able to find certain words, and change the font/color/size/etc. as for <a href=""><b> and so on, without changing the rest of the text after the selected text was modified. i'm sure that it has something to do with RichTextBox1_TextChanged for text that is being typed and just a button click for modifying selected text.
I have a program that someone else designed the form on and sent to me to populate the code. I am not sure what could have been done to cause this problem, hoping for a quick oversight on my part. There are several fields of textboxes that the user enters numbers in. Normal behavior for textboxes is when you tab to them the current contents are highlighted. On one of these textbox fields, and only that one set of textboxes, the contents are highlighted like normal at first, but after the user edits the content of the textbox, if you tab to it again it will go directly into edit mode instead of highlighting the contents. Each textbox in the field does this individually, so if you just edit one, all the rest will continue to highlight contents until you edit them as well. It appears you don't actually have to change the value of the textbox, just entering edit mode and getting a blinking cursor is enough. I cannot find a difference in the properties of these textboxes compared to the rest.
I have a DataGridView which populates from an SQL query just fine in default mode
using these table names [firstName] [varchar](20) NOT NULL, [lastName] [varchar](20) NOT NULL,
I have edited the column headers and set the column names to the same values as my table names yet the data is not showing in form load I have set datagridview.AutoGenerateColumns = False I know the data is there if I delete datagridview.AutoGenerateColumns = False then the data is shown with the default headings?
I made project using VB.Net 2005 with multi languages, the first form is MDIParent form with MainMenu and toolbars also there is some changes in properties as righttoleft and text of forms.In my Mainmenu (Menustrip) there is opetion to change the UI Culture and I have already done but I need to change all texts in the form as mainmenu items anf form properties.My quetion is: how can I reload my form again to read the new texts names and mainmenu items names from resx file?
I am doing work for a client who has lost the source code for one of their VB.Net WinForms applications. The assembly they have is not obfuscated at all. I am trying to recover as much of the source as I can as C# source and have tried several tools for decompiling assemblies, including Reflector, ILSpy and JustDecompile (all the latest versions), but they all produce code with a huge number of errors in them. Because of the large number of errors in the generated code, I am going to ask about the specific errors (in different questions), get more directed answers and in this way try shed some light on why all the tools are having difficulty decompiling this assembly. This question pertains to the fact that the code generated by all these tools always have a large number of invalid member variables (fields) such as the following:
private short $STATIC$Report_Print$20211C1280B1$nHeight; private ArrayList $STATIC$Report_Print$20211C1280B1$oColumnLefts; private StaticLocalInitFlag $STATIC$Report_Print$20211C1280B1$oColumnLefts$Init;
why the generated code has these invalid member variables?
Is there any way to get common control names like Save, Copy or Undo Redo in the user's windows language? (I saw this in some programs which weren't made for my windows language. Also the Yes No Massage Boxes will change...)