Answer Questions
Bluehunter Tried it , seems to work great for modal forms. but mdi forms ?
Hi VB Community Members, We wanted you to know about the release of the new Interop Forms Toolit 1.0. In a nutshell the toolkit makes it easy to create Windows Forms in VB.NET and then add them to an existing VB6 application. This makes it much easier to extend your VB6 app gradually and incrementally (form by form). This fits into our larger VB Power Packs initiative to deliver valuable features between Visual Basic 2005 and the next release, based on your feedback. We hope you get this today and try it out! Download page: http://msdn.microsoft.com/vbasic/downloads/powerpacks/interopforms/default.aspx Questions and discusions: Visual Basic Interop and Upgrade Forum Enjoy! Visual Basi ...Show All
AndrewVos Save data from a listbox to a .CSV file.
Hi, I am pretty new to Visual Studio, but know enough about SQL. I am working on creating some applications with VB to access my SQL database. I created a listbox that is extracting some data from a table. I am trying to Save that data to a .CSV file, but I am having major issues. I would really appretiate it if someone could help me and explain why my code is not working. I used examples to get to this code, but lack of experience is helping me to get stuck at this point. Thanks!!! Code: Try With sdlgTextFile .AddExtension = True .CheckPathExists = True .CreatePrompt = False .OverwritePrompt = True .ValidateNames = True .ShowHelp = True .DefaultExt = "txt" .FileName = filename .Filter = _ "CSV Fil ...Show All
redshock Interfaces and Non-Project References
I have the following situation: Proj1 Proj2 - has a reference to Proj1. Declares an interface. Proj3 - has a reference to Proj1 and Proj2. Has an implementation for the Proj2 interface. The problem is that any method declared in the interface that requires a class from Proj1 fails. The error messages say that there is no matching sub on the interface. Any method that doesn't include a Proj1 object works fine so it's obviously the references. When Proj1, Proj2, Proj3 are in a single solution everything works fine but I need Proj2 and Proj3 to be in a solution with a file reference to Proj1. I have it setup so that Proj1 is compiled and copied into a lib directory in Proj2 and Proj3 and they have a reference to their respective l ...Show All
newtoc#484467 BindingSource & AddNew record to dtatbase
I use Vb2005 & SQL Server 2005 database I make a data form to connect to database using bindingnavigator and binding source can I check programatically if my form is in adding new record or not I'm not where I can double-check what I'm saying, but... You need to ultimatly get to the datarow. The DataRow has a RowState property that will tell you if the row is disconnected, added, deleted, etc. I believe you can get to the datarow via the BindingSource.Current property. I'm not sure what exactly you'll get (probably a datarowview), but either way you should be able to drill down until you reach the datarow. Sorry I couldn't give you an example, but hope this helps. ...Show All
Nagaraj K need help about internet domains
Please help me about writing a program in VB.NET to do this : List all available domains on the internet. I would start by reading up on how DNS works. This should give you a clue as to what to do next. Technically, I guess you could with IP address 0 and work your way up. It's going to take a while, though ;-) Best regards, Johan Stenberg Hi, Are you joking There are probably millions if not billions of them. IPv4 gives 4,294,967,296 i.p. addresses some of which are reserved. With sub-domains going to as many if not more domain areas. Regards, S_DS ...Show All
traderhen Getting current selected index of a datagrid
I have beed reading for a few hours and trying different things and got hung. I am trying to get the current selected index name in a datagrid what I have found so far throws an error of "not a member" below is a partial of my code Private Sub DataGridView1_CellClick( ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellDoubleClick Dim EDFRow As 102ADataSet.EDFRow Dim a As String Dim b As String Dim c As String Dim d As String d = DataGridView1. <<<<<here is where I am having problems EDFRow = 102ADataSet.EDF.FindByEName(d) a = EDFRow.EES1 b = EDFRow.EES2 c = EDFRow.EE ...Show All
JunoJun vb.net 2003 simple access mdb example? Anywhere?
I bought vb.net back in 2003 and tried working with it for a few days - then uninstalled in disgust and went back to VB6. I've just decided its time to try out .net again for some database work with an existing access database. I've just spent the entire night searching for an example of just simply opening an access database from a local disk and stuffing some data into a combobox - with absolutely no success. The samples that (didn't ) come with vb.net don't seem to be accessable on the MS site any more. It keeps throwing me VB2005 upgrade "opportunities", SQL server stuff, and other unrelated things. WHen I did finally find the 2003 "quickstart" examples, the link goes crazy and locks up IE, showing a path with ...Show All
monchhib Need help with "Constant expression is required"
I'm trying to define an Enum containing integers that make up a colour scheme. My problem is to define the values of the integers. I dont know where to get the hexadecimal values for the colours and in any event would prefer to use the colour names and have the compiler insert the values. The following code is an extract of my code and the second line generates a compiler error stating "Constant expression is required" Enum Autumn As Integer PlotGridColour = Color.ForestGreen.ToArgb() PlotUpColour = &HFF00& PlotDownColour = &H60FF& End Enum To isolate the problem I tested the following statements; Private Const PlotGridColour As Integer = Color.ForestGreen.ToArgb() Dim P ...Show All
ToddGibbs Access database
I come from viausl 6 and i just want to ask the basics for working with mdb databases. (Maybe is the same as visual 6) Connect to database, search on it.. execute sql commands... Thanks for your help If you will write what you want in details. then it will better to answer. Untill now, in visual 6, when i was working with access databases i was doing something like this: dim mydatabase as database dim myrecordset as recordset ... ... Set bd = OpenDatabase(".\accessdatabase.mdb") 'Access 97 format Set myrecordset = bd.OpenRecordset("Table1", dbOpenDynaset) ... myrecordset.movenext myrecordset.movefirst ... etc, etc.... That is my knowledge (for database treatment in visual 6 ...Show All
Escimo Help: How to speed up the process if doing the files (one by one) deletion to recycle bin
by using the following source code, i found that it take a lot of time to do the files deletion. Is there any setting that i could set to speed up the process please do help me. thank you Private Type SHFILEOPTSTRUCT hWnd As Long wFunc As Long pFrom As String pTo As String fFlags As Integer fAnyOperationsAborted As Long hNameMappings As Long lpszProgressTitle As Long End Type Private Declare Function SHFileOperation Lib "Shell32.dll" _ Alias "SHFileOperationA" (lpFileOp As SHFILEOPTSTRUCT) As Long Private Const FO_DELETE = &H3 Private Const FOF_ALLOWUNDO = &H40 Public Sub DeleteFileToRecycleBin(Filename As String) Dim fop As SHFILEOPTSTRUCT ...Show All
JosepMola save file on another have the same name :"overwrite"
hi : how can i save file overwrite on the another have the same name thanks nogchoco .. but the problem is : after open file i try to delete file but i cannot access the file , because the file is used When you open the file, specify the FileMode as FileMode.Create, this way a new file will be created, even if one already exists with the same name. I threw in the conversion as a little extra You can save the bitmap to the same format if you leave out the format-specification, or use the same format as the original file. You're welcome, mm_ezzo thanks but ...Show All
Islamf How to Include the .Net SDK in my VB Application.
Hi Guys, I am facing a problem while trying to create interface between Nortel TAPI Server and my VB Application. Can Anyone guide me how to create the interface, i have the SDK(.NET) provided by NORTEL. Thanks in Advance guys, I'm not familiar with the Nortel API, however...you must first create a project level reference to the correct DLL or create the proper Pinvoke statement prior to using any outside API's...since this is a .NET API you should be able to make a project reference...once the reference is made you should be able to access the classes and methods through the proper namespace ...ie Nortel.TAPI.TheMethod ...Show All
Simon_G "TrollKit 1.0" - Not quite "Patterns & Practice" Material
I am sure the "Patterns & Practice" team @ MS are squirming about this InteropForms Toolkit 1.0. Honestly, I am a little disappointed in the emergence of this toolkit. Ideally MS should’ve created a migration path process and set of patterns to allow the developer to understand the inners-workings of this Frankenstein type applications. Instead MS decided to give the developer community what I would call a “TrollKit”. What happened to teaching people how to fish, instead of providing them with fishes Please do not use this “Trollkit”, instead take the route of visual inheritance & COM Interop, create your own set of class libraries, add WinForms to these class libraries, and you will be able to do anything with t ...Show All
PeterLlwr How to update a database from a DataSet
I have found a tutorial on Microsoft's site ( http://support.microsoft.com/kb/301248 ) which I have modified slightly to add data into an Access 2000 database instead of a SQL server database. I cannot get the code to work though. It opens the database but no data is inserted. I am using the Biblio dtabase and the authors table. 'Microsoft example of updating database Dim conn As New OleDb.OleDbConnection conn.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = C:\Temp\VB NET Dataentry\Data Entry With DataRow\Biblio.mdb" Conn.Open() ' Create an instance of a DataAdapter. Dim daAuthors As New OleDb.OleDbDataAdapter( "Select * From Authors" , conn) ' Create an instanc ...Show All
CodeButcher Order numbers
I've got a grid with an index on it, before saving the info i need to ensure that the numbers are all there from 1 to max and that there are no duplicates exist, e.g. 1,2,4,5 should change to 1,2,3,4 2,1,6,4 should be 2,1,4,3 9,4,9,1,6,8 should be 5,2,6,1,3,4 i was wondering how you guys would attempt to program this. Hi, Soory Bean code is in C# language, i think you can convert to VB ( if needed) Regards Chitrsen Aujikar Hi BeanR, Find solution of your problem in following code. Regards Chitrsen Aujikar using System; using System.Collections.Generic; using System.Text; namespace OrderNumbers { class Program ...Show All
