|
-
Oct 2nd, 2001, 05:46 AM
#1
Thread Starter
Junior Member
could it be an issue with certain versions of win98?
Why did I ever start learning VB?! I should have been happy with Java. 
-
Oct 2nd, 2001, 05:52 AM
#2
Retired VBF Adm1nistrator
Try this :
VB Code:
Option Explicit
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpszOp As String, _
ByVal lpszFile As String, ByVal lpszParams As String, _
ByVal LpszDir As String, ByVal FsShowCmd As Long) _
As Long
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Const SW_SHOWNORMAL = 1
Private Sub Form_Load()
StartDoc "mailto:?Subject=How? &Body=Thank you"
End Sub
Public Function StartDoc(DocName As String) As Long
ShellExecute GetDesktopWindow(), "Open", DocName, "", "C:\", 1
End Function
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Oct 2nd, 2001, 07:38 AM
#3
Thread Starter
Junior Member
I hate VB. I tried your code and it works perfect but the message that appears in the body section is quite a number of sentences, 531 characters to be precise and maybe because the ShellExecute method takes a strings as an argument, it limits it to 255 characters. I am in deep trouble if I can not get this to work as the deadline is this afternoon.
Thanks
Why did I ever start learning VB?! I should have been happy with Java. 
-
Oct 2nd, 2001, 07:40 AM
#4
Retired VBF Adm1nistrator
A fixed-length string can store about 64,000 characters, and a variable length string can store about 2 billion characters.
I think you're safe
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Oct 2nd, 2001, 07:57 AM
#5
Thread Starter
Junior Member
why is it working differently on different platforms?
on 2000pro the entire message is displayed in my email client, in NT it displays only 210 characters and in 98 I am not sure how many because when I ran the program with the entire message it did not work but when I ran it with a small sentence, it did.
I can only assume then that it is the "ShellExecute" fault.
Can anyone suggest a solution pls
Why did I ever start learning VB?! I should have been happy with Java. 
-
Oct 2nd, 2001, 08:14 AM
#6
Thread Starter
Junior Member
is this a question for the api forum maybe?
Why did I ever start learning VB?! I should have been happy with Java. 
-
Oct 2nd, 2001, 08:23 AM
#7
Retired VBF Adm1nistrator
Hmm.
Try putting the entire message into a String Variable first, and then passing that variable name into the API then...
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Oct 2nd, 2001, 08:29 AM
#8
Thread Starter
Junior Member
unfortunatelly it did not work. It must be the api method
Why did I ever start learning VB?! I should have been happy with Java. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|