valadi
-
Posts
40 -
Joined
-
Last visited
-
Days Won
2
Content Type
Profiles
Forums
Events
Posts posted by valadi
-
-
-
عید سعید فطر مبارک
-
Hi,
This is a sample of the easiest way to use under UniGUI the notification utility developed by http://www.eirik.net/Ext/ux/window/Notification.html .
It also uses the alwaysOnTop feature (http://forums.unigui.com/index.php?/topic/3027-simple-tip-alwaysontop-feature-for-windows-and-forms/) to ensure that the notification is always visible and do not disappear behind any form...
Regards,
Thanks
what change fonts notification ?
-
Hi,
For now, I tried to display the doc, but it is works only in IE and with some "limitations" too...
1. Add the Website: https://www.edrawsoft.com in the IE Trust Site List
2. UniHTMLFrame1.HTML...
<object classid="clsid:7677E74E-5831-4C9E-A2DD-9B1EF9DF2DB4" id="OA1" width="100%" height="100%" codebase="https://www.edrawsoft.com/download/officeviewer.cab#7,5,0,355"> <param name="Toolbars" value="-1"> <param name="BorderColor" value="15647136"> <param name="BorderStyle" value="2"> </object>
3. UniHTMLFrame1.AfterScript...
document.all.OA1.Open("http://" + window.location.hostname + ":8077/files/uniGUI.docx", "Word.Application")
Result:
Best regards.
thanks
how do add function in UniHTMLFrame1.HTML OR add function use unibutton
<DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Edraw Office Viewer Component Demo - EdrawSoft</title>
<style>
<!--
.Hlink {cursor: hand; text-decoration: underline; color: #0066CC; font-weight:normal;}
-->
</style>
</head>
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--
function CreateWord()
{
document.all.OA1.CreateNew("Word.Application");
}
function CreateExcel()
{
document.all.OA1.CreateNew("Excel.Application");
}
function CreatePpt()
{
if(document.all.OA1.CreateNew("PowerPoint.Application") == false)
{
window.alert("Failed to create powerpoint instance. Please shut off others ms office instance in the task manager. Add the demo site in the IE Trust Site List.");
}
}
function OpenFromLocal()
{
if(document.all.OA1.OpenFileDialog() == false)
{
window.alert("Failed to open file. Please shut off the bad ms office instances in the task manager.");
}
//You can call the Open method to open silently.
}
function OpenFromServer()
{
var sPath= window.prompt("Type the file url:", "http://www.ocxt.com/demo/samples/sample.doc");
document.all.OA1.Open(sPath);
//document.all.OA1.Open(sPath, "Word.Application");
//document.all.OA1.Open(sPath, "Excel.Application");
//document.all.OA1.Open(sPath, "PowerPoint.Application");
//document.all.OA1.Open(sPath, "Visio.Application");
//document.all.OA1.Open(sPath, "MSProject.Application");
}
function PrintDoc()
{
if(document.all.OA1.IsOpened()){
document.all.OA1.PrintDialog();
}
}
function PrintPreview()
{
if(document.all.OA1.IsOpened()){
document.all.OA1.PrintPreview();
}
}
function ProtectDoc()
{
if(document.all.OA1.GetCurrentProgID() != "PowerPoint.Application")
{
if(document.all.OA1.IsOpened()){
if(document.all.OA1.GetCurrentProgID() == "Word.Application"){
document.all.OA1.ProtectDoc(2);//wdAllowOnlyFormFields
}
else if(document.all.OA1.GetCurrentProgID() == "Excel.Application"){
document.all.OA1.ProtectDoc(1);
}
}
}
else
{
document.all.OA1.SlideShowPlay(true);
}
}
function UnProtectDoc()
{
if(document.all.OA1.GetCurrentProgID() != "PowerPoint.Application")
{
if(document.all.OA1.IsOpened())
{
document.all.OA1.UnProtectDoc();
}
}
else
{
document.all.OA1.SlideShowExit();
}
}
function DocIsDirty()
{
if(document.all.OA1.IsOpened()){
if(document.OA1.IsDirty)
{
window.alert("The file has been modified!");
}
else{
window.alert("The file hasn't been modified!");
}
}
}
function ShowHideToolbar()
{
if(document.all.OA1.IsOpened()){
var x = document.OA1.Toolbars;
document.OA1.ShowMenubar(! x);
document.OA1.Toolbars= ! x;
}
}
function DisableHotKey()
{
if(document.all.OA1.GetCurrentProgID() == "Word.Application"){
if(document.all.OA1.IsOpened()){
document.all.OA1.WordDisableSaveHotKey(true);
document.all.OA1.WordDisablePrintHotKey(true);
document.all.OA1.WordDisableCopyHotKey(true);
}
}
else if(document.all.OA1.GetCurrentProgID() == "Excel.Application")
{
document.all.OA1.WordDisableSaveHotKey(true);
document.all.OA1.WordDisablePrintHotKey(true);
document.all.OA1.WordDisableCopyHotKey(true);
}
else
{
}
}
function DisableRightClick()
{
if(document.all.OA1.IsOpened()){
document.all.OA1.DisableViewRightClickMenu(true);
}
}
function SaveAs()
{
if(document.all.OA1.IsOpened()){
document.all.OA1.SaveFileDialog();
}
}
function SavetoServer()
{
if(document.OA1.IsOpened)
{
document.OA1.SetAppFocus();
document.OA1.HttpInit();
var sFileName = document.OA1.GetDocumentName();
document.OA1.HttpAddPostOpenedFile (sFileName); //save as the same file format with the sFileName then upload
//document.OA1.HttpAddPostOpenedFile (sFileName, 16); //save as docx file then upload
//document.OA1.HttpAddPostOpenedFile (sFileName, 0); //save as doc file then upload
//document.OA1.HttpAddPostOpenedFile (sFileName, -4143); //save as xls file then upload
//document.OA1.HttpAddPostOpenedFile (sFileName, 51); //save as xlxs file then upload
document.OA1.HttpPost("http://www.ocxt.com/demo/upload_weboffice.php");
if(document.OA1.GetErrorCode() == 0 || document.OA1.GetErrorCode() == 200)
{
var sPath = "Save successfully! You can download it at http://www.ocxt.com/demo/"+ sFileName;
window.alert(sPath);
}
else
{
window.alert("you need enable the IIS Windows Anonymous Authentication if you have not set the username and password in the HttpPost method. you need set the timeout and largefile size in the web.config file.");
}
}
else{
window.alert("Please open a document firstly!");
}
}
function CloseDoc()
{
if(document.OA1.IsOpened)
{
document.all.OA1.ExitOfficeApp();
}
}
function VBAProgramming()
{
if(document.OA1.IsOpened)
{
if(document.all.OA1.GetCurrentProgID() == "Word.Application"){
var objWord = document.OA1.ActiveDocument;//Word _Document VBA Interface
var range = objWord.Range(0,0);
var WTable = objWord.Tables.Add(range, 3,3);
WTable.Cell(1,1).Range.Font.Name = "Times New Roman";
WTable.Cell(1,1).Range.Text = "Automation 1";
WTable.Cell(1,2).Range.Font.Size = 18;
WTable.Cell(1,2).Range.Bold = true;
WTable.Cell(1,2).Range.Font.Italic = true;
WTable.Cell(1,2).Range.Text = "Automation 2";
WTable.Cell(2,1).Range.ParagraphFormat.Alignment = 1; // 0= Left, 1=Center, 2=Right
WTable.Cell(2,1).Range.Font.Name = "Arial";
WTable.Cell(2,1).Range.Font.Size = 12;
WTable.Cell(2,1).Range.Bold = false;
WTable.Cell(2,1).Range.ParagraphFormat.Alignment = 2;
WTable.Cell(3,3).Range.Font.Name = "Times New Roman";
WTable.Cell(3,3).Range.Font.Size = 14;
WTable.Cell(3,3).Range.Bold = true;
WTable.Cell(3,3).Range.Font.Underline = true;
WTable.Cell(3,3).Range.ParagraphFormat.Alignment = 0;
WTable.Cell(3,2).Range.Text = "Automation 3";
}
else if(document.all.OA1.GetCurrentProgID() == "Excel.Application"){
var objExcel = document.OA1.GetApplication();//Excel _Application VBA Interface
var worksheet = objExcel.ActiveSheet;
worksheet.cells(1,1).value ="100";
worksheet.cells(1,2).value ="101";
worksheet.cells(1,3).value ="102";
worksheet.cells(2,1).value ="103";
worksheet.cells(2,2).value ="104";
worksheet.cells(2,3).value ="105";
}
else if(document.all.OA1.GetCurrentProgID() == "PowerPoint.Application"){
var ppt = document.OA1.GetApplication();//PowerPoint _Application VBA Interface
var cap = ppt.Caption;
window.alert(cap);
}
else if(document.all.OA1.GetCurrentProgID() == "Visio.Application"){
var vx = document.OA1.GetApplication();//Visio IVApplication VBA Interface
var path = vx.Path;
window.alert(path);
}
else if(document.all.OA1.GetCurrentProgID() == "MSProject.Application"){
var pj = document.OA1.GetApplication();//Project _MSProject VBA Interface
var name = pj.Caption();
window.alert(name);
}
}
}
function OA1_NotifyCtrlReady()
{
//document.OA1.ShowRibbonTitlebar (false);
//document.OA1.ShowMenubar (false);
//document.OA1.Toolbars = false;
//If you want to open a document when the page loads, you should put the code here.
//document.all.OA1.Open("http://www.ocxt.com/demo/samples/sample.doc");
document.OA1.LicenseName = "";
document.OA1.LicenseCode = "";
}
function OA1_BeforeDocumentOpened()
{
document.OA1.DisableFileCommand(1, true);//wdUIDisalbeOfficeButton
document.OA1.DisableFileCommand(2, true);//wdUIDisalbeNew
document.OA1.DisableFileCommand(4, true);//wdUIDisalbeOpen
document.OA1.DisableFileCommand(16, true);//wdUIDisalbeSave
document.OA1.DisableFileCommand(32, true);//wdUIDisalbeSaveAs
document.OA1.DisableFileCommand (512,true); //wdUIDisalbePrint (Ctrl+P) PES,PCT,CON
document.OA1.DisableFileCommand (1024, true); //wdUIDisalbePrintQuick
document.OA1.DisableFileCommand (2048, true); //wdUIDisalbePrintPreview
}
function OA1_DocumentOpened()
{
//You can do the office automation here
//var objWord = document.OA1.ActiveDocument;
//objWord.Content.Text = "You can do the office Automation with the Edraw Viewer Component.";
document.all.OA1.SetAppFocus();
}
function OA_DocumentBeforePrint()
{
//window.alert("OA_DocumentBeforePrint");
//document.OA1.DisableStandardCommand(4, true);//cmdTypePrint = 0x00000004, the line code will prevent the print
}
function OA_WindowBeforeRightClick()
{
//window.alert("OA_WindowBeforeRightClick");
//document.OA1.DisableStandardCommand(8, true);//cmdTypeRightClick = 0x00000008, the line code will prevent the right click
}
function OA_BeforeDocumentSaved()
{
//window.alert("OA_BeforeDocumentSaved");
//document.OA1.DisableStandardCommand(1, true);//cmdTypeSave = 0x00000001, the line code will prevent the save
}
//-->
</SCRIPT>
<script language="javascript">
window.onbeforeunload = function()
{
document.all.OA1.ExitOfficeApp();
}
</script>
<SCRIPT LANGUAGE=javascript FOR=OA1 EVENT=NotifyCtrlReady>
<!--
OA1_NotifyCtrlReady();
//-->
</SCRIPT>
<script language="javascript" for="OA1" event="DocumentOpened()">
OA1_DocumentOpened();
</script>
<script language="javascript" for="OA1" event="BeforeDocumentOpened()">
OA1_BeforeDocumentOpened();
</script>
<script language="javascript" for="OA1" event="DocumentBeforePrint()">
OA_DocumentBeforePrint();
</script>
<script language="javascript" for="OA1" event="BeforeDocumentSaved()">
OA_BeforeDocumentSaved();
</script>
<script language="javascript" for="OA1" event="WindowBeforeRightClick()">
OA_WindowBeforeRightClick();
</script>
<body>
<table border="1" width="100%" height="100%" id="table1" bordercolorlight="#008080" bordercolordark="#008080" cellspacing="1">
<tr>
<td bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" style="height: 33px">
<p align="center"><b><font face="Verdana" size="5" color="#008080">
Edraw Office Viewer Component Demo</font></b><p align="center">Please
Add the Website in the IE Trust Site List.</td>
<td bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" style="height: 33px"></td>
</tr>
<tr>
<td bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" rowspan="18" width="81%">
<object classid="clsid:7677E74E-5831-4C9E-A2DD-9B1EF9DF2DB4" id="OA1" width="100%" height="100%" codebase="http://www.edrawsoft.com/download/officeviewer.cab#version=8,0,0,715">
<!-- NOTE: The officeviewer.cab file in edrawsoft.com is the trial version. If you have the full version, you should upload the officeviewer.cab file to your own site. Then change the codebase.//-->
<param name="Toolbars" value="-1">
<param name="LicenseName" value="30daytrial">
<param name="LicenseCode" value="EDWD-3333-2222-1111">
<param name="BorderColor" value="15647136">
<param name="BorderStyle" value="2">
</object>
<script language="JavaScript" type="text/javascript" src="NoIEActivate.js"></script>
</td>
</tr>
<tr>
<td bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" width="17%">
<div class="Hlink" onClick="CreateWord()">
Create Word</div>
</td>
</tr>
<tr>
<td bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" width="17%">
<div class="Hlink" onClick="CreateExcel()">
Create Excel</div>
</td>
</tr>
<tr>
<td bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" width="17%">
<div class="Hlink" onClick="CreatePpt()">
Create PowerPoint</div>
</td>
</tr>
<tr>
<td bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" width="17%">
<div class="Hlink" onClick="OpenFromLocal()">
Open From Local</div>
</td>
</tr>
<tr>
<td bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" width="17%">
<div class="Hlink" onClick="OpenFromServer()">
Open From Server</div>
</td>
</tr>
<tr>
<td bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" width="17%">
<div class="Hlink" onClick="ShowHideToolbar()">
Show Hide Toolbar</div>
</td>
</tr>
<tr>
<td bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" width="17%">
<div class="Hlink" onClick="DocIsDirty()">
Is Modified</div>
</td>
</tr>
<tr>
<td bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" width="17%">
<div class="Hlink" onClick="DisableHotKey()">
Disable Hot Key</div>
</td>
</tr>
<tr>
<td bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" width="17%">
<div class="Hlink" onClick="PrintDoc()">
Print Doc</div>
</td>
</tr>
<tr>
<td bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" width="17%">
<div class="Hlink" onClick="PrintPreview()">
Print Preview</div>
</td>
</tr>
<tr>
<td bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" width="17%">
<div class="Hlink" onClick="ProtectDoc()">
Protect Doc</div>
</td>
</tr>
<tr>
<td bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" width="17%">
<div class="Hlink" onClick="UnProtectDoc()">
Cancel Protect</div>
</td>
</tr>
<tr>
<td bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" width="17%">
<div class="Hlink" onClick="DisableRightClick()">
Disable Right Click</div>
</td>
</tr>
<tr>
<td bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" width="17%">
<div class="Hlink" onClick="SaveAs()">
Save As</div>
</td>
</tr>
<tr>
<td bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" width="17%">
<div class="Hlink" onClick="SavetoServer()">
Save to Server</div>
</td>
</tr>
<tr>
<td bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" width="17%">
<div class="Hlink" onClick="CloseDoc()">
Close Doc</div>
</td>
</tr>
<tr>
<td bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" width="17%">
<div class="Hlink" onClick="VBAProgramming()">
Office Automation</div>
</td>
</tr>
</table>
<p>Please make sure your computer has installed the Microsoft Office. If you
find any question or suggest, please feel free to <a href="http://www.ocxt.com/">
contact us</a>.</p>
</body>
</html>
-
plz upload sample code Office Viewer Component with Unigui
-
thanks
delphidude -
Can do add all Datepicker Renderers
in unigui
There are many different calendars used throughout the world. This plugin aims to make them accessible in JavaScript in a consistent manner. The basic modules provide the underlying calendar support, while the picker module builds a generic datepicker on top of this functionality.
-
Thanks Delphi Developer
Can do add all Datepicker Renderers
in unigui
There are many different calendars used throughout the world. This plugin aims to make them accessible in JavaScript in a consistent manner. The basic modules provide the underlying calendar support, while the picker module builds a generic datepicker on top of this functionality.
-
To MainForm.Scrpits add:
Ext.override(Ext.DatePicker, { initComponent: Ext.DatePicker.prototype.initComponent.createInterceptor(function() { this.plugins = [Ext.ux.JalaliDatePlugin]; return(true); }) });
To ServerModule.CustomFiles addfiles\Jalali\Jalali.js files\Jalali\JalaliDate.js files\Jalali\JalaliDatePlugin.js files\Jalali\JalaliDatePlugin-fa_IR.js
This will change all DatePicker instances in your app to jalali calendar.not work loop loading ....
plz make sample code
-
thanks
but no view image file
plz make movie and upload youtube
-
how add charter star in edit box in site https://prime.fmsoft.net/userv/mportal.dll
plz view Image file
- 1
-
How user connect to application online (IP , count user,etc )?
-
thanks
but not work code
-
-
-
how do Solution Appointment ??
-
in form1 in Unigui component
procedure TUniLoginForm1.UniButton3Click(Sender: TObject); begin .... UniForm6.UniComboBox1.Text:=UniServerModule.MSQuery1.FieldValues['Device']; UniForm6.UniEdit1.Text:=UniServerModule.MSQuery1.FieldValues['ip']; .... end;
when click UniButton3 Appointment
1) Erorr show massage from must be shown after its is created ,
2) UniForm6 show model
two problem
Now vcl application delphi show not show massage , not show model not problem
-
how change show massage delete record caption in dbgrid
1 . delete record
2. button Yes
3. button no
-
Thanks
-
Yes i have
Now I using trial edition
-
Thanks
-
thanks
Delphi Developer
now
how change caption button ok in show massage ??
-
how change font Header mainmenu ?
-
after you call showmessage add this
UniSession.AddJS('$("span#messagebox-1001_header_hd-textEl").html("Your Caption");');
thanks
but not work code
plz check
Alert with delay
in Sample Projects
Posted
RTL Support?