I want to create a form almost exactly like the database properties page that appears in SQL Server Management Studio when the properties of a SQL CE database is selected. Basically, the form has page options that show general properties in a propertygrid, a shrink and repair page option, and an option to set the password. Does Microsoft have some code posted on how they show the properties page of a sql ce database?
code For Each item As Reflection.FieldInfo In GetType(NameSpace.ClassWithNestedClasses).GetFields rtfAppend(item.Name & ":" & Tab & item.GetValue(Me)) Next For Each item As Reflection.PropertyInfo In GetType(NameSpace.ClassWithNestedClasses).GetProperties()
[code]...
which gets me the simple string vars and properties of my top class, but how can i apply this to loop through all sub classes and get there vars and props?
I'm looking for some code (C# or VB.NET preferred) to iterate through all folders in an Outlook mailbox and return the names of those folders. I'm not looking to pop up the Outlook folder dialog, but rather to return the folder names in a given mailbox from outside Outlook.
I'm writing a little Database administration program.It works fine if you give the db, but not when you don't know which db is installed.How can I enumerate all running databases?
I want to enumerate all the directories in C: and also at the end of it I want the size. Now, I can enumerate the directories but I have no idea how to get the size.
I have the code here but everytime I try and add My.Computer.FileSystem.GetFileinfo it bombs out saying that I have not expressed it. I suppose I need to add a variable for my.computer.filesystem.getfileinfo but how do I add two variables in one for each statement.I guess I could declare it outside the "for each" statement.[code]...
I think my problem is easy to solve. I developed an interface called "Animal". My programmers created classes for "Dog", "Cat", and "Horse" Later I want to let the user create an animal in a Windows form. How can I get my annimals to appear in the combo for selecting one of them? Each animal has it's own DLL. If tomorrow a new animal is developed, the combo should present the new value.
Because I need to get all the characters of the alphabet OF AN ARBITRARY (variable) LANGUAGE, and that in the correct ordering sequence.
How can I do that without knowing the alphabet of every possible culture/language? System.Gobalization.Cultureinfo for example has information on date format, and a sorting method, and codepage info. But not info on the alphabet itselfs. Forthermore 'A' to 'Z' ordering iterating won't do, because German for example has characters such as ÄÖÜ, which are after 'Z' in the codepage numbering, but follow after aou when sorting.
Can I somehow use the codepages to get all the characters, and sort them somehow ? By 'all the characters' I mean all letters, including numbers, but not punctuation marks. And possibly only upper XOR lowercase.
Does anyone know how to enumerate through the set of file attibutes that are part of Windows? How are Unions handled which have a sum of 28 in file attributes?
I need to know how many times an Item is repeated in a listbox? I use Listbox1. items. contains(Any string) to determine if this item is existed or not , But I need to know how many times??
Dim oControl as Control For Each oControl In Me.Controls debug.print oControl.Name Next
the thing its that i doesnt enumerate the child objects for example..
if the form has a tabcontrol, it will spit only Tabcontrol1 but i want to enumerate everything contained in all the form even of theyr childs of other objects.
In a case where you would like to reset an array of boolean values what is faster, rediming the array or enumerating and resetting the values? I have run some tests and they seem to suggest that a redim is a lot faster but I am not convinced that it isnt a result of how I'm running the tests.
My tests seem to suggest that redim is nearly twice as fast.So could anyone care to comment on which is faster and why? Also would you expect the same result across different languages?
I need to have a property that is a nullable date as the datestamp is used for when a process is completed. If there is no date this is a way to determine if the process has occurred. I have created a Nuallable DateTime property (DateTime?) However when I try to assign a value from my database entity (when debugged has a date value) I am not thrown an exception however my property still reads a null value after assignment. How can I get a DateTime? type to accept a DateTime value?
I thought this would do the trick _object.DateStamp (type = DateTime?) = _entity.DateStamp (Type = DateTime?, Value = DateTime) o Or for more understandable syntax Ctype(object.DateStamp, DateTime?) = Ctype(entity.DateStamp, DateTime?)
Strange thing is I can assign the properties value like this. Ctype(object.DateStamp, DateTime?) = Now I am using LinQ Entities.
where I have to try organise a number of databases. Some of these I am sure are duplicate databases.I was wondering if anyone knew if there was a way to interigate the database objects so as to make a comparison between databases (see if they are in fact duplicates.)I would (ideally) like to get a list of all database objects - such as queries, forms, tables,modules etc.. Then look at either the "date modified" or "date created" property so as to see which is the most up to date as well as somparing the contents of the database.I have played with Delphi and dbGo to try see if I can get the info required - but cant seem to get all the properties I need.Here is an example of what I have tried using the "openschema" method such as...
i have several classes / objects from it in a program that hold data like clsAddress with properties id, city, zipcode, name, and clsMyData that contain id, datafield1, datafield2, datafield3 and many more (just examples) I want to have methods in the objects to load the object from and save the object into a database, like me.loadFromDb and me.SaveToDb Of course i can do creating db tables like tAdress, tMyData, ... and in the methods do select / insert statements like "insert into adresses (city, zipcode, name) values(me.city, me.zipcode, me.name) etc. BUT - what i dont like is a) i need to build this loadfromDB / saveToDB Methods for every class separately and b) whenever i alter a class, i must alter the DB structure and the methods.
registry key and check the displayname & displayversion registry value for all the sub keys under the uninstall key then compare the displayname & displayversion value with a if statement.
For example if one of the the displayname = "Adobe Flash Player 10 ActiveX" & displayversion = "10.1.82.76" then textbox.text = "Your adobe flash is up to date"
This is the code I been using to check a specific registry value to see if quicktime 7.67.75.0 is installed i figured it would be best to enumerate the subkeys and check the displayname & displayversion because im checking like 6 programs to see if the version is current.
Dim quicktime As String quicktime = My.Computer.Registry.GetValue _ ("HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall{EB900AF8-CC61-4E15-871B-98D1EA3E8025}", "DisplayVersion", Nothing)
I would like to populate a Combo with all the type names that a DataColumn can be ("System.String", "System.Boolean", etc). How can I do that without having to manually add the combo items?
I am using vb.net and trying to use the netapi32.dll to enumerate all the process on a remote server. I have used NeServerEnum initially to allocate all of the available servers but have yet to get the NetFileEnum to work correctly. I have used 'Nothing' for the server name and it won't recognize the process on the local machine. If I try to select a server it returns '1113'. This code from what I have found means either 'the file is already open' which means little to me or ERROR_NO_UNICODE_TRANSLATION, just from what research I have collected on the number. The following is my code.
Using Visual Studio .NET 2008 or 2005, is there a way to automatically generate properties for each column in an SQL Server database table? I am assuming other code-generation software exists that will do this. I know with Visio I can connect to my database and it will generate diagrams by table, this would be similar to that.
I have a class that represents the table of a db-row. Its properties are the columns of the table. I add a new row to the table with the following code:
Public Sub AddRow(oTestRow As TestRow) Dim sql As String With oTestRow
[Code]....
That is just an example, but my classes have around 30-40 properties and this brings a very large and complex sql string. Creating, editing or maintaining these sql strings for many classes could generate errors. I am wondering if any compact way or method exists in order to add the whole object's istance (the properties of course) to the table "TestTable" without writing such a large sql string. I created the TestRow in the way that its properties are exactly the columns of the table "TestTable" (with the same name). But I did not found in the ADO.NET anything that could be used.
I am trying to find a way (VB or C#) to read items that should be present in the systray without looking into the items in explorer's toolbar control. Basic idea is to emulate the systray on a shell other than explorer.exe