





| Public Class Form1 Private Sub btnNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNew.Click If Dialog1.ShowDialog() Then If Dialog1.GetChooseType() = 1 Then AxEDOffice1.CreateNew("Word.Application") ElseIf Dialog1.GetChooseType() = 2 Then AxEDOffice1.CreateNew("Excel.Application") ElseIf Dialog1.GetChooseType() = 3 Then AxEDOffice1.CreateNew("PowerPoint.Application") ElseIf Dialog1.GetChooseType() = 4 Then AxEDOffice1.CreateNew("Visio.Application") ElseIf Dialog1.GetChooseType() = 5 Then AxEDOffice1.CreateNew("MSProject.Application") End If End If End Sub Private Sub btnOpen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOpen.Click AxEDOffice1.OpenFileDialog() End Sub Private Sub btnSaveAs_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSaveAs.Click AxEDOffice1.SaveFileDialog() End Sub Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.Click AxEDOffice1.CloseDoc() End Sub Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click AxEDOffice1.PrintDialog() End Sub Private Sub btnPreview_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPreview.Click AxEDOffice1.PrintPreview() End Sub Private Sub btnToolbars_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnToolbars.Click If AxEDOffice1.Toolbars = True Then AxEDOffice1.Toolbars = False Else AxEDOffice1.Toolbars = True End If End Sub Private Sub btnAbout_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAbout.Click AxEDOffice1.AboutBox() End Sub End Class |


| public void Open() { axEDOffice1.Open(sPath,“Excel.Application”); axEDOffice1.Open(sPath,“PowerPoint.Application”); axEDOffice1.Open(sPath,“Visio.Application”); axEDOffice1.Open(sPath,“MSProject.Application”); } |
Imports Microsoft.Office.Interop.Word Private Sub Automating_Click(ByVal sender As System.Object,ByVal e As System.EventArgs)Handle Automating.Click Dim word = AxEDOffice1.GetApplication() word.Visible = True Dim doc As Document = AxEDOffice1.ActiveDocument() Dim range As Range = doc.Range range.InsertAfter(“Range1”+ vbCrLf) range.Collapse(WdCollapseDirection.wdCollapseEnd) doc.Bookmarks.Add(“MijnBookmark”,range) range.InsertAfter(“Range2”+ vbCrLf) Dim bookmark As Bookmark = doc。书签(1) range = bookmark.Range range.Text =“Bookmark”+ vbCrLf range.Font.Color = WdColor.wdColorBlue End Sub |
DicomEngine.Startup();
using (DicomDataSet ds = new DicomDataSet())
{
//Load DICOM File
ds.Load(input, DicomDataSetLoadFlags.None);
//Initialize J2K Options
DicomJpeg2000Options options = ds.DefaultJpeg2000Options;
//Set Options
options.CompressionControl = DicomJpeg2000CompressionControl.Ratio;
options.CompressionRatio = 50;
//Add options to the dataset
ds.Jpeg2000Options = options;
//Change the transfer syntax to J22K
ds.ChangeTransferSyntax(DicomUidType.JPEG2000, 2, ChangeTransferSyntaxFlags.MinimizeJpegSize);
//Save Dicom file
ds.Save(dest, DicomDataSetSaveFlags.None);
//Shut down the DICOM engine
DicomEngine.Shutdown();
}活动时间:10月1日-10月31日
试用、下载、了解更多产品信息请点击"咨询在线客服"
using System.Windows.Forms; using Leadtools; using Leadtools.Codecs; using Leadtools.WinForms; using Leadtools.Annotations;
RasterImageViewer viewer = new RasterImageViewer();
RasterImage img;
AnnAutomationManager annger;
AnnAutomation automation;private void initControl() {
Support.SetLicense();
viewer.Dock = DockStyle.Fill;
panel1.Controls.Add(viewer);
viewer.HorizontalAlignMode = RasterPaintAlignMode.Center;
viewer.VerticalAlignMode = RasterPaintAlignMode.Center;
loadImage("qwe.jpg");
if (viewer.Image != null)
{
// create and setup the automation manager
annger = new AnnAutomationManager();
// Instruct the manager to create the default (all) automation objects.
annger.CreateDefaultObjects();
// create the toolbar and add it to the form
annger.CreateToolBar();
Controls.Add(annger.ToolBar);
// setup the automation (will create the container as well)
automation = new AnnAutomation(annger, viewer);
// add an event handler for changes to the current designer
automation.CurrentDesignerChanged += new EventHandler(automation_CurrentDesignerChanged);
// setup this automation as the active one
automation.Active = true;
}
toolStripComboBox1.SelectedIndex = 0;
}
private void loadImage(string filename)
{
img = new RasterCodecs().Load(filename);
viewer.Image = img;
}
private void automation_CurrentDesignerChanged(object sender, EventArgs e)
{
AnnAutomation automation = sender as AnnAutomation;
AnnButtonRunDesigner buttonRunDesigner = automation.CurrentDesigner as AnnButtonRunDesigner;
if (buttonRunDesigner != null)
buttonRunDesigner.Run += new EventHandler(buttonRunDesigner_Run);
}private void buttonRunDesigner_Run(object sender, AnnRunDesignerEventArgs e)
{
if (e.OperationStatus == AnnDesignerOperationStatus.End)
{
AnnButtonObject btn = e.Object as AnnButtonObject;
MessageBox.Show(string.Format("Button with text = {0} was clicked!", btn.Text));
}
}
private void loadImage(string filename)
{
img = new RasterCodecs().Load(filename);
viewer.Image = img;
}
private void toolStripComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
annger.UserMode = (toolStripComboBox1.SelectedIndex == 0) ? AnnUserMode.Design : AnnUserMode.Run;
}











