Regmo's Q&A profile
Windows Forms disappering dynamic controls
I have created dynamic textbox according to user input from following code:--- Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim cnt As Integer Dim i As Integer cnt = Val(TextBox1.Text) For i = 1 To cnt Dim txtbox As New TextBox Dim brcontrol As New HtmlGenericControl("br") PlaceHolder1.Controls.Add(brcontrol) PlaceHolder1.Controls.Add(txtbox) txtbox.Text = "value textbox" & i Next end sub i want to access value from dynamically created textbox after providing input from user i have used code:--- Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click di ...Show All
SQL Server HOW TO: Print a report directly to a printer
The code below is a class file done in vb.net. The original idea came from reading this forum and some blogs. To use the code below, you can create a windows application or service. then create a class file and drop this code in it. Remeber to reference the 2005 report execution service and also in the program settings include the path to your server. IE: ReportExecutionService = http://localhost/ReportServer/ReportExecution2005.asmx or whatever your server URL is at. Setup the public properties for printername (sharenames work fine), Number of copies and Report name. That is all there is to it. This code is REALLY expandable to add more options. Please remember to let me kow if you like this. Imports System ...Show All
Visual C# NO error, but I got only part of what I want to get.
No error was complained! The following program is to write a whole year's month,day,weekday in a MSSQL table. But somehow, for many times I have tried, but each time I got only part of what I intend to get: the whole year with 12 monthes, instead, I only got 3 or 4 months' content in the table. Can anybody tell me why calendar.dll using System; using System.Configuration; using System.Data; using System.Data.SqlClient; using database; namespace calendar { public class calendar { private int _nian; //year private int _yue; //month   ...Show All
Software Development for Windows Vista InkCanvas exception
Help! I am using .NET 3.0 Beta 2 and VS2005 on Windows XP Tablet PC 2005 edition. Whenever I try and use the <InkCanvas> element I get an unhandled NotSupportedException as soon as the mouse/pen is moved into the ink canvas area. Full details of xaml used and exception below. The exception occurs in the app.Run method. < Grid >< InkCanvas /></ Grid > System.NotSupportedException was unhandled Message="DLL version not correct." Source="PresentationCore" StackTrace: at MS.Internal.HRESULT.Check(Int32 hr) at System.Windows.Media.FactoryMaker.get_ImagingFactoryPtr() at System.Windows.Media.Imaging.FormatConvertedBitmap.FinalizeCreation() at System.Windows.Media.Imaging.Fo ...Show All
Visual C++ MFC: How to wait for end of CWinThread based threads?
I have my thread function which was created using CWinThread T = AfxBeginThread(myFunc,NULL); My question is how do I wait for the end of this thread Like in win32 there was a WaitForSingleObject function. And another thing, do I need to delete T after I finish using the thread Thanks :) spree wrote: I have my thread function which was created using CWinThread T = AfxBeginThread(myFunc,NULL); My question is how do I wait for the end of this thread Like in win32 there was a WaitForSingleObject function. If needed, you can also use in MFC "plain" WinAPI function calls. In our example: CWinThread* T = AfxBeginThread(myFunc,NULL); // ... ::WaitForSi ...Show All
Visual Studio $(MSBuildProjectDirectory)
hi, i have a questions regards $( MSBuildProjectDirectory ) property, for example when I create <DevSourceDir> tag in the msbuild file I want to assign it to my current project Directory, which is very simple just use MSBuildProjectDirectory but my problem is, I don’t want to use the full path that is coming from MSBuildProjectDirectory I want to actually delete the last part of the path, for example MSBuildProjectDirectory = c:\program file\software1\source\BuildScript But all I need from MSBuildProjectDirectory is = c:\program file\software1\source So I don’t want the last part (\Build Script), so in my case I want to do this <DevSourceDir> $(MSBuildProjectDirectory) excluding this part (\Build ...Show All
Windows Forms Setup Project problems
Hi guys, I just finished an application created in VB.NET and im trying to create a setup and deployment project in order to allow to my users to install the program on their machine. I created a setup and deployment project, i add the files i desire to include them but i cannot built the project. Any ideas whats going on ...Show All
SQL Server Analysis services connection from Data Source
Hello everybody. I want to perform a Analysis Services Processing Task using a connection manager created from a Analysis Services data source. I create the data source using the Oledb provider for Analysis Services 9.0, and it works fine. Then I create a connection manager using the "New connection from data source" option, and it seems to create it ok. The problem is that I can't then asign this connection to the Analysis Services processing task. I get the error: "Connection Manager MyConectionManagerFromDataSource is not a Analysis Services Connection Manager" However, if I create directly a connection manager using "New Analysis Services Connection" it works fine. Is it at all possible to c ...Show All
Visual C++ for-each statement help
I am building a Windows Forms application and it uses a configuration file to start; I would like a way to use the for-each statement to refer to all textboxes in my application for example; like: for each (TextBox ^TB in Form1) TB->Text = "etc"; This doesn't work at all and it points to Form1 as it is not a valid expression for this type of statement. Is there any way I can make it work You need to always iterate over the controls collection using Control ( the base type ). The base type does have the name property, so you can check the name of Ctrl against the name from your config file, THEN you can cast it to the type that you know it to be ( or check the type if you want to be ...Show All
Visual Studio Team System Cannot databind a csv file
I am trying to databind a csv file to a webtest. I am entering the connection properties as "Microsfot Jet 4.0 OLE DB Provider" and advanced extended properties as "Text" and entering the path of the folder in which the .csv file is located. I am not including the name of the .csv file in the path. No tables show up after the data binding is done, a blank "Choose tables from datasource" box appears. This happens no matter how many times i try. The same functionality works on a different system. Any ideas are appreciated....Thanks! You can databind to both csv and excel files. Check out this blog post for more info: http://blogs.msdn.com/slumley/archive/2006/02/08/527666.asp ...Show All
.NET Development out of memory exception in .NET Remoting v2.0 - TCP Channel Binary formatter
Has anyone seen this error I am getting it when the server is supposed to return a dataset with response data. The database may be large but not more than a couple of megabytes. can anyone advise what could be the issue System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. Server stack trace: at System.String.GetStringForStringBuilder(String value, Int32 startIndex, Int32 length, Int32 capacity) at System.Text.StringBuilder..ctor(String value, Int32 startIndex, Int32 length, Int32 capacity) at System.Text.StringBuilder..ctor(String value, Int32 capacity) at System.Data.DataSet.SerializeDataSet(SerializationInfo info, StreamingContext context, SerializationFormat remotingFormat) at ...Show All
SQL Server SQL Server 2005 schema
A database was created in SQL 2000. We are going to move to sql 2005. So I attached a database to SQL 2005 and now I have a problem with name resolution. When I worked with SQL 2000 I did not put my schema's name before table name (select * from table1). The schema's name is my user name (IQA) and by default the schema name is a name of user who loged in. (in 2000) Here is a problem with SQL 2005. The schema's name is still IQA. But I need to do select * from IQA.table1. I created IQA login and IQA user is an onwer my IQA schema but I still can not do a select without schema name. I need to resolve this because VB.Net code has all select statement without schema's name. Need help!!! i found that ...Show All
Visual FoxPro Join
Hi gurus I hope this is an easy one, what is the max join statement that you can use in one giving time Thanks guys ...Show All
Visual Studio Team System Default Found In Build to latest
Is it possible to default the Found In Build to the latest when you create the bug Thanks, Deb It is possible to default it to a specific build; the build number will be hardcoded in the work item type definition. But if you want a different number every time - this is not supported. Thanks, Alex ...Show All
Game Technologies: DirectX, XNA, XACT, etc. What are the recommended books and sites for learning C# so I can then make a game using XNA?
XNA has made game development easy, but to use the XNA framework you still have to be able to develop with C#. You don't have to be an expert, but you do need to understand the basics of Object Oriented development and the general syntax for the C# language. That's great for those of us who are already developers, but there are a lot of people interested in XNA, that are not already developers (and some of them are developers who just haven't given C# a try yet). Every time a new game developer hopeful comes into the forums frustrated because they don't understand the code or where to start, we give them a generic answer about taking some development classes, find some books on C#, check out some C# tutorial sites or point them towards To ...Show All
