|
your app.config version , is compatible with entity frameworks model that i use ? because is different from my actual app.config file . Or is normal to change like in your version ?
|
|
|
|
|
No from App.config file only use the contents of ConnectioString tag...
|
|
|
|
|
In a nutshell you are best storing it in the app.config file. For further reading I would look at this CP article Storing Connection Strings[^]
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
how can i download and use msdn for vb6.0?
|
|
|
|
|
You can't.
Simple as that.
VB6 is unsupported, and Microsoft have abandoned it.
It is an orphan language.
You need to download VB.Net, the express edition is free.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
Hi Dalek,
I don't mean to be nit picky, but "VB6 is unsupported" is not entirely true. Please go to the following article posted by Microsoft that they are willing to support it to a certain extent. The article goes in depth as to what that extent is.
http://msdn.microsoft.com/en-us/vbasic/ms788708.aspx[^]
Cheers.
|
|
|
|
|
STOP THAT!!
If you keep bring that up, the damn thing will NEVER die!
Thankfully, that little document makes no menthion of Windows 8.
|
|
|
|
|
Your absolutely right. I will keep it a secret.
Haha.
|
|
|
|
|
You would need to have a subscription to MSDN Library as a minimum.
Then you would login to Subscription Services and download the October 2001 library ISO and install it to your computer. I am sure that is the last one that supported VB6 (i would have to dig out my old discs, as i remember writing it on it as a reminder to keep), and also see they have retained it online (just logged in to check)
Then in IDE you can then set the October 2001 library as the help files.......
|
|
|
|
|
Alternatively, OP could go for a more up to date language. In fact the last release of COBOL (2002) is more up to date then VB6 (1998)
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
|
WOW the background on that site is "horrible" My eyes are tearing up from the pain
Frazzle the name say's it all
|
|
|
|
|
Forget VB6.0. Download Visual Studio 2010 from microsoft[^].
|
|
|
|
|
The best way to that I am aware of is to go the msdn website to get all Visual Studio 6.0 related references. As to actually downloading it I am unaware of doing it unless you are able to obtain the msdn cd from someone.
http://msdn.microsoft.com/en-us/library/ms950417.aspx[^]
|
|
|
|
|
In a ToolStripDropDownButton, the check marks in the menu items are misaligned to the top, and the area in the left margin of each menu item (where the check marks are drawn) overlaps the text portion of the menu item. The check marks are also quite small.
Originally the ToolStrip's ImageScalingSize was 16x16. I've since changed it to 32x32 and changed out all the images. The only way the menu items render properly is if I change the ImageScalingSize back to 16x16. Here's a screen capture of the menu: Click[^]
How do I get the check marks to render properly?
XAlan Burkhart
|
|
|
|
|
Finally found a solution. It does not address why it happened, but it does cause the check marks to display as they should. My code below was adapted from this MSDN article[^].
CType(tb_Options.DropDown, ToolStripDropDownMenu).ShowImageMargin = False
CType(tb_Options.DropDown, ToolStripDropDownMenu).ShowCheckMargin = True
And if anyone knows why this might happen (never saw it before), feel free to chime in with my thanks.
XAlan Burkhart
|
|
|
|
|
Hey peepz,
After a big torture of searching i came 2 my last hope.
Situation :
I have a mdiparent where i open mdichild A. From mdichild A, i click a button to open mdichild B.
I "simply" want to pass a value from mdichild B to mdichild A(not a new form).
Question:
How can i get a value from form B to retreive this in form A(bouth mdichilds).
form.show =>opens a new form
dim formbla as new blabla =>opens also a new form
already tried a less best practice :
formA.lblDate.Text = DataGridView1.Item(9, i).Value.ToString()
but this only works when i use the show method...
I'm begging 4 help
Somebody?
Thx in advance
|
|
|
|
|
Have a read of these
Step by Step: Event handling in VB.NET[^]
Delegates[^]
and choose which one that best suits your needs
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
You could create a public method on formb that returns the value you want. Then call it from forma.
|
|
|
|
|
Hey,
First of all thx for the reply,reallllly appreciate that
Second my apologizes if i'm working on your nerve system.
I'm an advanced noob with vb.net
But can somebody explain it with some example's?
I checked the event tutorial but there must be a faster way no?(don't like to add classes for a single transport).
So i like the public method more, but can you show me an example how i should write the method in form b and how to access my values in form a?
Thanks again
|
|
|
|
|
You could do something like this;
Form 2 Code (The one you want to get some value from):
Private aValue as String = "Hello World!"
Public Function GetTheValue() As String
return aValue
End Function
Form 1 Code (The one wanting the value, code inside a button or where ever)
Public Sub DoSomething
Dim theOtherForm as new Form1
MessageBox(theOtherForm.GetTheValue)
End Sub
|
|
|
|
|
Thx 4 the reply,
Your solution works but not how i wanted...
avalue = "hello world"
if i load the form where i want to get my data from i do:
avalue = "changethevaluethatiwanttohave"
so i load that form and avalue is changed (on the form)
then if i go to the form where i want to get my data in
i do : GetTheValue()
but still giving me "hello world" back instead of changetevaluethatiwanttohave...
How come?because avalue is declared global but if i change my global var it wil not change when a call the function in the other form??
regards
|
|
|
|
|
This is occurring because you are creating a new form each time.
You would need to find the form you want to work worth and then call its method.
If you have a number of forms open, you could use the ApplicationOpenForms to find the reference e.g.
For Each theForm As Form In Application.OpenForms
If theForm.Name = "FormOrder" Then
MessageBox(theForm.GetSomeValue)
End If
Next
Or if you know the instance of the form exists you can just reference it directly;
Dim theForm as Form2
MessageBox(theForm.GetTheValue)
You would want to do some error checking to make sure you do end up with a reference to the target form and not a null.
|
|
|
|
|
Dave,
Thanks again you really are a patient man right?...
Anyway, I can find the form and i know that it exists i will pass some code to give you a better view before i stop working with mdi containers.(last question hehe).
what i realllllyy need to accomplish is this:
Form A is a list of costumers where i can fill in textboxes with data. If i want to change a costumers data i click on a button search. This will go to form B where i can search through a datagridview of custumers.If i click a celrow the row data has to go to form A in the txt's.
Form B code:
If Not (e.RowIndex = -1) Then
DataGridView1.Rows(e.RowIndex).Selected = True
End If
i = DataGridView1.CurrentRow.Index
formA.TextBox1.Text = DataGridView1.Item(0, i).Value.ToString()
enso....
simply explained is that i need a formA.show() before it will pass the dgvitems in the txt.
I work between 2 mdichildrens so i cannot do this, also not possible the work with new because the form is already opened.
Can somebody help me out of this misery???
Sorry for bothering
greetz
& thx dave;)
|
|
|
|
|
Ok, let me show you 2 methods;
The first is the cheap and easy dirty method............
In this example, there are 2 forms the first has a textbox and a button, the second a listbox and a button, the first calls the second to find the customer the user wants, then returns this top the first form;
Public Class FormMain
Private Sub ButtonLookup_Click(sender As System.Object, e As System.EventArgs) Handles ButtonLookup.Click
Dim selectForm As New FormCustomerLookup
TextSelectedCustomer.Text = selectForm.FindCustomer
selectForm.Close()
End Sub
End Class
Public Class FormCustomerLookup
Private ItemHasBeenSelected = False
Private Sub FormCustomerLookup_Load(sender As Object, e As System.EventArgs) Handles Me.Load
For x As Integer = 0 To 9
ListBoxCustomer.Items.Add("Customer" + x.ToString)
Next
End Sub
Private Sub ButtonSelect_Click(sender As System.Object, e As System.EventArgs) Handles ButtonSelect.Click
If ListBoxCustomer.SelectedIndices.Count > 0 Then
ItemHasBeenSelected = True
End If
End Sub
Public Function FindCustomer() As String
Me.Visible = True
Do While Not ItemHasBeenSelected
Application.DoEvents()
Loop
Me.Visible = False
Return ListBoxCustomer.Items(ListBoxCustomer.SelectedIndices(0))
End Function
End Class
The second method uses events;
Public Class FormMain
Private WithEvents selectForm As FormCustomerLookup = Nothing
Private Sub ButtonLookup_Click(sender As System.Object, e As System.EventArgs) Handles ButtonLookup.Click
selectForm = New FormCustomerLookup
selectForm.Show()
End Sub
Private Sub selectForm_CustomerSelected(item As String) Handles selectForm.CustomerSelected
TextSelectedCustomer.Text = item
selectForm.Close()
End Sub
End Class
Public Class FormCustomerLookup
Public Event CustomerSelected(ByVal item As String)
Private Sub FormCustomerLookup_Load(sender As Object, e As System.EventArgs) Handles Me.Load
For x As Integer = 0 To 9
ListBoxCustomer.Items.Add("Customer" + x.ToString)
Next
End Sub
Private Sub ButtonSelect_Click(sender As System.Object, e As System.EventArgs) Handles ButtonSelect.Click
If ListBoxCustomer.SelectedIndices.Count > 0 Then
RaiseEvent CustomerSelected(ListBoxCustomer.Items(ListBoxCustomer.SelectedIndices(0)))
End If
End Sub
End Class
|
|
|
|