|
Sir,
I wanted to know something about the Generic Namespaces
Thanks and regards
Pankaj
|
|
|
|
|
I'm not sure what you mean. Do you mean the System.Collections.Generic namespace?
|
|
|
|
|
Sir/Madam,
In the form load i am writing
dim str as string
But did not need ant class to import.
How this can happen
please help.
Thanks and regards
Pankaj
|
|
|
|
|
I'm guessing it is an intrinsic type like Integer, Double or Boolean.
|
|
|
|
|
A String is an object just as in most langauges. It is derived from the System.Object class as System.String and is available by default in all new projects.
Cleako
|
|
|
|
|
cleako wrote: A String is an object
As is Integer, Double and Boolean.
cleako wrote: It is derived from the System.Object
As is Integer, Double and Boolean
cleako wrote: as System.String
Which does not help to answer the OP's question, which is why do you not have to specify that you are importing (using in C#) the System namespace. Console is in the System namespace, yet if you leave that out it does not compile. String is in the System namespace, so surely you should need to Import System or refer to it fully as System.String.
|
|
|
|
|
BUT, it is not an intrinsic datatype.
Cleako
|
|
|
|
|
Some namespaces are imported by default in VB.NET. One of them is System, where the String class is.
---
single minded; short sighted; long gone;
|
|
|
|
|
Sir/Madam
I never implemented delegated and events in my programs.I really want to learn these things and get implemented in my project.Can u please send any link that implemented the same.
Thanks and regards
Pankaj
|
|
|
|
|
|
|
Hi everyone,
I'm building a page which has a webusercontrol on it.
The webusercontrol is there for the sole purpose of displaying controls(calendar, texbox, etc...) on demand.
The parameters the webusercontrol uses to detirmine what to show, is given by the page the webusercontrol is on.
How can I pass a parameter from the page to the webusercontrol ?
I'll need to build some sort of 'listener' in the webusercontrol I built, but I'm not sure how to go about doing that.
Some help would be much appreciated.
|
|
|
|
|
I would suggest simply storing the values you need for the web user control in a Session variable. But pay attention to the order of events so you know where to store the change, I believe the user control is dealt with after the Page Load but before the button click so you would need to have a call to that logic in the Page Load or earlier.
Cleako
|
|
|
|
|
What would that look like in code ?
Take into account that there could be 0 to N parameters being returned.
And there can be several parameters of the same type.
For instance:
More than one date parameter required, which means that it should return two or more calendar controls on screen.
|
|
|
|
|
I suppose you could build something similar to a comma separated string and store it so it would be
Session("WUCParameters") = ParamValue1,ParamValue2,ParamValue3
then on the Web User Control you simply split it into a string array.
Dim arParams() as String = Session("WUCParameters").ToString.Split(",")<br />
<br />
For i as Integer = 0 to arParams.GetUpperBound()<br />
'Do something for each value listed<br />
Next<br />
Cleako
|
|
|
|
|
Hi,
I can't seem to figure out how to create an object array and load its indexes at runtime in VB 2005. In VB6 you would just select an object set its index property to 0 and at runtime you could load instances of this object whenever you wanted.
for example: in vb6 i have a textbox and i set its index to 0. its name becomes text1(0) and behind the the command button i wrote a code like this:
Private Sub Command1_Click()
For i = 1 To mytxtCount
Load Text1(i)
Text1(i).Visible = True
Text1(i).Top = Text1(i - 1).Top + 500
Next
End Sub
but i cant do it in vb 2005 now.
Can somebody tell me how to create an object array or point me to an article regarding it?
Thanks,
|
|
|
|
|
Your problem is that dotnet does not have control arrays. To have each control use the same routine for the event...add an addhandler.
dim txt as textbox
dim iTop as integer = 100
For i = 1 to mytxtcount
txt = new textbox
me.controls.add(txt)
txt.top = iTop
iTop+=500
addhandler txt.textchange,addressof HandleTextChange
Next
|
|
|
|
|
thanks that does my work very well
|
|
|
|
|
Hi I am hopeing someone will be able to help. I am new to programing and even newer to VB.Net.
I am trying to write a random access application. I have created a structure within the solution modul, however the public variable declaired within the structure do not apear to be defined within any form within the application.
I would be very happy if anyone could point me in the correct direction, thanks Jon
|
|
|
|
|
How are you exposing the Structure, is it a Friend/Public/Protected/Private etc...? If you do a Google search you will get an explaination for those. As you can probably tell Im guessing that you set it to Protected or Private which would not expose it to other classes within the same solution.
Cleako
|
|
|
|
|
Hi thanks for the reply, within the modul i put the code
Public structure strItemName
Public strItemName as string
Public intItemPrice as integer
end structure
i can not understand why the dtructure is visable on forms, however when i try to asign variables within the structure to another variable, label or combo box they return undefined. I know i've got the syntax wrong but i don't understand why, or how. If you have any sugestions i would be greatful. Thanks Jon
|
|
|
|
|
|
Thank you, i think i understand what i have done wrong now. I will give it a go. Thanks Jon
|
|
|
|
|
Hi,
I need to show the dropdown style button in toolbar, it has different lengths of string. I need to fix the width of this button in toolbar, so that it would not shrink for small length and expand for big length.
Any luck to fix the toolbar buttons width.
Thanks in advance.
Be simple and Be sample.
|
|
|
|
|
Write a program that allows the user to draw a "free hand" image using a mouse in a picture box.
Hlalele
|
|
|
|