Hello all, iu have a question:
My app has some labels with email adresses, what i want to do is some kind of linklabel but instad of oppening an internet adress, i want it to open, for example, outlook, with the adress in the destination field (many programs does so), also, it would be fine if i can personalize a default email subject and text, but if i can open the program and put the adress i am already happy enough :)
Thanks
Sorry i didnt specify, i am programming in Visual .NET

Open default email program (Outlook, for example) when pressing a link
Ravi Sharma
thanks
Adam Plocher
no worries, its a learning curve.
Has the problem been resolved
TannerH
Thanks
Racsco
you are using VB.NET correct
remember to make sure that you have entered the correct name of the class etc.. by using Intellisense.
my code looks like this:
Imports System.Threading Imports System.CollectionsImports System.Text.StringBuilder
Imports System.Diagnostics
public class Form1
private sub button1_click(byval sender as system.object, byval e as System.eventargs) handles button1.Click
dim theStringBuilder as new StringBuilder()
theStringBuilder.Append("email@somewhere.com")
theStringBuilder.Append("&subject=my subject")
theStringBuilder.Append("&body=my email body message")
Process.Start(theStringBuilder.ToString())
end sub
end class
day10
Im almost sure that phe problem is the neviroment, because when i import the System.Text.StringBuilder , the auto-complete feature recognises this item.. anyway, nvm, and thanks again, and sorry for driving you a bit mad.... ;)
wpm
you need to know what language you are using
Visual Studio.NET is a development environment which has VB.NET/C#/VC++.NET - a range of .NET language to choose from to develop your application.
The code I have given now is for both VB.NET and C#
the VB.NET code supplied earlier will work as I have tested it myself. Give it a shot :-)
Please post back with the language you are using to develop this application
pangitko79
Public Partial Class MainForm
and not
public class Form1
Maybe that is the reason why is not working
Thanks
NoEgo
hehe no worries.
in your code, scroll right to the top of the file/page. There you should see a bunch of imports..... declarations.
something like:
Imports
System.Data Imports System.Net.SocketsImports
System.Net ......at the end of one, just add on a new line "imports System.Text.StringBuilder"
Chips_in
imports System.Text.StringBuilder
(I have no more imports)
But i still dont get that type as a known one.......
Pockey
Maybe i am importing wrong
god_rr
so you are using C# Well its a different language and the incorrect forum to post in :-)
C# code:
System.Text.StringBuilder theStringBuilder = new System.Text.StringBuilder();
theStringBuilder.Append("email@somewhere.com");
theStringBuilder.Append("&subject=my subject");
theStringBuilder.Append("&body=my email body message");
System.Diagnostics.Process.Start(theStringBuilder.ToString());
RPKJBP
try this:
//import the system.diagnostics namespace
dim theStringBuilder as new StringBuilder()
theStringBuilder.Append("email@somewhere.com")
theStringBuilder.Append("&subject=my subject")
theStringBuilder.Append("&body=my email body message")
Process.Start(theStringBuilder.ToString())
this will start up the default email client (outlook usually) with the field populated.
Bill Cumming
Ok, anyway, i will try with visual studio, i can guess that might be the problem why i have this issue... if you have another suggestion about which developement enviroment to use, tell me.
Finally the topic went completely twisted, sorry.. i am porting my apps from vb6 to .net, and i am a bit lost.
Thanks again ;)
Shepherd_85