Lavaor's Q&A profile
.NET Development How to add Text to generated textbox
Hi, With a for loop I created 81 textboxes, all named t10[i ], they are created in Page_Load. for ( int i = 0; i < 81; i++) { t10[i ] = new TextBox(); t10[i ].Width = w; t10[i ].Height = 30; Panel2.Controls.Add(t10[i ]); and so on } Now i want to add Text to them on a later stage, for example while pressing on a button. like this: for ( int i = 0; i < 81; i++) { t10[i ].Text=array[i ].ToString(); } ofcourse nothing happens, when building, VS says t10 doesnt exist. How can I make a correct reference perhaps with the FindControl But than, wich objargs should I use thx ...Show All
Software Development for Windows Vista Persisting layout for State workflow in designer control
Hello, is there a way to persist the layout of a state workflow in the workflow designer control sample I can persist the Xoml to file and re-load it, but when I do all the states are drawn on top of one another in the top left corner of the view. Hi Don, The layout information is persisted in SUO file in case of VS projects and since the re-hosted designer does not have one, you are seeing the problem. I have logged a suggestion for this functionality in Beta2. Thanks, Vihang ...Show All
Visual Studio Express Editions SQL server with VB express
Hi all I have a VB project going, which I am using with an integrated SQL database. I have set up the database, with a table, and a form to enter the data, but I can't work out how to get what I type in the text boxes to be inputted intot he database. I have a button on my form that VB created for me, but I dont know the code to get it working. Any help would be greatly appreciated. Thanks in advance, Check that the property "Copy to Output directory" of the dataset .xsd file in the solution explorer is set to "do not copy". For some reason the default is to work on a copy of the database so it looks like yo ...Show All
Visual C# Can you anybody give me an idea about to Create own event handler for my User/Custom control?
Hi, I want to create Custom control in c# and create own event hander for it. That Events should trigger automatically when it uses in application. Hi, The following articles should help you get started with Custom Events: 1.] http://www.csharphelp.com/archives2/archive470.html 2.] http://www.ondotnet.com/pub/a/dotnet/2002/04/15/events.html Regards, Vikram ...Show All
Windows Forms Detect SQL Servers
How do I etect all INstances of SQL Servers on my network I want to poulate a combo box with the SQL Server instance Name. Also How o I get my computer name To get your Computer Name, use SystemInformation.ComputerName. To get all instances of SQLServer on a Network, use <a href="http://www.sqlsecurity.com/DesktopDefault.aspx tabindex=5&tabid=7">SQLPing</a> ...Show All
Visual Studio VS 2005 Plug-In can not be removed
I built a quick and dirty VS2005 plug-in. Everything was working fine through several builds and runs (with debug), and then suddenly, it couldn't be built anymore because the DLL was already in use. What I discovered was that the plug-in was now permanently embedded in VS2005. When I go into the add-in manager, I uncheck all of the boxes associated with the plug-in, but it remains, even on restart. There is no Uninstall (there used to be, right ) in the project, and I can't find the plug-in in Add/Remove Programs. So, I can neither remove nor compile the plug-in. Any ideas -Vic I was able to resolve my issue by just removing the ...Show All
SQL Server data modelling question
Hi all, I need to develop some tables in SQL server to store formulas. These formulas can be of varying complexity. Some might take the form: 1 + 2 (ordinal1, ordinal2, operator '+') Others might take a more involved form: (calculation_from_a_field_in_another_table, random_ordinal, +) / (34 *2) And so on and so forth. The key point is that formulas can contain 1...n expressions and also a given term may be an ordinal that the user inputs, or it could be a reference to a pre-existing calculated value. I thought of: term_id, term_1 (NULL), term_2 (NULL) term_id_1 (NULL), term_id_2 (NULL), operator ...Show All
Visual Studio Express Editions question about vb express and hanging the pc
I have installed the entire package and even started a first project, the problem comes when I move a web browser control to the form, the CPU goes to 100%, and pretty much the system is EXTREMELY slow to respond, makes sense if it's maxed out, but why is this happening my cpu is a 1.5Ghz should be able to handle this software just fine , plenty of memory almost a Gig, so what is the deal anybody else run into this no great comfort for you regarding why this is happening - just a note to say you're not alone. similar/higher spec platform, uneventful installation, but identical hang with the browser contr ...Show All
Visual C++ VC++ Documentation refers to cli/c++ syntax as the "new c++ syntax"
"Visual C++ How to: Create a Windows Forms Application In .NET development, a Windows GUI .... applications in C++ use the .NET Framework classes and other .NET features with the new C++ syntax. For more information, see New C++ Language Features ." Don't want to be overly critical because I am impressed with the VC++8 compiler, ide and work done to increase compliance with C++ standards, but statements containing references to the 'new C++ syntax' is what makes the C++ community reluctant to see CLI/C++ become a standard, because it could muddy the water between C++ and CLI/C++. I remember when some people we ...Show All
Windows Forms TreeView XP style
I have managed to get XP Styles in my app (its taken a long time to figure it out) but now the treeview doesn't seem to look right. It starts off with a Win98 style scroll bar and once I resize it the scroll bar turns to XP style with the buttons (Left and Right) staying Win98 then when i resize again it all turns to  ...Show All
Visual C++ MessageBox difficulty
(I am using VS 2003 .NET with a Windows Form Application project. .NET Framework 1.1) I am trying to use the simple MessageBox::Show(System::String) When I start typing just to see if it is there, I'll type System::Windows::Forms::MessageBox::Show and it all comes up right, but, when I go to compile it tells me: error C2653: 'MessageBoxA' : is not a class or namespace name when I am using it like this: MessageBox::Show((System::String*)"Hello World."); Can somebody let me know what I'm doing wrong and give me the correct way to use it Thanks ~Chris Edit: Sorry, I just read the "Scope of this forum" topic and realized that this isn't the pla ...Show All
Visual Studio 2008 (Pre-release) Problem with transitivity for Composite design pattern
Hello! I'm trying to do a straight forward implementation of the Composite design patten. I have code like this: Composite compositeRoot = Composite .Create( "Composite 1" , "Composite Property 1" , Primitive .Create( "Primitive Q" , "Primitive Property Q" ), Composite .Create( "Composite 11" , "Composite Property 11" , Primitive .Create( "Primitive 111" , "Primitive Property 111" ), Primitive .Create( "Primitive 112" , "Primitive Property 112" ) ), Composite .Create( "Composite 12" , ...Show All
Visual C# Inconsistency between Monitor And Lock
"c#: The complete referece" book writes "microsoft says that lock is precisely equivalent to Monitor.Enter()/Exit()", but in the following case, they seem to differ in their behaviour. Please verify whether the following observation is correct or not: ________________ public void fun() { Monitor.Enter(x); Console.WriteLine("Locked X"); Thread.Sleep(100); x=y; Monitor.Exit(x); Console.WriteLine("Released X"); Monitor.Enter(y); Console.WriteLine("Locked Y"); Thread.Sleep(500); Monitor.Exit(y); Console.WriteLine("Released X"); } __________________ In the above function let x,y be some objects. I started 2 threads on ...Show All
Visual Studio Express Editions how to get windows to open text with my app
Hi,how do i get windows to open txt files with my program i made with vb2005 I think you're asking, "When I double-click on a .txt file in Windows, how do I get Windows to open the .txt file with my VB application " If that's the case, the easiest thing to do is to open Windows Explorer, find a text file (extension is .txt), right click on the file, select "Open with..." then select choose program. You can then browse to your .exe and select "Always use the selected program to open this kind of file." If what you're asking is "how do I open a .txt file with VB 2005" ...Show All
Windows Forms Object Reference Error.
Here is some code of mine: Public PassedLine As String Dim myValue As String = PassedLine If myValue.IndexOf("Jason") > 0 Or myValue.IndexOf("Gaylord") > 0 Then UpdateType = 1 Return ...Show All
