|
Hi,
If you are using MS Internet controls a.ka Web Browser control then you could use.
In the plethora of constants, the following can be found as a member of SHDocVwCtl.OLECMDID to be used as a parameter to ExecWB...
Const OLECMDID_PRINT = 6
Const OLECMDID_PRINT2 = 49 (&H31)
Const OLECMDID_PRINTPREVIEW = 7
Const OLECMDID_PRINTPREVIEW2 = 50 (&H32)
The Browser control exposes ExecWB which is simply an OLE execution/action method.
for example...
objBrowser.ExecWB OLECMDID_PRINT
Hope this helps.
Regards
Benkku
|
|
|
|
|
The CmdExecOption parameter is not optional so use...
objBrowser.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER
Regards
Benkku
|
|
|
|
|
thank you very much..
I got it
|
|
|
|
|
can someone help exporting from .Net to Visual Basic 6.0??
I'm new to Visual Basic so i created a visual basic code in .net
Imports System.Web.Mail.MailMessage
'Imports CDO
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents buttonSend As System.Windows.Forms.Button
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()
Me.buttonSend = New System.Windows.Forms.Button()
Me.SuspendLayout()
'
'buttonSend
'
Me.buttonSend.Location = New System.Drawing.Point(104, 88)
Me.buttonSend.Name = "buttonSend"
Me.buttonSend.TabIndex = 0
Me.buttonSend.Text = "Button1"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.buttonSend})
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
End Sub
#End Region
'These 3 were added while I was debugging the problem, but they don't seem to help
Dim MailMsg As System.Web.Mail.MailMessage
Dim MailSrvr As System.Web.Mail.SmtpMail
Private Function mail()
MailMsg = New System.Web.Mail.MailMessage()
MailMsg.From = "from@email"
MailMsg.Body = "Test Message!"
MailMsg.Subject = "HI"
MailMsg.To = "person@test.com"
Try
MailSrvr.SmtpServer = "server.com"
MailSrvr.Send(MailMsg)
MsgBox("erfolgreich")
Catch err As Exception
Debug.WriteLine(err.Message)
End Try
End Function
Private Sub buttonSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles buttonSend.Click
mail()
End Sub
End Class
i can't use this code in vb 6.0 like this.
can someone help me find a way to export this code?
Thanx
|
|
|
|
|
You want to convert from .NET BACK to VB 6.0? ! E-Gad man why? As far as I remember VB 6's E-Mailing system was quite different to .NET's. .NET deals with objects and VB 6.0 well... didn't quite do it that way.
I'm not quite sure if it's going to be possible using your current code... But I may be wrong.
Beware the chickens, for in their silence, they plot...
Life is too short to be taken seriously.
-- Oscar Wilde
|
|
|
|
|
Your right, It isn't possible using the code supplied. I don't think vb6 has any mail capability built in for smtp. You will have to use the windows api and roll your own. You can use the outlook framework from vb6, but then you make your code rely on the fact that outlook must be installed.
|
|
|
|
|
thank you for your help,the reason why i want it in vb6.0 is
because vb 6.0 is installed on every workstation so everyone can use the code
.net not
What about VBA? is it possible to send Smtp mail?
Thanx
|
|
|
|
|
I know almost 0 about vba, but I believe it is just a subset of vb6? So I would guess that you would have the same problems. If you have vba though that means you have some of office installed on the users cpu. If you have outlook that might work for you.
|
|
|
|
|
i know,why make it difficult, with outlook is it quite easier
but i don't wanna use outlook.I got it in vb6,hope i can use the code
in vba,but im gonna finish work today I'll try it tomorrow
so anyway thank u
Thanx
|
|
|
|
|
can someone help me sending a email in vb via smtp?
Thanx
|
|
|
|
|
problem solved
Thanx
|
|
|
|
|
I need help on Crystal Reports. Can anyone tell me where I can find a manual on the net that can help me?
|
|
|
|
|
There is built in help for Crystal Reports in VS.NET. I've also found Google to be invaluable, particularly Google Groups. You might have luck at the CrystalDecisions webiste too - there's a lot of stuff there.
--
Ian Darling
|
|
|
|
|
Hi,
I found this really helpful...
http://www.crystalreportsbook.com/
Hope that helps,
Martin
|
|
|
|
|
What are you trying to do exactly? You also might want to try looking in Google groups. The Crystal that comes with .NET is very buggy so if somethings not working it might not be a problem with your code.
Beware the chickens, for in their silence, they plot...
Life is too short to be taken seriously.
-- Oscar Wilde
|
|
|
|
|
I don't have a problem with creating the report itself (it is alot the same as Microsoft Access reports). I don't know how to edit the report at runtime.
When the user selects only a certain group of participants to display (for instance participants with the surname beginning with S...).
How do I use that SQL query to display only the selected people?
|
|
|
|
|
Ohhh ok so you're having a problem with you're SQL statements. The way I use crystal is that I point to a stored proc on my SQL database and pass the parameters to the stored proc. I'm guessing you're building the SQL statement in the crystal report itself. You're going to have to make a parameter and pass that to your SQL statement:
e.g.
CREATE PROCEDURE spGetUsers<br />
@Letter VARCHAR(1)<br />
<br />
AS <br />
<br />
SELECT [Columns] FROM [Users] WHERE[Surname] LIKE @Letter + '%'
Should work - You just have to pass that @Letter varchar to the statement.
Hope this helps - if you need any more help just ask. Isn't there a lecturer at Tukkies?
Beware the chickens, for in their silence, they plot...
Life is too short to be taken seriously.
-- Oscar Wilde
|
|
|
|
|
hello i need help in shuffling playing cards and loading them into an image combo
paakwesinartey
|
|
|
|
|
Sounds like you need a BogoSort[^] algorithm.
--
Ian Darling
|
|
|
|
|
Hi,
I have got a picturebox that displays an image in correspondance with the node selected in a treeview. What i want to do is when a node is renamed for the file that the picturebox is pointing to to also be renamed. The problem i get is the filenotfound exception from the rename. I am pretty sure tho not 100% that this is because the image file is being displayed in the picturebox at the same time that i am trying to rename the file. I have tried makign the picturebox empty as well as trying to use image.dispose() but i cannot seem to get it to work.
Help would be VERY appreciated thanks
Dean
|
|
|
|
|
A PictureBox stores the image at that time and is not tied to the image. For instance, if you changed the image (added a line or something), the changes are not reflected automatically in the PictureBox. This requires change notification.
More than likely, you're not giving a fully resolvable path to the file, which is either a fully-qualified path or a relative path to the current working directory (not necessarily always the directory from which your app is running). The best thing you can do is debug your code using the excellent tools in the IDE. Debugging code is half the battle.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I have a text dispalyed in text box of my application.
I want to search this text and find certain strings only, lets say links only and have them displayed in a new text box of my application.
How can I do that? Please help!
Thank you
|
|
|
|
|
Try the System.Text.RegularExpressions namespace.
Nick Seng (the programmer formerly known as Notorious SMC)
God, I pity me! - Phoncible P. Bone
|
|
|
|
|
Hello every body
Is it possible to change the calling convention of an method in VB.NET ?
If yes how can i do that ?
|
|
|
|
|
can you give an example of what you want to do?
Nick Seng (the programmer formerly known as Notorious SMC)
God, I pity me! - Phoncible P. Bone
|
|
|
|