DirectoryComputersBlog Details for "Open Blog"

Open Blog

Open Blog
Open Blog for dot net programer and PHP developers and also web masters and Google Adsense
Articles: 1, 2, 3, 4, 5, 6, 7

Articles

RFC Remote Function Call
2008-02-01 17:21:00
A remote function call RFC enables a computer to execute a program an a different computer within the same LAN, WAN or Internet network. RFC is a common UNIX feature, which is foundalso in other object-oriented operating systems. R/3 provides special DLLs for WINDOWS, NTand UNIX to allow RFC calls from and to R/3.A Remote Function Call enables a computer to execute a program an another computer. Thecalled program is executed locally on the remote computer using the remote computer’senvironment, CPU and data storage.Remote function call is one of the great achievements of TCP/IP networks. Every computer within the network can accept an RFC-call and decides whether it wants to execute the request. Every modern FTP server implementation includes the RFC calling feature.A classical network server stores the program code in a central location. When the program is called, the code will be transported via the network to the calling computer workstation and executed on the calling compute...
ABAP MULTIPLE INTERACTIVE REPORT SAMPLE CODE 2
2008-02-01 17:19:00
*TABLES DECLARATIONTABLES : KNA1, VBAK, VBAP.*SELECT OPTIONSSELECT-OPTIONS: CUST_NO FOR KNA1-KUNNR.*INITIALIZATIONINITIALIZATION. CUST_NO-LOW = '01'.CUST_NO-HIGH = '5000'.CUST_NO-SIGN = 'I'.CUST_NO-OPTION = 'BT'.APPEND CUST_NO.*SELECTION SCREEN VALIDATIONAT SELECTION-SCREEN ON CUST_NO.LOOP AT SCREEN.IF CUST_NO-LOW 5000.MESSAGE E001(ZTJ1).ENDIF.ENDLOOP.*BASIC LIST SELECTIONSTART-OF-SELECTION.SELECT KUNNR NAME1 ORT01 LAND1 INTO(KNA1-KUNNR, KNA1-NAME1,KNA1-ORT01,KNA1-LAND1)FROM KNA1WHERE KUNNR IN CUST_NO.WRITE:/1 SY-VLINE,KNA1-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,16 SY-VLINE,KNA1-NAME1 UNDER 'NAME',61 SY-VLINE,KNA1-ORT01 UNDER 'CITY',86 SY-VLINE,KNA1-LAND1 UNDER 'COUNTRY',103 SY-VLINE.HIDE: KNA1-KUNNR.ENDSELECT.ULINE.*SECONDARY LIST ACCESSAT user-command.IF SY-UCOMM = 'IONE'.PERFORM SALES_ORD.ENDIF.IF SY-UCOMM = 'ITWO'.PERFORM ITEM_DET.ENDIF.*TOP OF PAGETOP-OF-PAGE.FORMAT COLOR 1.WRITE : 'CUSTOMER DETAILS'.FORMAT COLOR 1 OFF.ULINE.FORMAT COLOR 3.WRITE : 1 SY-VLIN...
More About: Interactive , Report , Code , Sample , Interact
Change the computer name
2007-12-26 17:32:00
This will help you to change the computer name.Works with VB6 and .netThe Code:Declare Function SetComputer Name Lib "kernel32" _Alias "SetComputerNameA" (ByVal lpComputerName As String) As _Long Public Function Change ComputerName(sNewComputerName As String) _As BooleanOn Error Resume NextDim nReturn As LongnReturn = SetComputerName(sNewComputerName)If Err.Number = 0 Then ChangeComputerName = nReturn 0End IfEnd FunctionOmar Abid Blog
Age Calculation with VB6 or .net
2007-12-26 17:31:00
This is a simple utility to calculate age. e.g, if the age is 4 months then it will display in months, if age is 2 years it will display in years. Example of the DateDiff funtion in VB.'Just place a command button and text box controls on your form.'Enter a date of birth in the text box and it will calculate age based on the current date.Private Sub Command1_Click()If (Int(DateDiff("y", CDate(Text1.Text), Date)) / 365.25) > 1 Then MsgBox Round((Int(DateDiff("y", CDate(Text1.Text), Date)) / 365.25)) & " Years"Else MsgBox (Mid((Int(DateDiff("y", CDate(Text1.Text), Date)) / 365.25), 1, 3)) * 10 & " Months"End IfEnd SubOmar Abid Blog
A Sript to autodetect and map printers
2007-12-26 17:29:00
This is part of a login script, used to automatically map printers in an Active Directory environment. It makes use of permissions set on the printer and active directory group assignments to work properly. If you have a printer ?Kappa? that only ?Site B? can print to, assign the ?Site B? group with the ability to print, and remove the everyone entry. By creating an active directory group called ?Kappa? consisting of people that can access the above said printer, this script will automatically set this printer to be their default. As a side note, the IsMember() function works recursively, allowing for nested group memberships.The Script :Set WSHNetwork = Wscript.CreateObject("Wscript.Network")' set the local print server name hereSet servName = "printserv"' remove old printers hereset cprinter=WSHnetwork.enumprinterconnection sfor i=cprinter.count-1 to 1 step -2on error resume next if instr(cprinter.item(i),"[")0 or instr(cprinter.item(i),"")0 then WSHnetwork.removeprint...
More About: Printers
Google Adsense
2007-12-26 16:21:00
Adsense is a contextual advertisement program run by Google , and I'm sure you've seen "Ads by Google" on a variety of websites (this is adsense in action). To get enlisted in Adsense is actually simpler that you might think. What you need to do is to create a blog (or site), publish some content (no junk please), and apply for Adsense.Once approved, you can start making money without having to do that much. Just paste the code that Google gives you into your web-page and away you go. The code they give you is what creates the ads on your blog, or website. And when someone clicks on these ads they go to the advertiser's site listed in the adsense ads. The advertiser is then charged per-click by Google, then Google pays you a share of the money they get. It's as easy as that - and all done for you as part of the Adsense great service.I mentioned "contextual advertisement" previously, what this means is that Adsense is smart enough to deliver ads that are relevant to your content a...
More About: Adsense , Google Adsense
Google Groups Traffic for blogs and sites
2007-12-26 16:05:00
Did you know that Google Groups can make for your blog more than 500 visitors daily for 1 week in just 3 hours ?It can be strange, Google part ? Yes I made about 150 visitors in the first time and it was really strange. Google Groups will give you high traffic!How to do:first you need a Google Account then redirect to http://groups.google.com/There start posting, try to use a good title and make your link appearent.People that comes to the group will open and diret to your blog and then you get new visitors.Strategy : Post only in groups that have a large number of members.More : Google sendby email your post to members (thar registred to email posts!) This will help you make extra visitors.Quantity : 1 post can make 5 visitors in a 1000 members group.Try to make as much as you can to get extra visitors.Famous Groups:http://groups.google.com/group/Blo gger-Reviewhttp://groups.google.com/group /grkisthttp://groups.google.com/group/sap 2jobshttp://groups.google.com/group/Free- Ads-For-Yo...
More About: Traffic , Blogs , Sites
Add and Retrieve Multiple Values to the Registry
2007-12-26 13:12:00
This demo shows how to add and retrieve multiple settings to the registry. The two encapsulated procedures make it easy to quickly add these functions to any app. The demo uses the code for storing to the registry and showing most recently accessed files. It insures only one occurrence of a given value and arranges the values with the most currently accessed value on top.Download SampleOmar Abid Blog
More About: Registry , Values
Registry Handler for VB6
2007-12-26 13:08:00
Methods: - DeleteKey --> Deletes key AND all underlying keys- DeleteValue- EnumKeys --> Enumerate all keys from a specified key- EnumValues --> Enumerate all values from a specified key- GetRegValue --> Reads a value from any specified key- WriteRegValue --> Writes a value to any specified keyDownload SampleOmar Abid Blog
More About: Registry
Register/ Unregister Multiple OCXs/DLLs at The Same Time
2007-12-26 13:06:00
This utility allows you to register or unregister 1 or more self-registering Dlls and ocx's at the same time.Download SampleOmar Abid Blog
More About: Time , Register
Read and modify the registry
2007-12-26 13:04:00
Modifying the registry with VB.net is quite easy but with VB 6 and VB 5 it's difficult so I browse and found this sample that can helps you.Download SampleOmar Abid Blog
More About: Registry , Read , Modify
Call Webservice from VB6
2007-12-26 13:01:00
I needed to call a webservice I built in C# from an old application made in VB6. Using SOAP was not an option, so I decided to use MSXML2 to prepare and send my own XML code. MSXML2 comes with IE6, and most users already have it installed, but just in case, I used late binding for MSXML2. Comments preceed each block of code. See comments in Command1_Click method for further details.Private Sub Command1_Click() ' Start Internet Explorer and type in the url of your webservice page ' i.e.: http://localhost/myweb/mywebService.asmx ' In that page, click on the link to the method you want to call from your application ' Select in upper POST section the xml code from ' Copy this into the strXml variable, escape all quotes and replace "string" your parameter value ' Copy the url to your webservice page (asmx) to the strUrl variable ' Copy the SOAPAction value to the strSoapAction variable Dim strSoapAction As String Dim strUrl As String Dim strXml As St...
More About: Call
Calling an API Function From VB.NET
2007-12-26 12:59:00
This snippet calls the GetSystemDirectory API function in VB.NET and shows how to use the StringBuilder class to create a string buffer for API functions that require it. See comments within code for more information.Put this at the top of your module.'Required in all cases when calling API functionsImports System.Runtime.InteropServices'Required in this example and any API function which'use a string buffer. Provides the StringBuilder classImports System.Text'Put these declarations right under the class declaration'(e.g., in a Form, right under Public Class Form1) SetLastError:=True, CharSet:=CharSet.Unicode, _ ExactSpelling:=True, _ Calling Convention:=CallingConvention.StdC all)> _ Public Shared Function GetSystemDirectory(ByVal Buffer _ As StringBuilder, ByVal Size As Integer) As Long ' Leave function empty - DLLImport attribute ' forces calls to GetSystemDirectory to ' be forwarded to GetSystemDirectory in KERNEL32.D...
Accessing LDAP using VB.NET
2007-12-26 12:57:00
Option Explicit OnImports System.DirectoryServices Public Function GetLDAPUsers(ByVal ldapServerName As String, ByVal pFindWhat As String) As ArrayList Dim oSearcher As New DirectorySearcher Dim oResults As SearchResultCollection Dim oResult As SearchResult Dim RetArray As New ArrayList Dim mCount As Integer Dim mIdx As Integer Dim mLDAPRecord As String Dim ResultFields() As String = {"securityEquals", "cn"} Try With oSearcher .SearchRoot = New DirectoryEntry("LDAP://" & ldapServerName & _ "/dc=lippogeneral,dc=com") .PropertiesToLoad.AddRange(ResultFields) .Filter = "cn=" & pFindWhat & "*" oResults = .FindAll() End With mCount = oResults.Count If mCount > 0 Then For Each oResult In oResults mLDAPRecord = oResult.GetDirectoryEntry().Properties("c n").Value &am...
A Function To Simplify ExecuteNonQuery Statements
2007-12-26 12:56:00
Use this function to simplify ExecuteNonQuery. Normally, you need to setup a command and connection objects, which this code does. Just pass the SQL statement and the connection object that points to your database.Function ExecuteSQL(ByVal sSQL As String, ByVal dbOLE As OleDb.OleDbConnection) As Integer Dim command As New OleDb.OleDbCommand(sSQL, dbOLE) If command.Connection.State = ConnectionState.Closed Then command.Connection.Open() Command.CommandType = CommandType.Text ExecuteSQL = command.ExecuteNonQuery() command.Connection.Close() Application.DoEvents()End FunctionOmar Abid Blog
More About: Temen
Get a list of all Fonts
2007-12-26 12:54:00
'This will get all of the available fonts on the computer and add 'them to the 'cmbFont' combobox control. Dim f As System.Drawing.Text.InstalledFontCollecti on = New _ System.Drawing.Text.InstalledFontCollecti on Dim fFamily As FontFamily For Each fFamily In f.Families lst.Items.Add(fFamily.Name) NextOmar Abid Blog
More About: List , Fonts , A list
Remove Extra Space from a string
2007-12-26 12:52:00
Quickly remove extra whitespace from inside a string.Function fSQLSpalten(ByVal sSpaltenZeile$) As String sSpaltenZeile = Trim(sSpaltenZeile) Do While InStr(1, sSpaltenZeile, " ") > 0 sSpaltenZeile = fReplace(sSpaltenZeile, " ", " ") Loop fSQLSpalten = sSpaltenZeileEnd FunctionOmar Abid Blog
More About: Space , Extra
Auto File BackUp with VB.net
2007-12-26 12:51:00
This code keeps backup of three different locations at a time in regular interval as per set by the user. It also works through network.'For this Application you need:'1. 3 Check Boxes.'2. 6 text Boxes.'3. 5 Command Buttons.'4. 3 Combo Boxes.'5. 6 Progressbar Controls.'6. 3 File List Box Controls.'7. 1 ImageList control.'8. 3 Timer Controls'N.B:(Controls that are directly involved with the code is mentioned above.)Dim fln, root, fld, val, val1, val2 As StringPrivate Sub Check1_Click()On Error GoTo err:If Check1.Value = 1 Then Text1.Enabled = True Text4.Enabled = True Text1.SetFocusElse Text1.Enabled = False Text4.Enabled = FalseEnd IfExit Suberr: MsgBox err.Description, vbCriticalEnd SubPrivate Sub Check2_Click()On Error GoTo err:If Check2.Value = 1 Then Text2.Enabled = True Text5.Enabled = True Text2.SetFocusElse Text2.Enabled = False Text5.Enabled = FalseEnd IfExit Suberr: MsgBox err.Description, vbCriticalEnd SubPrivate Sub Check3_Click()On...
More About: Backup , Auto
Open Acrobat Reader
2007-12-26 12:48:00
How to open Acrobat in One click !Imports System.DiagnosticsPublic Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim proc As New Process() With proc.StartInfo .Arguments = "Your PDF Path eg:- C:MyFilesEbook2007.pdf" .UseShellExecute = True .WindowStyle = ProcessWindowStyle.Maximized .WorkingDirectory = "C:Program FilesAdobeReader 8.0Reader" ' .FileName = "AcroRd32.exe" ' End With proc.Start() proc.Close() proc.Dispose() End SubEnd ClassOmar Abid Blog
More About: Open , Acrobat Reader
List View Example
2007-12-26 12:47:00
This code will sum-up the value of a listview and save the entire list of a listview in just one click.Dim scon As ADODB.ConnectionDim srec As ADODB.RecordsetDim slist As List ItemDim sum As DoublePrivate Sub Command2_Click()Dim sql As StringDim xsum = 0For x = 1 To ListView 1.ListItems.Countsum = sum + CDbl(ListView1.ListItems.Item(x).SubItems (2)) sql = "insert into salary2 (idno,name,salary) values " sql = sql & "(" & CLng(ListView1.ListItems.Item(x)) & ",'" sql = sql & ListView1.ListItems.Item(x).SubItems(1) & "'," sql = sql & CDbl(ListView1.ListItems.Item(x).SubItems (2)) & ")" scon.Execute sqlNext x Set slist = ListView1.ListItems.Add(, , " ") Set slist = ListView1.ListItems.Add(, , "") slist.SubItems(1) = "Total is==> P" slist.SubItems(2) = Format(sum, "##,##0.00") MsgBox "save record"End SubPrivate Sub Form_Load() Set scon = New ADODB.Connection scon.Open "Provider=microsoft...
Upload file with ASP.NET
2007-12-26 12:47:00
emember to import the system.file namespaceAlso you will have to add a upload file server control to your html code. Like this.The Code :If File Upload 1.HasFile ThenFileUpload1.SaveAs(Server.MapPath("Th e_Name_Of_The_File"))End IfOmar Abid Blog
Prime Number Generation
2007-12-26 12:45:00
A console ApplicationModule Module1 Sub Main() Dim n As Integer Dim i As Integer Dim flag As Boolean For n = 1 To 50 flag = True For i = 2 To n / 2 If n Mod i = 0 Then flag = False End If Next If flag Then Console.WriteLine(n) End If Next Console.ReadLine() End SubEnd ModuleOmar Abid Blog
More About: Prime , Generation , Number
Creating a line and displaying angle
2007-12-26 12:44:00
using System;using Autodesk.AutoCAD.Runtime;using Autodesk.AutoCAD.ApplicationServices;usin g Autodesk.AutoCAD.Colors;using Autodesk.AutoCAD.DatabaseServices;using Autodesk.AutoCAD.EditorInput;using Autodesk.AutoCAD.Geometry;using Autodesk.AutoCAD.GraphicsInterface;using Autodesk.AutoCAD.Windows;using System.Windows.Forms;[assembly: CommandClass(typeof(ClassLibrary.Class))] namespace ClassLibrary{ /// /// Summary description for Class. /// public class Class :IExtensionApplication { private static Editor pEditor; public static Line pLine; public Class() { } [CommandMethod("lian")] static public void test() { Database pDatabase = HostApplicationServices.WorkingDatabase; Editor pEditor = Autodesk.AutoCAD.ApplicationServices.Appl ication.DocumentManager.MdiActiveDocument .Editor; Autodesk.AutoCAD.DatabaseServices.Transac tionManager pTransactionManager = pDatabase.Tran...
More About: Creating , Angle
Finiding Maximum Value on an Array
2007-12-23 17:25:00
This code will show you how your going to find and display the maximum value in your array.The Code:'You will need a FORM and a command buttonOption ExplicitDim A(20), num, i, j, max As IntegerPrivate Sub Command1_Click()Print "Your array contains:"For i = 0 To num - 1 Print A(i)Next iPrint "Maximum Value= "; maxEnd SubPrivate Sub Form_Load()num = InputBox("Initialize your array [1-20]:")For i = 0 To num - 1 A(i) = InputBox("Enter your array:")Next i'find maximummax = A(0)For i = 0 To num - 1 If max max = A(i) End IfNextEnd SubOmar Abid Blog
More About: Array
Catch Win32 Services
2007-12-23 17:22:00
The following code will allow you to catch running Win32Services The Code:Option Explicit OnImports SystemImports System.ManagementPublic Class Form1 Private MgClass As New Management.ManagementClass("Win32_Service ") Private Sub ButtonLoadServices_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonLoadServices.Click Try Me.Cursor = Cursors.WaitCursor ListView1.Items.Clear() Label3.Text = "" Label5.Text = "" Label7.Text = "" Label9.Text = "" ButtonLoadServices.Enabled = False ButtonLoadServices.Refresh() Label1.Text = "0% Complete." Label1.Refresh() With ProgressBar1 .Value = 0 .Minimum = 0 .Maximum = MgClass.GetInstances().Count .Refresh() End With For Each obj As Management.ManagementObject In MgClass.GetInstances() Application...
More About: Catch
Regular Expression Tester
2007-12-23 17:20:00
This is a simple Regular Expression Tester.Imports System.Text.RegularExpressionsPublic Class Form1 Private Function TestRegularExpression(ByVal TestValue As Object, ByVal TestPattern As String) As Boolean TestRegularExpression = False If Regex.IsMatch(TestValue, TestPattern) Then TestRegularExpression = True Else TestRegularExpression = False End If Return TestRegularExpression End Function Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Ans As Boolean = False Try Ans = TestRegularExpression(TextBox2.Text.ToStr ing().Trim(), TextBox1.Text.ToString().Trim()) If Ans = True Then MessageBox.Show("Correct", "Regular Expression s", MessageBoxButtons.OK, MessageBoxIcon.Information) Else MessageBox.Show("Not Correct", "Regular Expressions", MessageBoxButtons.OK, MessageBoxIcon.Exclamation...
Prime Number Generation
2007-12-23 17:16:00
Open Visual Basic (.net) and create a new Console ApplicationPaste the following code and run !Module Module1 Sub Main() Dim n As Integer Dim i As Integer Dim flag As Boolean For n = 1 To 50 flag = True For i = 2 To n / 2 If n Mod i = 0 Then flag = False End If Next If flag Then Console.WriteLine(n) End If Next Console.ReadLine() End SubEnd ModuleOmar Abid Blog
More About: Prime , Generation , Number
Addition of the Digg Button
2007-12-23 17:09:00
After a long search I found the method to add the Digg button to all the posts of the Blog.Don't forget to Digg anypost you found helpful !Omar Abid Blog
More About: Button
New Site Skin !
2007-12-23 16:50:00
Hi,I just fixed a new skin!! What do you think of it?Omar Abid Blog
More About: Skin , Site , New Site
About Omar Abid
2007-12-23 16:35:00
My name's Omar Abid and I was born and still live in Sfax a small town in Tunisia.My first contact with computers was when I have 6 year, I first programed with Qbasic and MS-Dos. Then and quickly I moved to Visual Basic 6.0 under Win 95 an Win 98. I pass a long time with VB 6.0 and Windows 98 and I jumped directly to Windows Xp. In 2004 I changed to Visual Studio .net and started real Programing and I learned much more.In 2006, I started learning Front Page and Scripting, quickly I noticed that ASP/PHP are necessary and started with ASP. In 2007, I lost the hand on programing and started a big experience with Windows 2003 server and Networking (Domain Controller, Terminal Server, IIS...).Now I returned to programing with VS Orcas and made several sites with PHP and started many projects.... It's all!Omar Abid Blog
More articles from this author:
1, 2, 3, 4, 5, 6, 7
81726 blogs in the directory.
Statistics resets every week.


Contact | About
© Blog Toplist 2009 - Supported by Web Catalog - SEO by FeWorks
eXTReMe Tracker