2017慧都十四周年狂欢搞事情!砸金蛋100%抽现金红包、满额豪送iPhone X、iPhone 8、DevExpress汉化免费送、团队升级培训套包劲省10万元......更多惊喜等您来探索!

VectorDraw Developer Framework点击下载>>>
| C#: oMailer.BodyHtmlText = @" Test HTML message.
www.afterlogic.com"; |
| VB.NET: oMailer.BodyHtmlText = " Test HTML message. " & vbCrLf & _ "" & vbCrLf & _ " " & vbCrLf & _ " & vbCrLf & _ " & vbCrLf & _ "www.afterlogic.com" |
| C#: oMailer.Message.LoadBodyText(@"http://www.domain.com/index.htm", MessageBodyType.Html); |
| VB.NET: oMailer.Message.LoadBodyText("http://www.domain.com/index.htm", MessageBodyType.Html) |
| C#: oMailer.Message.LoadBodyText(@"C:\Temp\saved_web_page.htm", MessageBodyType.Html); |
| VB.NET: oMailer.Message.LoadBodyText("C:\Temp\saved_web_page.htm", MessageBodyType.Html) |
| C#: oMailer.Message.LoadBodyText(@"http://www.domain.com/index.htm ", MessageBodyType.Html, Encoding.Default, ImportBodyOptions.ImportRelatedFiles| ImportBodyOptions.ImportRelatedFilesFromUris); |
| VB.NET: oMailer.Message.LoadBodyText("http://www.domain.com/index.htm ", _ MessageBodyType.Html, _ Encoding.Default, ImportBodyOptions.ImportRelatedFiles Or _ ImportBodyOptions.ImportRelatedFilesFromUris) |
| C#: using System; using System.Text; using MailBee; using MailBee.SmtpMail; using MailBee.Mime; namespace EmailApp { class Class1 { [STAThread] static void Main(string[] args) { Smtp oMailer = new Smtp(); oMailer.To.AddFromString("Bill Smith "); oMailer.From.AsString = "John Doe (Company Info)"; oMailer.Subject = "Test web page"; oMailer.Message.LoadBodyText(@"http://www.domain.com/index.htm", MessageBodyType.Html, Encoding.Default, ImportBodyOptions.ImportRelatedFiles | ImportBodyOptions.ImportRelatedFilesFromUris); try { oMailer.Send(); Console.WriteLine("The message has been successfully sent."); } catch (MailBeeSmtpMessageSizeOutOfRangeException e) { Console.WriteLine("The message is too large (more than " + e.MaxAllowedMessageSize + " bytes)."); } } } } |
| VB.NET: Imports System Imports System.Text Imports MailBee Imports MailBee.SmtpMail Imports MailBee.Mime Namespace EmailApp Class Class1 _ Shared Sub Main(ByVal args() As String) Dim oMailer As Smtp = New Smtp() oMailer.To.AddFromString("Bill Smith ") oMailer.From.AsString = "John Doe (Company Info)" oMailer.Subject = "Test web page" oMailer.Message.LoadBodyText("http://www.domain.com/index.htm", MessageBodyType.Html, Encoding.Default, ImportBodyOptions.ImportRelatedFiles | ImportBodyOptions.ImportRelatedFilesFromUris) Try oMailer.Send() Console.WriteLine("The message has been successfully sent.") Catch e As MailBeeSmtpMessageSizeOutOfRangeException Console.WriteLine("The message is too large (more than " + e.MaxAllowedMessageSize + " bytes).") End Try End Sub End Class End Namespace |
