Feedback Form

Wednesday, February 27, 2008

Pure Chat sample

As axosoft company said on their website:
PureChat is one of the most attractively priced live web chatting solutions on the market.

I see its very simple one, it a good choice if:
Your budget is not a lot
You don't want any advanced communication between your operators and users.
You don't want file transfer or sharing.

Its very simple and clear.

I made a small sample using pure chat, its very simple and working nice.

Download sample

How to make your own read this

kick it on

Monday, February 18, 2008

Ooops i closed the wrong tab (firefox)

Some times we close the wrong tab in firefox browser, what can we do :(
Its simple:

Ctrl+Shift+T (firefox windows)
Cmd+Shift+T (firefox mac)

Cool :) .....

Friday, February 08, 2008

SlideShowExtender Fade effect

You can make fade effect while sliding and there is a good way by using SlideShowExtender + AnimationExtender like the following good sample:

<%@ Page Language="C#"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<script runat="server">
public static AjaxControlToolkit.Slide[] GetSlides()
return new AjaxControlToolkit.Slide[] {
new AjaxControlToolkit.Slide("AjaxToolKit/SliderShowImages/Blue hills.jpg", "Blue Hills", "Go Blue"),
new AjaxControlToolkit.Slide("AjaxToolKit/SliderShowImages/Sunset.jpg", "Sunset", "Setting sun"),
new AjaxControlToolkit.Slide("AjaxToolKit/SliderShowImages/Winter.jpg", "Winter", "Wintery..."),
new AjaxControlToolkit.Slide("AjaxToolKit/SliderShowImages/Water lilies.jpg", "Water lillies", "Lillies in the water"),
new AjaxControlToolkit.Slide("AjaxToolKit/SliderShowImages/VerticalPicture.jpg", "Sedona", "Portrait style picture")};

<html xmlns="">
<head id="Head1" runat="server">
<title>Untitled Page</title>
<script language="javascript" type="text/javascript">
var fadein;
var fadeout;

function pageLoad()
var ss=$find("ss1");

var ae=$find("ae");
var be=ae.get_OnLoadBehavior();
var an=be.get_animation();

function onChanging(sender, args)
window.setTimeout("", 1000);
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnableScriptLocalization="true" EnableScriptGlobalization="true">
<asp:Image ID="Image1" runat="server"
Style="border: 1px solid black;width:auto"
AlternateText="Blue Hills image" />
<ajaxToolkit:SlideShowExtender ID="slideshowextend1" runat="server"
TargetControlID="Image1" BehaviorID="ss1"
SlideShowServiceMethod="GetSlides" PlayInterval="2000"
Loop="true" />
<ajaxToolkit:AnimationExtender id="MyExtender" runat="server" BehaviorID="ae" TargetControlID="Image1">
<FadeOut Duration="0" Fps="20" />
<FadeIn Duration="0" Fps="20" />

Download Sample

Monday, February 04, 2008

SlideShowExtender Set Current Image Index, Src

I wanted to set the SlideShowExtender current image, i found just one good way to do so using simple java script code

1- Add the SlideShowExtender:

<cc1:SlideShowExtender BehaviorID="behaviorID" ID="SlideShowExtender1" runat="server"
SlideShowServiceMethod="GetSlides" PlayInterval="9000" TargetControlID="imgScreen"
UseContextKey="True" AutoPlay="true" Loop="true">

2- Add the following java script code:

function changeImage(imgUrl, imageIndex){
slider1 = $find("behaviorID");
slider1._currentIndex = imageIndex-1;
slider1.setCurrentImage = imgUrl;

kick it on

Friday, February 01, 2008

SlideShowExtender on slide change

How to add an onchange event to the SlideShowExtender?

-After adding your SlideShowExtender, assign the image control to it and setting a BehaviorID

<cc1:SlideShowExtender BehaviorID="behaviorID" ID="SlideShowExtender1" runat="server" SlideShowServiceMethod="GetSlides" PlayInterval="5000" TargetControlID="imgScreen"  UseContextKey="True" AutoPlay="true" Loop="true"></cc1:SlideShowExtender>

-Add the following java script code inside your html code file:

<script language="javascript" type="text/javascript">  
    function pageLoad(){ 
        var slider1;  
        slider1 = $find("behaviorID"); 
     function onSlideChanging(sender, args){ 
        currentSlideIndex = args.get_slideIndex();  
        //Do what you want using this index

kick it on

Get Difference between 2 times in milliseconds

I got that the best class to get the difference between 2 times in .Net framework is System.Diagnostics.Stopwatch class.

Dim sw As New System.Diagnostics.Stopwatch()

kick it on

Excel file in new excel instance

You can open any excel file using code like this:


But what will happen if we have these 2 lines of code:



Will first open “filePathONE” in a new excel instance, then will open the “filePathTwo” in the same excel instance.

What we can do if we want to open each file in a separate new excel instance?

We must write it like that:

Process.Start(“Excel.exe”, filePathONE);

Process.Start(“Excel.exe”, filePathTWO);

It’s very simple, isn’t it?

But we can face a small problem with this way:

If you want to open an excel file that contains space in its name, for example “my Sheet.xls”, it will give you a runtime error that it can’t open files “my.xls” and “Sheet.xls”.

So what can I do?

It’s simple:

Just add “ before and after the file path, just like that:

Process.Start(“Excel.exe”, @“””filePathONE”””);

Like that it will open normally without any errors.


You will need to do the same for any office application (word, powerpoint, ….).

kick it on

Access splash screen

How to add a splash screen that closes after 10 seconds before my main form starts?

Here is one way:
1. Place the form that has the splash screen in design view and set the following properties:
Timer Interval 6000
On Timer>>>>>>Click the build button to create an event procedure. Place the following code in that procedure:
Private Sub Form_Timer()
On Error GoTo Error_Routine
' Form stays open for 10 seconds, then closes.
DoCmd.Close acForm, Me.Name
DoCmd.OpenForm "frmMainSwitchboard"
Exit Sub
MsgBox "Error# " & Err.Number & " " & Err.Description
Resume Exit_Continue
End Sub
2. Go to Startup properties on the Access Command menu tools>Startup and select the splash screen as the form hat opens at startup. Then test by restarting your application access file.

kick it on