|
I get it, I'm SOL... , thanx
|
|
|
|
|
No, you have to take a different approach to a Factory class. It's not good practice to make a a single factory for all different kinds of objects. What you've done in your code only complicates something as simple as:
Dim newForm As New MyForm2
You haven't said anything about why you want to do this, you just said this is the way you want to do it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
well, I have one main search form which searches different type of data, say, user info, and company info for example, and in my search form I use one drop down to display the results based on what you searched for, so if you searched for users, then the combo box will show you a list of matching users, if you searched for companies, then you'll get a list of companies in the combo box. I wanted to make it so that when you click on the combo box, the app will call 1 method to load the corresponding form which will display and let you view/edit data. When you do the search I pre-set a val in my app that tells me what type of data we're looking at.
|
|
|
|
|
If someone knows how to do this or knows of a link that shows how it would be appreciated.
I want to link two database tables to two list boxes. For example, I have two tables, one is named State and the other is named City. The column names in State are ‘StateID” and ‘StateName’. The column names in City are ‘CityID’, ‘CityName’, and ‘StateID’ (StateID being the reference between the two tables)
In ListBox1, I want to display the State Names and in ListBox2 I want to display the City Names. When I click on a State Name I want to see the City Names for only the cities in that state in ListBox2. For Example, if I clicked on California I would only see California cities (like San Francisco) in ListBox2.
I want to do this in code and not by using the ide tools in VB 2005. What I am hoping is to put this code into a procedure called ListBoxFill and call this procedure when the form loads. Then if I make any updates, insertions, or deletions to the databases, I can call that procedure again so the changes are reflected in the listboxes.
Does this sound remotely possible or is their a better way to do this.
Thanks.
|
|
|
|
|
Hello everyone, I am hoping someone can help me. I have been working on a small project in VB.Net 2003 and I was doing a good bit of Cut/Copy and pasting some text boxes, labels, etc. Anyway I suddenly have my items on another form with names like TextBox1 and Label3. And the original items are still showing on my Properties Drop down, but they are no where on my form that I can find. How can I get these orphaned items out of the project so I can rename my items correctly? Has anyone ever seen this before?
|
|
|
|
|
When you create an object on the form, it automatically puts code for that object in your source code. You must delete that code from the source code.
For example:
<br />
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged<br />
<br />
End Sub<br />
Then on the other form, double click the objects that aren't shown in the properties menu!
|
|
|
|
|
Thanks Coder,
I did a Find in the code and these items are not showing up in the Form area at all. They show under the #Region " Windows Form Designer generated code " and the .resx* area (XML lines). So I don't really have any Subs like you are refering too.
I have a Tab Page and I was moving them from one Tab Page to another with a Cut/Paste. And some how the names that were used are still out there but when I click on the items they are showing like TextBox1 and stuff.
|
|
|
|
|
i am sorry to say that i did a course on vb.net a little over a year ago, and now i cant remember anything about vb.net and programming in that language.
i have been trying to find tutorials and stuff, but its been difficult and i need a guide, or some help.
i have a new job that will require me to do some programming, quite a bit actually and i do not want to disappoint.
can anyone help me????????
please???????????
an enthusiastic individual...ready to learn.
|
|
|
|
|
Well, for tutorials, I would suggest The Code Project!. And for more technical tutorials, try MSDN.
And, if you need code snippets, try here!
Hope this helps!
|
|
|
|
|
get a book named Advanced guide for vb.net by micheal Ekdahl or download some vb.net basic e books from any site that should help you out.
kartik tallapragada
|
|
|
|
|
I'm just trying to add a listbox to a datagrid to allow the user to change selected fields. It should be easier than this, lol.
I'm getting an error "Object reference not set to an instance of an object", when I select an actual value from my listbox within my datagrid. My code is as follows:
Dim myDG As New DataGrid
...
Private Sub listControl_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles listControl.SelectedValueChanged
myDG(hitTestGrid.Row, hitTestGrid.Column) = listControl.ToString
End Sub
...
If someone could point me to a good tutorial on editing data in datagrids, I'd appreciate it.
Thanks,
Larry
LWhite
|
|
|
|
|
In the validated event of a combobox how can I get the original combobox's text value before a new item was selected?
|
|
|
|
|
You'd have to store it first, you can't access it otherwise, it's been changed.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
Hi There,
I am looking to get an advise on what have to be deployed on client PC to run my software. My Software has on Addin DLL (COM) which simply calls a .NET Assembly which shows MsgBOx , but as soon as this addin is clicked An Automation error message appears.
Can anyone guide me what i have to do, i have already installed .NET Framework 2.0 on client's PC registered my COM DLL with regsvr32 and one assembly file (.NET) with RegAsm.
Even this is working fine on my own PC.
Please help me in this regard.
Asim
|
|
|
|
|
I am developing an application for an inbound call center to enter orders. They need to be able to record each call automatically from within the web application. (I want this to be invisible to the user if possible). I want to launch sound recorder when a user clicks a button, have it start recording, and then stop recording when they click another button, save the file with the order ID in the filename, and copy it to a server on the network. Is this even possible? Any help would be greatly appreciated.
|
|
|
|
|
Sorry, but recording isn't possible in VB.
|
|
|
|
|
Hi,
I have an image control to be printed in a Crystal report in Visual Studio 2005, VB.Net. If there is data for the image to print, there is no problem, I get the image on the report. If there is no data, I get a border printed on the report.
How to avoid the print of this border?
Thanks in advance,
With warm regards,
Chandru.
|
|
|
|
|
Can anyonyone help me out how to draw an curve,polygon on a picture box on mouse movement...I had a problem of curve starting from (0,0) rather than the coordinate i passed..
Vijayalaya
|
|
|
|
|
Well, first of all, don't use a picture box, just draw the picture.
you need to post your code for us to see why it's drawing in the wrong place.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I wonder if anyone can help me. I heard that via VB you can run a program to display all the field names within a database. I have tried using schema but have got stuck due to lack of knowledge.
Question is, can this be done and am I going in the correct direction?
I have a sample of my code, which does not work.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
Dim rs1 As ADODB.Recordset
Dim Cn As New ADODB.Connection
cn = New ADODB.Connection
Cn.Open("Provider= Microsoft.Jet.OLEDB.4.0; Data Source = C:\nwind.mdb; Persist Security Info = False")
rs1 = Cn.OpenSchema(ADODB.SchemaEnum.adSchemaColumns)
Do While Not rs1.EOF
If (rs1!COLUMN_NAME) <> "" Then
'Debug.Print(rs1!COLUMN_NAME) <=== HOW I DISPLAY THIS IN VB.Net ******
rs1.MoveNext()
Else
''display error
Exit Do
End If
Loop
End Sub
|
|
|
|
|
i m a beginner programmer and
i want to get the information of the architecture and family and even the name of the manufacturer using vb.net
i know the api also
it is win32_processor and the property is "family","architecture " and "manufacturer" but don know to access
please guide me
|
|
|
|
|
The Family property of Win32_Process is not 100% trustable. It can, at times, return a number that means a processor family very different from what the Name property is telling you.
The Architecture property will always return 0, which means "x86".
Private Sub GetJobList()
Dim query As New ObjectQuery("SELECT * FROM Win32_Processor")
Dim searcher As New ManagementObjectSearcher(query)
Dim objectCollection As ManagementObjectCollection = searcher.Get()
For Each obj As ManagementObject In objectCollection
Debug.WriteLine(CStr(obj("Manufacturer"), CStr(obj("Name"))
Next
objectCollection.Dispose()
searcher.Dispose()
End Sub
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hi,
i made 3 forms in vb.net 2005 , form3 set as startup form in which a combobox that contain 2 items ,1st for show form1 and 2nd for show form2.
i want form3 should ask that which form will be the startup form(form1 or form2)
can someone know how to do this?;)
|
|
|
|
|
You can't change the startup object once your app is compiled. Perhaps you need to take a different approach to explaining what you want this stuff to do?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|