|
I'm sorry to ask you this question .. but I have to now
in c++ after you declare the array and when you want to get the content of hte array item 2 then you do
char k[10]={'k','m','g'...};
cout<< k[1]<<" ";
how to do it in VB.Net?? I wrote something like below and got error.. why is that???
Dim sArray() As String
Dim i As Integer
i=0
sArray(i) = "a string"
|
|
|
|
|
Dim sArray(8) As String
sovle the problem.. need to initialize the size of the array..
|
|
|
|
|
I'm trying to consume a C# Web Service using VB6 and Soap Toolkit 3.
Everything works fine when I'm passing/returning simple data types such as strings and integers but I'm having trouble using complex data types.
The class I'm trying to pass is defined in my C# WS as
public class AlertMessage
{
public string AlertMessage;
public string AlertComment;
}
How do I treat this in VB and how do I pass it?
Currently, I have created an ActiveX DLL with a class AlertMessage as follows:
Private mAlertText As String
Private mAlertComment As String
Public Property Get AlertText() As String
AlertText = mAlertText
End Property
Public Property Let AlertText(ByVal Value As String)
mAlertText = Value
End Property
Public Property Get AlertComment() As String
AlertText = mAlertComment
End Property
Public Property Let AlertComment(ByVal Value As String)
mAlertComment = Value
End Property
When trying to pass an AlertMessage to the WS I get the following error:
SoapMapper: Saving SoapMapper alertMessage failed. No such interface supported.
When trying to return an AlertMessage from the WS I get a type mismatch error. My Soap response looks as follows:
<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetAlertMessageResponse xmlns="http://star-navigation.com/webservices/">
<GetAlertMessageResult>
<AlertText>Hello There</AlertText>
<AlertComment>My Comment</AlertComment>
</GetAlertMessageResult>
</GetAlertMessageResponse>
</soap:Body>
</soap:Envelope>
Can anyone help?
Thanks,
Cory
|
|
|
|
|
Am learning VB. I have not had the need until recently to install one of my apps on a machine that doesn't have VBruntime installed. Is there a way to include vbruntime in the install application so that it installs on the users machine at the same time as the application I have created?
Thanks,
Jim
|
|
|
|
|
hi all,
I am having a string with CSS code which contains class names and their properties. Here there may be some repitition of class with different properties. Now I need to get the repeteated class name and add the property to the existing class name. How do I do that in windows forms. I am using vb.net. Please advice. Thanks in advance.
regards
Venkat
|
|
|
|
|
Every time i open my visual studio.net and try to start a new project it give me an error message telling me the automation server is unable to open the console and then it doesnt give me a new form but i can still edit projects.
I have already tried to reinstall the program and i have aquired a new version of it but it keep the old settings and gives the same error message.
if you know how to correct this problem please let me know...
|
|
|
|
|
Hi!
I have a problem with the center of the form in relating to the changing of the screen resolution and I would like to have aide. Please help!
In my application, I change the screen resolution to 800x600 when the app is started and will restore to the original state when quit. About the code of changing the screen resolution, it like the code in the sample of the www.AllAPI.net: http://www.mentalis.org/apilist/ChangeDisplaySettings.shtml
My problem is that if I change the screen resolution and then in my app, I use a procedure to center the form like this:
Sub centerForm(ByRef theForm As Form)
theForm.Left = (Screen.Width - theForm.ScaleWidth) / 2
theForm.Top = (Screen.Height - theForm.ScaleHeight) / 2
End Sub
but I always have a problem that the form nerver be centered correctly
I case I don't change the screen resolution, I don't have this problem
This is the thing that I would like to need you help
Thanks in advanced!
Chua
|
|
|
|
|
anyone know how to add shockwave flash to vb.net form??
plz teach me...i need know it urgently...please..thanks..
MJ
|
|
|
|
|
I want to use ms word as a doc viewer,and incapacitate it's most function,such as "save as","copy","paste".
I have not idea about this.Is that a comparative easy method can achieve my goal??
lost my way
|
|
|
|
|
i have made a cursor.. with the extension *.cur
i have an application with VB6 ..
how can i add this cursor to my application ????
ahmed elmahdy
|
|
|
|
|
Set the Form.MouseIcon to a cursor file in the design time.
|
|
|
|
|
thanx for ur reply ..
i have really done that ,,
But i have not seen anything after running my program
reply plzz
|
|
|
|
|
Sorry,,
I Forgot to say : Set Form.MousePointer=99 (custom)
|
|
|
|
|
I am starting to do some windows UI, please recommend some good books for GUI design guidelines and examples.
Thx
|
|
|
|
|
Here is one book that is good at showing you what NOT to do:
GUI Bloopers[^]
Live it, Learn it, Love it...
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
I've never looked at this one myself, but you might give it a try:
The Essential Guide to User Interface Design[^]
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Shortly my vb6 app would'nt continue to display any data in a grid view.
No error message just a blank boring grid.
regsvr32 msbind.dll
has solved the problem. unfortunately this happend on a customer machine too
what's going on? how this dll can be unregistered???
|
|
|
|
|
I have tried to figure something out that I want to write in code, but I couldn't find the solution. Until now. I found the following piece of code on the Internet today. Unfortunately, it is in the language of C (I think so), a language that I don't know anything about. So, I would be very grateful if anyone could translate it to Visual Basic code.
<br />
#include iostream.h<br />
<br />
int fak(int n);<br />
<br />
void main()<br />
{<br />
int x=5;<br />
<br />
cout<< x << "!=" << endl;<br />
cout<< fak(x) << endl;<br />
cout<< 5*4*3*2*1 << endl;<br />
}<br />
<br />
int fak(int n)<br />
{<br />
if (n<=0)<br />
return 1;<br />
<br />
else<br />
{<br />
int a = n*fak( n-1 );<br />
return (a);<br />
}<br />
}<br />
//OT
|
|
|
|
|
(Untested and VB.NET, so replace Integer with Long in VB6)
Function Factorial(ByVal n As Integer) As Integer
' AFAIK, you can actually do this as <= 1 instead
If n <= 0 then
return 1
else
return n * Factorial(n - 1)
end if
End Function
You might want to read up on recursive functions, as that is all this is.
--
Ian Darling
If I was any more loopy, I'd be infinite.
|
|
|
|
|
So there is a function to do n-factorial. I didn't know that. Well, I was hoping to find out how to write a for...while loop or something that does the same thing. I have spoken with my mathematics teacher and we are trying to find some algorithm to do n-factorial. I mean, a calculator doesn't know what, for example, "5!" is, does it? I tried to write a loop with "counter" that added "1" for every loop, and when "counter" had the same value as "n". It did not work, though.
But thanks for the help, anyway.
//OT
|
|
|
|
|
You can work out a factorial in a loop too (again VB.NET):
Dim total as Integer = 1 ' starting at 1 is important here
For i as Integer = 2 to 5 ' replace the 5 with a variable as necessary
total = total * i
Next i
--
Ian Darling
If I was any more loopy, I'd be infinite.
|
|
|
|
|
Thanks, but I have already worked it out. It was only one small adjustment I had to do in my code to make it worked.
I did it like this:
<br />
Dim x As Integer<br />
Dim y As Integer<br />
Dim counter As Integer<br />
Dim check As Boolean<br />
<br />
<br />
Private Sub Bttn_Fkltt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Bttn_Fkltt.Click<br />
x = TxtBx_Fkltt.Text<br />
counter = 1<br />
check = False<br />
y = x * (x - 1)<br />
If x > 2 Then<br />
Do Until check = True<br />
counter = counter + 1<br />
y = y * (x - counter)<br />
If counter = x - 1 Then<br />
check = True<br />
Exit Do<br />
End If<br />
Loop<br />
Lbl_Fkltt.Text = y<br />
Else<br />
Lbl_Fkltt.Text = y<br />
End If<br />
End Sub<br />
Look at the code: If counter = x - 1 Then . Before, I had If counter = x Then , and with that code, y was multiplied with 0 in the end, resulting in y = 0.
//OT
|
|
|
|
|
I made some shaped forms... but I have never found
out How to create somthing like this shape, a recangle with rounded corners:
Look at the white area.. Click Here
any ideas?
I used this page
|
|
|
|
|
This code will generate a rectangle(200x200) with rounded corners...
Dim Path As New GraphicsPath
Path.AddArc(0, 0, 40, 40, 180, 90)
Path.AddArc(160, 0, 40, 40, -90, 90)
Path.AddArc(160, 160, 40, 40, 0, 90)
Path.AddArc(0, 160, 40, 40, 90, 90)
Me.Region = New Region(regionPath)
|
|
|
|
|
what's GraphicsPath? what's regionPath? ...
.. here we go again.
|
|
|
|