|
A function that does the same as a sub ??? I would have thought the solution to be obvious; use a sub
Steve Jowett
|
|
|
|
|
I meant a function that does the same as a sub ,but like all functions do,utilizes an Object or a Component but does not return any value
|
|
|
|
|
Let me make it clear,its something like this
Function str() as String<br />
<br />
'code related with str ,which does something to the form,just like code in an event sub<br />
<br />
RETURN<br />
'I've got nothing to return<br />
<br />
End Function
Say if i choose null as the return value,will the code above it be processed,irrespective of the fact that the function will always return null
|
|
|
|
|
You could do this :-
Function str() as string<br />
<br />
'your code here<br />
<br />
Return Nothing<br />
<br />
End Function
but surely that is the same as :-
Sub str()<br />
<br />
'your code here<br />
<br />
End Sub
Or is it you what to provide an object for the "function" to work with and change, in which case :-
Sub str(ByRef myObject as Object)<br />
<br />
'do something to myObject<br />
<br />
End Sub
This would receive the memory address the the object and change it directly, without the need to passing back the result
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
thanks,i might appear like a newbie,but i'm not,its just that i learned everything by trial and error and my knowledge of the vb lang is here and there
|
|
|
|
|
Vivek Narayanan wrote: i learned everything by trial and error and my knowledge of the vb lang is here and there
I suggest you buy a book and fill in the gaps.
|
|
|
|
|
What you're talking about is still a Sub .
Private Sub SetupDataGridView()
' Code to setup your DGV goes here.
End Sub
Seriously, pickup a book on VB.NET for Beginners. This is really basic stuff you're asking about.
|
|
|
|
|
How should i calulate the no of days in a particular month?
I have a complete datail of the date like the day , month and year.
|
|
|
|
|
DateTime.DaysInMonth
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi Christian Graus ,
i have a query .
it is non technical that's y i am not saying here in this very forum .if u get some time to go to Meetings and Get together forum.
|
|
|
|
|
OK, sure....
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
hi.......
how to generate multiple graphs in vb.net
thanks & regards
|
|
|
|
|
one at a time, using either a graphing library, or writing your own code to plot them.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
As Chris said using a For..Next,For...Each..Next or a do..while..loop loop
|
|
|
|
|
Vivek Narayanan wrote: using a For..Next,For...Each..Next or a do..while..loop loop
say what ???
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello
I'm working on a piece of code that checks for "(bla bla number) comments"
Example. If I entered "86 comments", it would return the number in front of 'comments'
My code for this line seems wrong, please help. I'm a young learner. Thanks!
String regex = "\\d [Cc][Oo][Mm][Mm][Ee][Nn][Tt][Ss]:";
Belief is a beautiful armour.
Knowledge is the sword.
|
|
|
|
|
(\d)+\s[Cc][Oo][Mm][Mm][Ee][Nn][Tt][Ss]
will match if there's only one space, and will also put your number into a group, so you can pull it out.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks Christian!
But it now gives an error "Invalid escape sequence" I've looked around, and perhaps, could it be something about the "\" and "()" characterization?
Anthony.
Belief is a beautiful armour.
Knowledge is the sword.
|
|
|
|
|
Hi i want to change the image on a toolbar button from vb.
i also have handle of the button, but don't know how to implement a new image to it.
any suggestion will greatly apperitiated.
Thanks in advance...
amolk
|
|
|
|
|
VB6 or VB.NET ? www.pinvoke.net[^] has info on how to call windows APIs from VB.NET.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
HI,
thanks for reply.
but i want it in vb6.0.
any help related to sendmessage with setbuttoninfo api will greately helpful.
plz help as early as possible.
thanks.
amolk
|
|
|
|
|
I'm trying to develop a app like the office outlook. but i don't know how to make a timesheet like calendar.
Please show me that iss?
Thanks all!
|
|
|
|
|
There are no controls that do this, you need to buy custom controls, or write your own.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi all. I have seen many applications that listview ONLY updates when new data is avilable or when current data changes. I am making an application that deals with similar case. But i don't know how these applications achive this task. I tried to use timer to refresh my listview every few seconds(I am loading data from dynamic xml to listview.)But there is a big problem that i keep losing focus on the form and i see many unnecessary refreshes!! Could any one show me a better solution to avoid these unnecessary refreshes?I know these professional applications are using a method that i am not aware of.Thanks
|
|
|
|