Wednesday, August 02, 2006

<tagname> - egy post-ban

Az előbbi post-nál nagy gondban voltam, mert a <tagname>-t nem szövegként kezelte le ez a szerkesztő, hanem html/xml tagként, így eltűnt. Ezért gondoltam, hogy felteszek ide egy listát a kódokkal, hogy máskor ne kelljen Google-ezzek ilyesmi miatt.

< = & l t ;
> = & g t ;

P.S. a kódokat nyilván szóköz nélkül kell használni.

HTC


A HTC file is nothing but an HTML file, saved with a .htc extension. It contains scripts and a set of HTC-specific custom elements, that define the component.

Objects:
document - the HTML document in a given browser window
PUBLIC: ATTACH - binds a function to an event
PUBLIC: COMPONENT - identifies the content of the file as HTC
PUBLIC: DEFAULTS - sets default properties for an HTC
PUBLIC: EVENT - defines an event
PUBLIC: METHOD - defines a method
PUBLIC: PROPERTY - defines a property of the HTC
element - returns a reference to the tag in the primary document, to which the behavior is attached

exp.
attaching behavior to a simple asp TextBox:
TextBox _myTextBox;
...
_myTextBox.Style.Add("behavior","url(myhtcfile.htc)");

where the HTC file should look like this:
<PUBLIC: COMPONENT>
<PUBLIC: PROPERTY name="propertyName" />
<PUBLIC: ATTACH event="eventName" handler="MyEventHandler"/>
...
<SCRIPT language="JScript">
function MyEventHandler()
{ ... }
</SCRIPT>
</PUBLIC: COMPONENT>

and the file name should be:
myhtcfile.htc

Friday, July 14, 2006

SAVE A .GIF WITH TRANSPARENT BACKGROUND - in Ms Expression


Need to create a picture with transparent background?
This is the way to do it, using Microsoft Expression:

1. Open a new file in Pixel Layer
2. Choose the Magic Eraser Tool, then click on the paper
3. Do the drawing
4. Save the file by Export: Export » to Image Format » gif » Save Alpha Channel

The background will be transparent.

Tuesday, July 11, 2006

EXCEL SHEET ÜRES SORAINAK KITÖRLÉSE - VBA makró


Ha automatikusan hozol létre Excel Sheeteket, nem tuhatod, hogy hány sorra is lesz pontosan szükség => jobb, ha minél többet adsz hozzá az elején. Ellenben, a sok üres sor gondot okozhat processzáláskor, így ez a makró kiörli az "üresnek tekintetteket". Hogy ki melyik sort tekinti üresnek, a feltétel határozza meg.

Sub RemoveEmptyRowsFromASpecificSheet()
Dim rng As String
rng = ""
totalrows = Sheets("SpecificSheet").UsedRange.Rows.Count
For Row = 1 To totalrows Step 1
If Sheets("SpecificSheet").UsedRange.Cells(Row, 1).Value = "" Then
rng = "A" + CStr(Row) + ":P5000"
Exit For
End If
Next Row
Sheets("SpecificSheet").Range(rng).EntireRow.Delete
End Sub