Answer Questions
Mark Benningfield Referencing Text on another form
How can I make a reference to a textbox on one form to another so that it's text will show up in a textbox on my other form. Example: on Form1 I have textbox1 with information typed in, and on form two, i have textbox2, where i need that information to appear. I just need the reference from that form so I can use it on my other form. Thanks Hi, If you're using Visual Basic 2005 you can access TextBox1 using My .Forms.Form1.TextBox1.Text Best regards, Now that I've use Visual Basic enough, I realized that just doing this: textbox1.text = "Hello" + My.Forms.Form1.Textbox2.Text & " World!" does exactly what i wanted. Thanks ...Show All
Suresh .M.V best practice when writing to sql server
I will be writing to a sql database at different points in the program. Is the following going to be ok. during the formload open the connection to the sql server create a sub that writes to the sql server -or- do I have to open the connection, write to the sql server, close the connection every time. Thanks, Nelson I open and close the connection on each read/write. Your main overhead is in the initial connection so when you first connect (I asume to sql2005) it may take a few seconds but after that its lightning fast. Also you may want to think about wrapping all the database functionality into a wrapper to simplify your code elsewhere. You can also then make this wrapper threadsafe therefore allowing ...Show All
Ultrawhack Dynamic Memory Allocation in Visual Basic
I am new to Visual Basic, but have had some training in C++. I was working on a program in Visual Basic 2005 where I need to allocate memory to an array dynamically. The array is to be of type ButtonRow, (which is a class I've created for this program). I want the size of this array to equal the total number of rows in a given table. I can figure out how many rows are in the given table, and store that value in a variable (MaxRows). I need to dynamically allocate the ButtonRow array with the size of MaxRows. How do I do that in visual basic Is there a Visual Basic equivalent of the calloc and malloc commands Also, just to give you guys a complete picture, the ButtonRow array is to be a universal array available to all subs within the gi ...Show All
mcrisf Serious Problem!!! Please HELP!!! Project does not allow changes in code or design
Hi, I was working at my project (Visual Basic, Visual Studio 2005) and while I was making changes a message box came up asking something about reloading my project. I clicked it.. and since then (i think its from that time) my project doesn't seem to build the changes that I make. For example, I added a form and deleted another, and although the project compiles and runs, the deleted form is still there and the new one doesn't exist. I even added a simple line of code in the form load event of my starting form, to show a messagebox but nothing. I am stuck. Please help. I tried to create a new project and add the forms from the old one but nothing. The forms are empty. Unfortunately it's not that. I have already tried ...Show All
Chetan Garude VB + Win App + database without Sql Server - please help me ...
Hello! I've got a problem. I want to make some application which will use database - read and save some data. I want also that when I send this application to run at my friend or my second computer - which doesn't has any SQL Server (Express or simply MS SQL Server). I was trying to resolve this problem with Access Database File, but I've got an error: Retrieving the COM class factory for component with CLSID {C8B522D0-5CF3-11CE-ADE5-00AA0044773D} failed due to the following error: 80040154. This error is showing when I want add access file to my project. What should I do to work my application with some kind of database on computers which don't have any database servers. I hope you know wha ...Show All
MikeLR Running EXE without Framework
So i made a program for this website. But i don't want the users to have to go threw the hassle of having to download .NET Framework just to run it. (Some use this program on Work Computers where they have restrictions on what can be installed) I am using Visual Basic 2005 Express and would like to know how to build to program to include all files needed to run so the other DO NOT have to install .NET Framework. Hi, The .NET Framework is essentially required to be installed on the machine where your .NET Application would be physically executing. However, you can chain the Framework installation to your application setup so that users do not have to install the framework individually on the machines. One setup and it's all done. ...Show All
canadian_coder why my data grid control doesn't show any tooltip text that I set.
Please help to fix on why my data grid does not show my tooltip text that I made using VB.NET 2005. refer to the following forum post to show tooltips for DGV http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1092075&SiteID=1 JonathanClemente, I soppuse you are using the ToolTip Class. Actually there are several members of this class refers to its shown such as Active, ShowAlways manually and AutoPopDelay, InitialDelay by tools. What is your specific problem when showing the tooltip Here I have a sample code on the tooltip, just take a reference and hope you can fix your problem: ' This example assumes that the Form_Load event handling method ' is connected to the L ...Show All
Acts7 How to import data from a Excell wokbook to a database
I need to create a new database with excell data, and to compare them and create a new database with the results, and write them on the screen, how I can do it simply.Use what kind of database ...Show All
nate-d-o-double-g How event method is written for dynamically created controls
In my application controls are created dynamically. I want to know how to write code for an event, for eg. KeyPress event Also how to a call parent form event, for eg. KeyPress event instead of its child control(dynamically created control) KeyPress event (VB 2005) You have two ways to do this. 1. Declare the control WithEvents and then you can use a Handles clause on your event handler. However you can't do this if you are declaring the control in a sub routine. Dim WithEvents T As TextBox Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load T = New TextBox Me.Controls.Add(T) T.SetBounds(50, 50, 200, 20) End Sub Private Sub T_KeyPress(ByVal ...Show All
great1 numericupdown problem
How to make a numericupdown control to have the range between 10-2000 in step of 10...and 2000-9900 in step of 100 the code bellow worck's, but with one bug....for eg, if i have 2000 value....and i go down...he go on 1900 value...and i want 1990(if i go up again worck's fine) is posible to make that i search an event ho tell'me in witch way i'm click(up or down)...but i don't find...so, please help'me. tank's (p.s.:the value 1900 is correct...but the value 2010 is not correct....) Private Sub NumericUpDown1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NumericUpDown1.ValueChanged If NumericUpDown1.Value >= 2000 Then NumericUpDown1.Increment = 100 End If If NumericUpDown1.Value < 20 ...Show All
Capt. KDS My Image2Hex Convertor
Hello, I have a program called Image2Hex. What this program does it that it opens image in the picturebox and then Reads the Color from the picture. It Reads at the MouseMove Event and displays the Hex in the StatusBar. Now i am having trouble finding the methods to use here....coz PictureBox does not Return the Color at a Point (System.Drawing.Point). So i know the positions at where the mouse is moving and i can initialize the Point object with it. But how can i get the Color from a specific point in the PictureBox Any help wud be aweasome. Thanks for the method ...now i am getting the values. But not in the ususal Hex Format but like -105732 How can i get the hex codes for normal colors used in HTM ...Show All
IGiberson animate system tray
I can animate the system tray while my program still do events (for example: while program query database and fill all listboxes, the system tray will have a animated icon) Yes, you can use a timer to control this. You will want to make sure though (possibly through DoEvents() that you long running background work is giving a chance (from time to time) to the timer to do its work and the UI to be drawn. and can I have a timer to do that and at same time do the other operations There is no direct way to do this in the framework instead it would be up to you to replace the image being displayed over and over again to achieve the desired effect. ...Show All
EMSDeveloper Recent Projects List on Start Page is not being Populated
The Projects List on my Start Page is not being populated with the Projects I open. It's empty. Does anyone know what could be the problem I can see the entries being recorded in the Registry key: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\ProjectMRUList But VS isn't reading them in for some reason. I'm running Visual Studio 2005 Professional. Thanks. *bump* Does anyone have any idea why my Projects List on Start Page is not being populated. I'm logged in as an Administrative User. Thanks. No, unfortunately devenv /ResetSettings did not fix the problem. Hi Gordon, I'd like to fi ...Show All
Jun_1111 Carrying a value from one form to the next to display information from a table
I have a form that has a value from a table on it and I am trying to carry that value over to a new form to display more information. I know that I probably need to do something with classes but I am so new at this that I don't totally understand classes. If there is anyone out there that can help me out or guide me in the right direction I would appreciate it. I have read a lot on classes but haven't seen or read anything that I think would fit my situation. Doing this is going to be the heart of my software so I really need to figure it out. Thanks in advance for any help! how did you get it to work If you have textbox.text in Form1 and you want to display it in Form2, you should reference Form1 textbox in Form2.... E ...Show All
WinFormsUser13232 populating an Access database using visual basic 2005
I am trying to create a new employee application that gets input from a user in text boxes and then take that information and populate a database in Access that will later be pulled to the Track IT! database on SQLserver2005. How do i do it Thank you. a) absolutely I believe b) the lines for the code sure: creates a new OleDbCommand object, a command object used to "instruct" on what to do to the database. This command in particular as you may know, inserts data into a database, giving the fields and the values for those fields creates parameters for the , and assigns them a value as well as the correct OleDbType (data type field) otherwise if you don't, chances are at some point t ...Show All
