|
intonet wrote: I'm not sure there is.
You save yourself from being entrapped with the dreaded exception like this:
System.NullReferenceException Object Reference Not Set To An Instance Of An Object
|
|
|
|
|
How to Set CustomPaperSize For Crystal Report From Coding in Vb.net?
prabumj@gmail.com
|
|
|
|
|
do you want to design crystal report on a custom page size or just want to set the size of paper at printing time
Salman Sheikh
|
|
|
|
|
hi All
i have two vb.net Projects,and i have added them together in one Solution and its fine. i want to calla form of the second Project in the first project, when Project one is finished executing it task. how do i achieve that
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
|
|
|
|
|
add a reference from the project that does the calling to the other project (right mouse click on project select add reference tab projects)
then add an imports statement to the form (or class) that does the calling
imports project2
after that you can use everything from project2 as if it was in project1
Remarks:
-you can do it without the imports too
just add project2.Form1 when calling the form1 in project2 instead of form1
-when you have a reference from project1 to project2 you cannot add a reference from project2 to project1 this would couse a circular dependency (straight from the error from vs.net )
hope this helps
|
|
|
|
|
Hi thanks for the Reply
i have done as you said, and i click on the Project Tab and select the available Project in this case ProjectB and select it in the selected components and when i click ok, it gives me the following Error.
a Reference to 'ProjectB' could not be added. An assembly must have a dll extension in order to be referenced.
Help
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
|
|
|
|
|
ah yes forgot about that
in properties of projectB put application type (on application tab) to 'class library'
this does mean you cannot start you application from a form on projectB after that it should work fine
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
Wow it worked fine. Thank you very much
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
|
|
|
|
|
thank you you Helped me a lot.
thanks man
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
|
|
|
|
|
Hi all,
I am thinking of how objects are deleted in Visual Basic 6.
I am now using ADO for DB operations and I am not sure if my program clears objects correctly.
I use the following code for creating a recordset
--------START------------
Dim RecSet as New ADODB.Recordset
'Execute query here
RecSet.Close
-------END----------------
That's it. I do not know how to proceed further with releasing the object. In Visual C++ I just
call the Release Method of the Recordset pointer and everything is fine. Does Visual Basic automatically clear the object for me?
Thank you!
modified 8-Mar-17 3:48am.
|
|
|
|
|
Hi,
The last step could be: RecSet = Nothing
Hope this helps
|
|
|
|
|
when coding in vb6 I always use the following to make sure all objects are cleared
dim recset as new adodb.recordset
...
recset.close
recset=nothing
|
|
|
|
|
Yes man it will help, they are right, set everything to nothing
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
|
|
|
|
|
Thank you guys, I will try it
modified 8-Mar-17 3:47am.
|
|
|
|
|
I am working on a system for varsity and in one of the forms I need to be able to send an automatic reminder via email a week before the date of an appointment.
Appointments are stored in a database.
How do I send this email after an appointment has been made?
Evan Saunders
|
|
|
|
|
Hi,
You can use the MailMessage and SmtpClient .NET classes.
e.g.
Dim to As String = "you@domain.com"
Dim from As String = "me@domain.com"
Dim subject As String = "Hi!"
Dim body As String = "This is a message from me "
Dim mm As MailMessage = New MailMessage(from, to, subject, body)
Dim oSmtp As SmtpClient = New SmtpClient("Smtp.mailserver.net", "username", "pwd")
client.Send(mm)
Hope this helps
|
|
|
|
|
Hi There
Thanks so much, you made it look so simple. I was kinda stressing out. I hope it works. Thanks again
|
|
|
|
|
hi everyone,
i know this is very simple question.
i want to split my string on the basis of seperator
my code is following
Dim path,str,seperat As String<br />
str="0\0\0\0and--->Caption1"<br />
seperat="and--->"<br />
Dim Title As String<br />
Dim ItemInfo() As String = str.split(seperat)<br />
path = ItemInfo(0)<br />
Title = ItemInfo(1)
now i want to path contains "0\0\0\0". here i get correct result using above code but in title i want to store "Caption1"(on basis of seperator) but it stores "nd--->Caption1".
can anybody told where i m wrong?
how can i solve this problem?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Change the separator if possible, otherwise first replace your separator string with a character separator and then perform spliting operation using ur new character separator.
You can use Replace function to replace strings or characters in a string with other strings or characters.
|
|
|
|
|
hi iprasad2007,
i already know this thing but i want to split my string on the basis of its substring not on any character. sorry,but this is not the answer of my question.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
The problem with this is that the split function expects a array of chars and when you give it a string it just uses the first char (in this case the "a"). I don't imidiatly know how you could solve this but I have a workaround:
Dim path, str, seperat As String
str = "0\0\0\0and--->Caption1"
seperat = "and--->"
Dim Title As String
str = str.Replace(seperat, "~")
Dim ItemInfo() As String = str.Split("~")
path = ItemInfo(0)
Title = ItemInfo(1)
basicly the same code just that I replace the seperat string with "~" before splitting. This way ther is only 1 char to split on (or string of 1 char) and it works perfectly
hope this helps
|
|
|
|
|
Im not sure if you want to use pure .Net code or not, but if you dont you can do this:
Dim path, str, seperat As String<br />
str = "0\0\0\0and--->Caption1"<br />
seperat = "and--->"<br />
Dim Title As String<br />
Dim ItemInfo() As String = Split(str, seperat)<br />
path = ItemInfo(0)<br />
Title = ItemInfo(1)
The piece of code in bold italic is the VB6 way of doing it using strings and as you can see can it be used in VB .Net once the Microsoft.VisualBacic Namespace is included
Hope this helps.
|
|
|
|
|
Thanks keith,
its work
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
I believe the function you are looking for is a tokenize function (split a string by a delimiter(separator))
EDIT: I tried to write one here for you but got confused, I will tommorow when I got more time.
EDIT AGAIN: Mine doesn't fit in memory.
-- modified at 3:12 Saturday 1st September, 2007
All of my programs are downloadable at fahadsadah.co.nr
|
|
|
|
|
Hi All
As my subject suggest i have a vb.net Application. Whilst its running does not allow my computer to logoff. I have tried this on two other machines to no avail. Any suggestions. ??
I didnt include code because I don't think its necessary .
Cheers
Dom
|
|
|
|