DigitalPenguin's Q&A profile
Visual Basic Getting textbox text from another form (vb 2005)
Does anyone know of a simple code to put text from a textbox in one form into a textbox on another form. I would like to do this when a button is pushed. It was easy in vb6 but I am using 2005 now. All I had to do was write "textbox1.text = form1.textbox1.text It depends on how did you create instance of the form In VB 6.0 you had two options. 1. Using global instance variables, like you did in your code. It means that Form1 was type name and global variable too. So you always access the same form using Form1 variable and the same textbox using Form1.TextBox1. 2. Using your own instance variable, like in folowing code Dim TheForm As New Form1 TheForm.TextBox1.Text = &quo ...Show All
Visual C# Visual Studio is acting weird
I am having some trouble with the Visual Studio IDE. I have a solution sol.sln and I have some projects under it. All the project files and solution file are under source control. I have added the projects to source control using Visual Studio itself, so I couldn't have gone wrong there. When I open the solution and build it, it tries to save every project that is in the solution. Since the .csproj files are under source control, it says 'Access denied' when it tries to save. I have been using this solution from more than 2 months now and this weird behavior has started recently. Another behavior is that when I open the solution and try to close it (without any edits/changes) it asks me if I want to save the following files and the list o ...Show All
Visual Basic Hello need help
hey , i try to set a name from data base (access) my tables are : Button , Code , Note , Web , Lo i want to get from table 1 (button) first value is "Button1" so i want to set to button1.text the value "Button1" from the DB my DS is Dsprogram1 and oleDbdataadapter1 .... well so i try: Private Sub Form1_Load( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase .Load DsProgram1.Clear() OleDbDataAdapter1.Fill(DsProgram1) Dim x As String x = Me .BindingContext(DsProgram1, "Button").Position = 1 Button1.Text = x End Sub error : An unhandled exception of type 'System.ArgumentException' occurred in system.windows.forms.dll Additional information: C ...Show All
SQL Server BULK INSERT fails with Msg 511 - Cannot create a row of size x which is greater than the allowable maximum of 8060.
I am running the following BULK INSERT statement: BULK INSERT WEBLogs.dbo.WebLogEvent FROM 'H:\mydirectory\myfile.txt' WITH (BATCHSIZE = 100000, DATAFILETYPE = 'char', FIELDTERMINATOR = '\t', MAXERRORS = 1000000, TABLOCK) The insert failes with this error: Server: Msg 511, Level 16, State 1, Line 1 Cannot create a row of size 8666 which is greater than the allowable maximum of 8060. The statement has been terminated. There is nothing I can do about the bad data, but I would like for INSERT to simply ignore the bad record and move on. Is there a setting that will enable such behaviour Thank you! No. There is no setting to enable such behavior. This is the physical row size limitation in a ...Show All
Visual Studio 2008 (Pre-release) TCP Error Code 10060 on client when service is self-hosted on a remote PC
I'm getting an error when a client application calls a self-hosted console service running on a remote PC and using BasicHttpBinding. Thinking the problem was in my code, I backtracked to using a simple SDK example, the Basic\Service\Hosting\SelfHost example, but use basicHttpBinding instead of wsHttpBinding. The sample works fine when both client and service are on the same PC, but fails with the error below otherwise: System.ServiceModel.EndpointNotFoundException: Could not connect to http://10.0.0.44:8000/servicemodelsamples/service . TCP error code 10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to ...Show All
Windows Forms how to generate dynamic checkbox?
i need to list items from a table into checkbox. and the number of item is unknown. i need to bind ID and DESCRIPTION into checkbox. the ID is not to be seen by user, but i need it to perform some tasks. please help me on this. any help woule be appreciated. thanks. Use a ListBox to contain the CheckBoxes, set the DataRow of the dataTable to be the items of the ListBox, and OwnerDraw the ListBox's items to let them only display the descrptions. See my sample below: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace Sample3 { public parti ...Show All
SQL Server Change URL
Can any body help me i need to chanage my URL when select my TPM and TPK i have two option in my Filter 1.TPM 2.TPK i writen some custome code here but its not working i know some thing wrong in that its my Code here:- Public Function access( ByVal parameter As Object ) As String IF parameter Is "TPM" Then Response.Write("<script language=""Javascript"">window.open (' //localhost/Reportserver/Pages/ReportViewer.aspx %2fTPM%2fAFM1&rs:Command=Render&rc:Toolbar=true&RUNDATE =" & Parameters!TPM.Value & ' ,'mywindow','location=1,status=1,resizable=yes,scrollbars=1,width=400,height=400');</script>") ...Show All
Windows Live Developer Forums Dynamic TileSource not showing up in 3D
Hi all, I'm using sharpmap to render some shapefiles as dynamic tile sources, and I've run into an issue with 3D mode. The same code seems to work flawlessly in 2D mode, so I'm kind of stumped. Here's the nefarious javascript: function AddHazardLayer(layername, zorder) { try { var bounds = [new VELatLongRectangle(new VELatLong(42,-127),new VELatLong(29,-108))]; var tileSourceSpec = new VETileSourceSpecification(); tileSourceSpec.ID = layername; tileSourceSpec.TileSource = GetTilePath3D() + "&LAYER=" + layername + "&QUADKEY=%4"; alert(tileSourceSpec.TileSource); tileSourceSpec.NumServers = 1; tileSourceSpec.MinZoom = 1; ...Show All
Visual Studio Team System Building and publishing Web Sites with Team Foundation Build Service
Hello, I have a question regarding the task of building and publiching web sites using TFS. I have a solution with web project, that i am building under TF Build Service. Build passes successfully, but no binaries are created and not copied to build drop directory. I have read in MSDN that build of web project using MSBuild (it is used by TF Build Service) is not actually a build of binaries, but just a check that it is successfully compiled. In place of this, as a result of build in TFS, i need to make a set of pages and binaries, which is ready to deploy. Please, give me some decision of this task, if possible. What parts do you want pre-compiled If it's just the code files, then use a WAP: http://msdn ...Show All
Visual Basic Cross Form Control
Hi, I have a graph on my main forum ‘frmmain’ the commands of which are controlled by Dim myPane2 As GraphPane = zg2.GraphPane I need to creat a new forum called ‘frmoptions’ so that the user can change things like the graph title etc, how do I gain access to myplane and all it’s controls though the new ‘frmoptions’ such that the following code in my ‘frmoptions’ would work and change my graph on my main forum ‘frmmain’ Dim myPane2 As GraphPane = zg2.GraphPane myPane2.Title.Text = titletxtb.Text.ToString ‘ This text box is on ‘frmoptions’ myPane2.XAxis.Title.Text = xaxistxtb.Text.ToString myPane2.YAxis.Title.Text = yaxistxtb.Text.ToString if radiotbn = true then ...Show All
Visual Studio Express Editions Problem with RSS reader project
Hi, I downloaded the beginners videos from http://msdn.microsoft.com/vstudio/express/visualcsharp/learning/#beginners and all was going well, I'm on lesson 15 and have read the additional writing for this project and have done everything shown in the video and I've looked extensively at the snapshot included in the download, my code is identicle and up until now always compiled and executed, after adding the code from this lesson however my application crashes. The problem seems to be here: // Begin the WebRequest to the desired RSS Feed System.Net.WebRequest myRequest = System.Net.WebRequest.Create(rssURL); System.Net.WebResponse myResponse = myRequest.GetResponse(); // Convert the RSS Feed into an XML document ...Show All
SQL Server Oracle Provider Issue
Hi all, On the dev server, I'm using SSAS 2005 (32-bit) + Oracle provider for OLE DB to access my Oracle Database and it works perfectly. On the production server, SSAS 2005 is running on a 64-bit platform. The Oracle client 10.2.0.1.0 (64 bit) has been installed containing the Oracle provider for OLE DB but unfortunately the Oracle provider for OLE DB does not appear in the list in BIDS when trying to create a date source. Could someone help Regards, Jean-Luc I remeber a similar problem. It just could be just a problem of showing provider in tools. Try authoring your connection on 32 machine ...Show All
Visual Studio Team System Iterations and builds
I'm new to VSTS and trying to set up a few projects across the company using the Agile template. The one thing I'm not sure I understand is the mechanics behind work items, builds, and iterations, and how they relate to releases. My end goal is to be able to track what bugs are in which releases, and what bugs are fixed in what releases. My thinking was to set up an iteration with a release build number - I guess what I'm having trouble resolving is that the template wants you to apply a 'found in build' number to a bug, and the builds don't really relate to releases or iterations in any way. I'm not particularly interested in mapping bugs to nightly or dev builds - I just need to be able to tell for a client on version x, they have this l ...Show All
Visual Basic Implicit ReDim - Is this a bug ?
No cracks about the 'bug' is sitting at the keyboard Try this: <Code> Sub Test Dim a(0 To 9, 0 To 5) As String a = FuncX() End Sub Function FuncX() as String(,) Dim Ret(0 To 4, 0 To 5) as String < Code to fill Ret > FunctX = Ret End Function <\Code> When you check 'a' in Test, it has been redefined as Ret: i.e. (0 to 4, 0 to 5) No compile warning ... although I can see where it might be hard to checks this. No Runtime error - except when I try to use 'a' with the full dimensions. Is this a bug or is it intentional and I'm missing something (other than my mind for such poor code consistency). Roger You analogy does not hold. If I assign a va ...Show All
Visual Basic IO.FileStream Issues
I have done some searching and found a class module to convert rtf to html at http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=143137&SiteID=1 and I am implimenting it but I have an issue, i got this code Private Sub Button28_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button28.Click Dim RtfText As String = RichTextBox1.Text Dim objStrbdr As New System.Text.StringBuilder() Dim Rtf2HtmlConvert As String = Me .Rtf2HtmlConvert(RtfText) Dim tmpfile as System.Environment.SpecialFolder = Environment.SpecialFolder.CommonApplicationData + "/App/Temp/File.htm" objStrbdr.Append(Rtf2HtmlConvert) If IO.File.Exists(tmpfile) Then IO.File.D ...Show All
