|
I need some guidance, as I am used to Visual Studio '03 taking care of this for me. I need to connect to a web service, but the web service does not provide a WSDL document to point to...
Is there an easy way to setup and use SOAP without a WSDL document that sets everything up?
TIA!
Wayne
|
|
|
|
|
If you don't have a .WDSL, .XSD, or .DISCO file at your WebService adress, you're going to have a very difficult time calling the functions on that service. Without that document, how are you going to know what parameters to pass, as what types, how to pass them, and the return types?
There is no easy way to do it without that document. No tool is going to set anything up without one of the above files...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I used vbTab in a label in VB.NET and it failed to work. Can anyody help me out with the answer as to why it failed.
Thanks
dotnetdude
dotnetdude
|
|
|
|
|
Simple, any whitespace character is rendered as a space character. Instead of using tab characters to line up columns, just use a seperate label control. You'll find you have much better control over the layout of columns.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have a class defined, along these lines:
class theClass
dim a as Integer
public sub new( ByRef inA )
MyBase.New
a = inA
end sub
public sub doSomething()
a = 5
end sub
end class
Now, I call this as so:
Dim i as Integer
dim b as theClass = new theClass(i)
b.doSomething()
// print i
When I print i, I expected it to be 5, but it shows up as 0. I pass it into the class by reference, so I expected that any change I make to it would show up.
Can someone explain why this is behaving the way it is?
Thanks...
|
|
|
|
|
It's returning 0 because you never assigned any value to 'i' anywhere in your code.
I think your trying to do something like this:
Class theClass
Private a As Integer
Public Sub New( ByVal inA As Integer )
a = inA
End Sub
Public Sub doSomething( ByRef returnValue As Integer )
returnValue = a
End Sub
End Class
Now, to demonstrate ByRef passing:
Dim b As New theClass( 25 ) ' Passed to the contructor ByVal
Dim i As Integer = 0
b.doSomething( i ) ' 'i' passed to doSomething ByRef
Debug.WriteLine( i.ToString() )
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
No, I really would like the parameter passed into the constructor to be passed by reference. I tried to make the example simple, but some background might be required to see why I wish to do it this way. Basically, the class is a dialog box, and I want to construct it, binding some of its values to some variables, then show the dialog, and have the variables that are bound be updated automatically, without the calling class having to pull each one out individually.
At first I thought maybe I needed to assign a value to the original integer, as you suggested, but the following still yields a 1, not a 5, which obviously isnt the desired result. So is there a way to set a member variable within a class to a reference to a variable that has been passed in via the constructor?
<br />
Class theClass <br />
Private a As Integer <br />
Public Sub New( ByRef inA As Integer )<br />
a = inA <br />
End Sub <br />
<br />
Public Sub doSomething()<br />
a = 5 <br />
End Sub<br />
<br />
End Class<br />
<br />
Dim i as Integer = 1<br />
Dim b As New theClass( i ) ' Passed to the contructor as reference<br />
b.ShowDialog() ' User modifies value...should be 5 now...<br />
Debug.WriteLine( i.ToString() ) ' Expect to see 5, instead see 1. <br />
So, I understand using ByRef in a method, but am really looking to bind the class member to a variable reference, if that is possible. From what I'm seeing here, I'm not sure it is...
Thanks for your help...
|
|
|
|
|
Anonymous wrote:
I really would like the parameter passed into the constructor to be passed by reference. I tried to make the example simple, but some background might be required to see why I wish to do it this way. Basically, the class is a dialog box, and I want to construct it, binding some of its values to some variables, then show the dialog,
Can't be done using ByRef in the constructor. When the constructor sub returns the variable references are popped off the stack and lost. The references only exist so long as the function that was called is still executing. The moment the function returns, the references are lost.
What you want to do, or I should say how you want to do it, would require FAR more code than it's worth. Even using databinding, you would have to bind each of your variables to their respective fields on the dialog form.
The best method is to do exactly what you don't want to do ... pull each variable off individually. You'll be doing it no matter what, either way you go...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Actually, there is a method to do it using ByRef, but it's not flexible. You must pass all of your variables in AND use the same number of parameters. But...
In your dialog class, you would create a Sub that takes parameters for all of the fields you want to return from your form. This Sub would call ShowDialog on itself. When the user clicks OK, the Sub would then pull off all the fields and assign them, one by one, to the parameters passed in. So if you want to pull off the values of 15 fields when the user clicks OK, your function would look something like this:.
Public Sub MyShowDialog(ByRef field1 As String, ByRef field2 As String, ByRef field3 As Integer, ... )
If Me.ShowDialog() = DialogResult.OK Then ' This is a blocking call so nothing will execute until this returns
field1 = WhateverControl.Text()
field2 = WhateverOtherControl1.Text()
field3 = WhateverOtherControl2.Text()
...
...
End If
End Sub
Now, when you call the MyShowDialog from your other form:
Dim myData1 As String
Dim myData2 As String
Dim myData3 As Integer
...
...
myDialog.MyShowDialog( myData1, myData2, myData3, ... )
' Now all your variable have their values...
Remember this though, I said it's possible, to do it this way. It is NOT the best way to pull values off of a form.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thank you!
Between your last reply and this, I have a much better understanding of what is going on than before, which is what I was really going for. I had already went ahead and resorted to pulling the values out of the form one by one prior to posting, in order to get it to work correctly, but I was confused as to why it hadn't worked as expected.
Knowing that the reference goes out of scope when the called method ends is good to know, and will most likely save me some headaches later, so again, many thanks.
For curiosity, why do you discourage the work around you provided in this last post, in favor of the other method? This seems to encapsulate the functionality pretty neatly, assuming you are posting a dialog to retrieve relatively few parameter values and the number of those parameters isn't changing.
I'm learning all the time, thanks for helping me along the way.
|
|
|
|
|
Most of the time, you're not pulling just a few parameters. It would work for something like a login dialog, but not for an Options/Settings dialog where there could be MANY options. It's also not flexible. If you put up the dialog for two different operations, say one situation where you needed 15 fields returned, and the other where you needed, say 10. You'd have to write two different MyShowDialog functions with the different parameter lists. I'm all for overloading functions, but that makes the dialog less useful because the dialog class now has to know everything about the situations in which it is used and that's just not good practice in an Object Oriented world.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
This is somewhat tricky so you be watchful with any changes that could occur.You might expect that since this is passed by reference any changes you made to the passed variable would reflect in the instanciated class.
|
|
|
|
|
Is there anyone know how to code the button column in datagrid?
I have the example from: http://www.syncfusion.com/faq/winforms/search/888.asp
The button column in this example that is what I want to do. But when I try to use their code into my application, then it gets errors. And I very don't know how to fix it in my code. I don't have any experience of the drawbutton and drawImage. PLS HELP!!!
Thanks!
--If you can give someone a hand, that would make your day more wonderful...^_^_^..--
-------------How Wonderful Life IS!------------------
-----------------------Lisa--------------------------
|
|
|
|
|
Does anyone know of a good book that identifies Win32 API calls that can be used from Visual Basic, including an Introduction to their use etc...
|
|
|
|
|
MSDN is still the best Win32 reference going. Most if not all Win32 API functions can be called from Visual Basic.
Win32 is pretty big. It would be easier to know which area you want the books to cover.
Michael
CP Blog [^]
|
|
|
|
|
|
You might want to try API List[^]
The list is not exhaustive, but it's quite good.
"if you vote me down, I shall become more powerful than you can possibly imagine" - Michael P. Butler.
|
|
|
|
|
I'm using some buttons in an application which uses the mouse enter and mouse leave functions to change the imageIndex selected from an image list. The snag is on the buttons that change between forms I'm simply getting :
Private Sub BtnX_Click yadda yadda (BtnX is on FormA)
FormA.Hide()
FormB.Show()
End Sub
Since the Mouse enter event has changed the button image to it's "hover" image, and there is no mouse leave event because the form has instantly vanished when the button is clicked, the image remains hung on it's mouse enter image setting thereafter.
How does one re-set the mouse leave setting.
I've tried simply changing the image back and numerous other tweaks but the problem seems to be that the mouse enter function sets something somewhere and the only known cure is to use the mouse leave function.
RWWB in the UK or Canada
|
|
|
|
|
off the top of my head, one gritty way to achieve this is to handle the activated event and have all image indexes reset appropriately. you could do this in each of your forms.
hope this helps.
-jim
|
|
|
|
|
Hello all,
The point is:
that i want to use .dll that implement from visual c++ to work with my visual basic 6 application but i don't know how to do it.
so i want to know..
1.How can i know the function and classes in the .dll file ?
2.How can i make visual basic 6 use that .dll ?
3.Could you introduce me to some books or websites on how to use .dll with Visual Basic 6?
please ,help me. It's about my senior project.
Thanks for your help.
|
|
|
|
|
Is the DLL a regular DLL or a COM DLL?
If its a regular DLL, have a read of this[^]
Michael
CP Blog [^]
|
|
|
|
|
What you ask is not so straight forward. It really depends on the type of .DLL your trying to use (C++ function library or a COM .DLL). Also, you'll need some kind of documentation on the .DLL. Otherwise, you'll have a very difficult time using it. You'll be able to see the function names using the Depends utility that comes with Visual Studio 6, but you can't see the return types or the parameters for each function. There is no way to determine that just by looking at the .DLL exports. You NEED the documentation on it...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi, anybody know the visual basic coding for the communication with the I2C adapter, inculding the read and write command. It are using USB to communicate with the I2C. Anyone can give advice? thanks.
|
|
|
|
|
You would have much better luck on Google. I tried "I2C VB" and came up with an OCX Control that might work for you.
Without any documentation on the workings of the adapter, you'll find the job of communicating with the adapter through it's drivers impossible.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for your information. The suggestion given by you is for the parallel port. But my communication is using USB to connect the I2C Adapter. So can you give me some information about this? Thanks.
|
|
|
|
|