Norbert Thek's Q&A profile
Visual Studio Express Editions Loop through system colors?
How can I loop through all the system colors I want to draw a filled rectangle with each of the colors that are available & print them to a laser printer so I can see & compare the various shades of gray that each color prints out as. Thanks... I guess I must have mis-stated my question. Your code works fine, but it doesn't return the colors I'm looking for. I'm looking for the colors that start with AliceBlue & end with YellowGreen. I'm not sure what that list is called ... maybe "system colors" is the wrong term. Anyway, how can I get those colors ...Show All
Windows Forms Should I define the primary key before a DataAdapter.Fill ?
Hi, I am retreiving a table from an Access database using ADO.NET by: 1) Creating a SelectCommand 2) Assigning it to the DataAdapter.SelectCommand 3) and then performing a DataAdapter.Fill to implicitly create the datatable. Should I define the primary key for the datatable before I populate it or after many thanks ...Show All
Visual Basic Error using Math.Floor()
Hi again. in the JScript i was converting to VB i got an error that i dont have a solution to. the code is: jd = Math.Floor(jd) + 0.5 . whe the program runs i get the following error message: System.Reflection.AmbiguousMatchException was unhandled by user code Message="Overload resolution failed because no Public 'Floor' can be called without a narrowing conversion: 'Public Shared Function Floor(d As Decimal) As Decimal': Argument matching parameter 'd' narrows from 'String' to 'Decimal'. 'Public Shared Function Floor(d As Double) As Double': Argument matching parameter 'd' narrows from 'String' to 'Double'." Source="Microsoft.VisualBasic" StackTrace: at Microsoft.VisualBasic.CompilerServices.Overlo ...Show All
Windows Forms Command Line in Windows Forms
Anyone, I have been asked to create a windows form (or multiple) that will allow the end user to run several command lines in one application. Basically the network guys need to be able to have 1 window opened and have 4 command prompts available to use at once. I know they could open 4 dos windows, but it's a long story. I would be happy just to know how to build 1. How can I make a windows form in VB.NET 2005 and have basically a dos prompt sitting there waiting for the user to type Thanks. You could start 4 hidden instances of cmd.exe and redirect their input and output to your form. Check out this MSDN article for the technique. There are problems however, it won't be able to capture ...Show All
Visual Basic call a sqlserver function from vb2005
Hello. Aquestion please. Could anyone say me how can I call a sqlserver function from sqlserver thanks.. NetPochi, It is not so clear that you want to call a SQL Server function from sqlserver. In Common Language Runtime, there are so many objects and methods or as you described functions, such as SqlConnection, the connectionString configuration for you to connect to the SQL Server databse, SqlCommand, the SQL statement for manipulating the data, DataReader and DataSet, two methods for accessing data in your database. Could you tell me your target of calling the functions for ...Show All
Visual Basic send binary string through tcp, sockets
I am working on a project with a literal "black box" piece of equipment (transponder) that listens for binary strings on port 4172. The transponder has a known IP address, 192.168.4.17. I have written the following code from various textbooks, but I need to do a "one-sided" connection (or initiate from the computer) since I have no ability to set up a listener on the transponder. Does anyone have some advice or a snippet for such a situation 'create class through which transponder can listen for requests on port 4172 Dim server As New TcpListener(bb_ipaddress, 4712) 'begin listening for connection requests server.Start() 'return socket object upon connection Dim connection As Socket = server.AcceptSocket() 'creat ...Show All
Visual Studio Cannot exclude files from SourceSafe
I have a web service that needs project references to other projects contained in the same solution. The web service creates a Bin folder and puts the .pdb and .dll files in there. The entire solution is under (integrated) source control. I cannot get Visual Studio to let me exclude this Bin folder or any of the files under it from source control. I do not want to store the compiled binaries in SourceSafe. How can I exclude these files or this Bin folder from SourceSafe Thanks. This issue was fixed (post-Beta 2) http://lab.msdn.microsoft.com/productfeedback/ViewFeedback.aspx FeedbackID=ddc06744-622d-474e-a9b0-d74a4617b589 Regards, ...Show All
Windows Forms SplitContainer Panel MinSize Defect?
I have a vertical split SplitContainer inside the top panel of a horizontal split SplitContainer and am trying to set the panel2 min size for it. I'm getting the following designer error: SplitterDistance must be between Panel1MinSize and Width - Panel2MinSize. This is somewhat confusing first of all, since the change was made in the designer. In the first instance therefore, I'm assuming this is a bug in the designer. The logic of the error message is that SplitterDistance should be between 0 and 560 minus 243 i.e. 317 which at 311 it is. Has anyone else come across this or have a workaround // // splitContainer2 // this .splitContainer2.Dock = System.Windows.Forms. DockStyle .Fill; this .splitC ...Show All
Windows Forms StringCollection.ToString?
I want to show the contents of a StringCollection in a RichTextBox,and i used StringCollection.ToString() which i would expect to work,but it doesn't.It shows the class name.I'm confused.How to convert a StringCollection to string or array One way would be to inherit the StringCollection class and then override the ToString function to return what you want returned. You could also add your own ToArray function if you needed that. You might also look at using Generics instead to see if they're a better fit for your application's needs. ...Show All
Visual Basic VB2005 Upgrade, or not?
Hello, I am not sure if this is the right place to ask this question, but I couldn't find anything more fitting. I am considering getting the Visual Studio 2005 IDE, but I have a reservation. I currently have VS2003, and have heard that the .NET 1.1 framework is falling by the wayside, so to speak. I have used the trial version of VS2005, and like it very much. However, I have heard that VS 9.0 will come out soon, and I don't want to have to upgrade again in a year or two. So, I guess my question is, is VS2005 going to be viable long enough to make it worth the purchase Is Microsoft making the higher level languages like Visual Basic "disposable", in other words, changing every few years Please, don't take me as being an ...Show All
SQL Server RetainDays property of Backup statement
According to SQL Server 2005 Books Online, the RetainDays property specifies the number of days that must elapse before a backup set can be overwritten. I do not quite understand the implication of this property. Say, if I set RetainDays = 1, is it mean the backup set from yesterday MAY BE overwritten If it is 'may be', how does SQL Server determines whether to overwrite or not I tried RetainDays = 1 to backup a dummy database, but my test.bak keeps growing, the old files do not seem to be overwritten. Besides, what is the implication of accepting the default RetainDays = 0 it just says that you can not overwrite the backup after the no of days you set has elapse. Sql server does not automatical ...Show All
Visual Studio Express Editions Listview item double click
Hi. I have a listview that gets it's data from a database. What i wanna do is i want the user when he doub click an item, a new form will be shown with detailed information about that clicked item. Anyone can help In the original form passing the detailed information to the the new form. Form2.DetailedInformation = Form1.Listview.ItemClickedOn Form2.Show ...Show All
SQL Server Package fails when ran as a scheduled job
I have a large number of SSIS packages, which I have developed over the last few months. Having written and tested them locally, running in VS05 etc - I have moved them to a server, stored in the MSDB database. I am having real troubles with packages that move tables from one database to another. I am working on a migration project, so I have several packages that move tables from the source database, into my staging database. One package which will not run at all, basically just moves 15 tables from database A on my server to database B. The package is essentially a few SQL tasks to create tables, then a data flow. The data flow contains the table movements as an OLE DB source to an OLE DB destination. No intermediate processing. In an at ...Show All
.NET Development Tribal Knowledge...
Question I have a GUI which allows for a user to edit sections (nodes) of an XML document and the user can add any new node or attribute at any level. When the user is editing the raw Xml, the textbox can only show the Xml in text. When it comes time to replace the edited node, I have to do the convoluted node replace as shown below when using the XmlDocument system. Three questions/issues Is the code I have written atypical in doing a node replacement, or am I missing something What is the XmlDocumentFragment class used for According to the documentation "Represents a lightweight object that is useful for tree node insertions", yet it fails...It seems like this is a perfect place to use it...but yet it does not appear that I can. Bet ...Show All
Visual Basic Inherited Controls
I frmB inherits a label and ComboBox Controls frmA is there any way that i can repostion those controls on frmB Hi You should be able to attach a reference to the controls in frmA from frmB using MyBase.Controls(ControlName) eg .. somewhere in frmB dim lbl as label = directcast(mybase.controls("Label1"), label) Give me a shout if that does not work Richard ...Show All
