|
Send email is easy enough. But my question now is how to send a user html-email if his/her email program is html format enabled, or send alternative plain text email if otherwise.
Thanks guys,
|
|
|
|
|
Your app would have to ask the user which format he wants. When you compose the message body, the HTML version of the message will just be the source for the HTML page. Just assign the entire source to a sing string and pass it to the message body property. Same is true for a plain text version. Your app just has to be able to generate which ever version the user wants.
You can't send BOTH formats in the same message because the user will see the body of the message twice in the same message.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
That is an option I would rather not use.
One friend suggests me do the following
"when you send an email with both formats in it (as I often do), the recipient's email client decides which one to display.
Usually it will be the HTML version if it's a graphical program, but any
good email client will let the user override that decision. So really, the
sender shouldn't have to know which format to send; it's up to the recipient
(as long as the sender sends both)."
But he uses perl to do everything. I wonder if I can do the same thing in .net. There must be a way. A lot of software has this capacity. Just wonder what is the way to do it
|
|
|
|
|
You going to have to ask him what the procedure is because I always send one or the other based on user preference. I've never sent both formats and don't know what the catch is so the client can differentiate between the two.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
If you send a MIME formated message, it contains both the HTML version and a plain text version. Look at the CDO stuff at MSDN for an overview of multipart messages.
|
|
|
|
|
|
What's with the two forms? Why can't you put this stuff on one form. It would probably make your life a little easier by not coding for two forms...
Anyway, your code doesn't do any seperate checking of the fields, so it can't possibly count each one as an error. This should fix it:
Private Sub mnuFileCheck_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuFileCheck.Click
Dim frmOneInstance As New frmOne() 'instance of form to mark this form against
Dim intErrorCount As Integer = 0 'to keep an error count
If lblSID.Text <> frmOneInstance.lblID.Text Then
intErrorCount += 1
End If
If lblSName.Text <> frmOneInstance.lblName.Text Then
intErrorCount += 1
End If
If intErrorCount > 0 Then
MessageBox.Show("Error count total: " & intErrorCount, "Result", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
MessageBox.Show("All Correct!", "Result", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
End Sub
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i need to pass the address of a vb subroutine (function) to my c++ DLL. this will enable my c++ DLL to call functions in the VB application.
my C++ function accepts the address as a long. I can't figure out how to determine the address of my VB subroutine?
my VB function name is voidFunc
I tried using AddressOf voidFunc, but vb complains that this is improper use of the AdressOf operator.
any ideas how i can get the address of a vb subroutine?
thanks
|
|
|
|
|
nothing wrong with AddressOf
but voidFunc must exist in a standard module..not a form or class module.
|
|
|
|
|
ok this worked great. I added voidFunc to a standard module, and my c++ DLL was able to call the function easily. very nice. thank you very much.
btw. credit to this article for helping me on this:
http://www.flipcode.com/articles/article_vbdlls.shtml
|
|
|
|
|
I've setup a CrystalReport viewer on the form. All is working but I can't scroll with UP,DOWN keys.
pls help me.
|
|
|
|
|
I just change some registery setting
HKEY_CLASSES_ROOT\Directory\Shell to enable select a folder and right click to launch my application with the select folder path as parameter
myapplication.exe %l
it works fine with one folder selected, however when selecting multiple folders and rightclick to launch the application two applications are launching. what can i do?
Shin
|
|
|
|
|
I take it you only want one instance of your application to run no matter how many times it is launched?
Your app is going to have to check to make sure it is the only instance running. It is also going to have to implement some method of communication so you can pass an object, probably containing a String with your filename, from one instance to another.
MSDN has this[^] article that explains one method of doing this. There is a second article[^] that follows up on the first with a bug fix.
Also, CodeProject has this[^] article that takes a different approach.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave,
Thanks for the info and
it is helpfull.
Shin
|
|
|
|
|
Another way would be to create a passer app.
Right-click brings (hidden) start.exe which starts main.exe with info.
Right-click brings (hidden) start.exe which feeds main.exe with info.
The start.exe only feeds main.exe with the info and then quits.
Simply write the info in a file that main.exe opens and monitors.
Why invent the wheel, when you can invent software.
|
|
|
|
|
This in not the method used by other applications with the same capabilities. The methods mentioned in my previous post are the ones used by professional applications simply because those methods are fool proof, easily maintainable, and above all else, supportable.
The target app would have to poll this file on a seperate thread so the user interface would respond. A feature that would be rarely used in the real world, but code would be running for it constantly.
This Start.exe would also have to poll the Process list, every time it was launched, to see if it's target app is running.
While it would work, with a couple holes in it, it's a messy solution...
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
If anyone is interested, this is a link to a document at Microsoft's Patterns and Practices - Improving .NET Application Performance and Scalability[^].
The document is a HUGE guide (about 1,120 pages) full of tips, samples, howto's, and checklists for improving the performance of your code using ASP.NET, ADO.NET, Web Services, ... This doc isn't just for professional coders either. The Noobies can get a bunch of information out of it too. Just reading Chapter 12 on 'Improving ADO.NET Performance' can answer a bunch of the recurring questions on the forums.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How can I change the layout of the keyboard dynamically(e.g from English character to French) in VB .Net
|
|
|
|
|
It can be done, but is not a recommended practice...
Your app can set it's own Keyboard Layout (seperate from the systems) using the ActivateKeyboardLayout , LoadKeyboardLayout , GetKeyboardLayoutList , GetKeyboardLayoutName , and UnloadKeyboardLayout Win32 API functions. The functions will have to be P/Invoked from user32.dll. The constants and structures used be these functions can be found in winuser.h.
Docs on all this stuff start here[^] on MSDN.
[EDIT]
Oh! There is nothing in the .NET BCL that can do this. You must use the Win32 API functions...
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Im in vb.net school.I have read the intoductory book.
I have a little question.
how can i save my data in the registry and use it again.
thanks.
Go forward and never Stop....
|
|
|
|
|
ymohd wrote:
I have a little question.
how can i save my data in the registry and use it again.
thanks.
The registry isn't a recommended way of saving data in .NET, but all the information you need on reading/writing the registry is part of the namespace/class Microsoft.Win32.Registry .
If you do a search on MSDN for that term, you should find some VB.NET examples.
Michael
CP Blog [^]
|
|
|
|
|
Hi Dear...
I struck in a problem & I know you can help me..
I've a pro-merchant account in amazon..& I want to upload Inventory to amazon.. but getting problem..File Error..even from site upload...
Can you send me Execl file you used for that uploading...
+ if possible some coding snippet of uploading invenorty. I want to upload through coding.. send me at:
sumit_kapoor1980@hotmail.com
or chat with me at hotmail account or yahoo: sumit_kapoor1980@yahoo.com
I hope you will help me..
Thanks
Have a Nice Life..
Sumit Kapoor.
---Sumit Kapoor---
|
|
|
|
|
Hi,
On click of Combo box i want another control to open say dbgrid or listview whatever, which will have the remaining values of the table. in combo only one code value will be seen and filled and when i click on the combo it should display me grid showing other values of the table.
Is there any ready made control ready or any start to the making of this control
thanks
Be Humble in Victory and Strong in Defeat. -Het
|
|
|
|
|
Combobox and remaining values of a Table on a DataGrid????????? I fail to see how the ComboBox fits in with the Table...
Are you binding the ComboBox and DatGrid to a DataTable? I don't get why you would pick a record from a table to display in a ComboBox, and then display only the remaining records in a DataGrid.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
its like when i click on combo, instead of normal values filled in the combo, it should display me the the grid which will have other values also apart from the value which is displayed in the combo's text.
actually i got the thing it is at this link
you will get it
http://www.thecodeproject.com/vb/net/multicolumncombo.asp
thanks for the help man
Be Humble in Victory and Strong in Defeat. -Het
|
|
|
|