Folder Lock

Hi folks welcome back,

In corporates and working areas people are not allowed to store unwanted files(Personal folders)

In order to maintain privacy and security i found this useful dos program in an magazine.

Simply save the following text as batch file and double click on it. A new folder named LOCKER  will be created in the

parent folder. You can use it as a brief case to store your files. If you run the batch program again,folder will be hidden.

Even if show all folder option is selected in view menu,the folder will not be shown in public. To open it again run the batch file

it prompts for a password which can be set in the code area.

——————————————————————————————

cls
@ECHO OFF
title Folder Locker
if EXIST “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” goto UNLOCK
if NOT EXIST Locker goto MDLOCKER
:CONFIRM
echo Lock folder Y/N ?
set/p “cho=>”
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Locker “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
attrib +h +s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
echo Folder locked
goto End
:UNLOCK
echo Enter Password
set/p “pass=>”
if NOT %pass%==PASSWORD goto FAIL
attrib -h -s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
ren “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
:End

——————————————————————————————

 

Enjoy the privacy, Happy programming…

 

“Knowledge is for everyone it should be shared “

Extract image from word files


Hi all, I had an requirement to extract images from word files and save it in an folder in ‘jpeg’ format

 
My approach went like this, to make end user easy to work with i made this simple design.
Microsoft.Office.Interop.Word is the main assembly which will be available if MS Office Word is installed.(for developement,
in case of deployment it can be packed with the product)
 
Microsoft.Office.Interop.Word.ApplicationClass wordApp = new ApplicationClass ();
Document doc = wordApp.Documents.Open(ref str1, refmissing, ref yes, ref missing, ref missing, refmissing, ref missing, ref issing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
object wordApp.Visible = false ;
str1 = str;
object missing = System.Reflection. Missing.Value;
object yes = true;
 

 

 

//////////////////////Check whether the word file contains images and proceed to extraction 

 if (doc.InlineShapes.Count > 0)
                    {                    
                        for (int j = 0; j < doc.InlineShapes.Count; j++)
                        {
                            doc.InlineShapes[j].Select();
                            doc.ActiveWindow.Selection.CopyAsPicture();                          
                            IDataObject data = Clipboard.GetDataObject();
                            if (data.GetDataPresent(typeof(System.Drawing.Bitmap)))
                            {
                                object bm = data.GetData(DataFormats.Bitmap);
                                Bitmap bmp;
                                bmp = (Bitmap)data.GetData(typeof(System.Drawing.Bitmap));
                                strcopy.Remove(strcopy.LastIndexOf(“.”));
                                tail = strcopy.Substring(strcopy.LastIndexOf(“\\”) + 1, strcopy.Length – strcopy.LastIndexOf(“\\”) – 5);
                                str.Remove(pos);
                                path = str.Remove(pos) + “\\Extractedimages” + tail;
                                System.IO.Directory.CreateDirectory(path);
                                tail = path;
                                path = path + “\\” + j.ToString() + “.bmp”;
                                bmp.Save(path);
                             
                            }
                        }
                        MessageBox.Show(“images are saved in the folder” + tail);
                        wordApp.Quit(ref missing, ref missing, ref missing);                     
                    }
  


And hurray you are done.The images will be saved in the same location inside a folder with prefix ‘Extracted images’ and the file name.

Navision 4.0 C/SIDE Introduction MB7-221

MB7-221
Navision 4.0 C/SIDE Introduction
TestKingonline. Study Guide.
Get it Here CLICK
INFORMATION FOR EVERYONE.KNOWLEDGE SHOULD BE SHARED

Programming.Microsoft.Dynamics.NAV.Oct.2007 Programming Microsoft® Dynamics™ NAV Packt Publishing

Programming.Microsoft.Dynamics.NAV.Oct.2007
Programming Microsoft® Dynamics™ NAV
Packt Publishing

Its Available here CLICK