Receive Parameter in C# Thursday, Aug 2 2012 

In real software industry, sometimes we need to cooperate with another vendor to improve our product. In this case, I found a case that I need to send a parameter to my vendor application. My application is built under VB .net, while my vendor application is built under C# .Net. So what I did was.

In my VB .Net application, I put below code to call my vendor application. I put the executable file location under settings.

argument = “Servername|DBName|UserID|Password”

System.Diagnostics.Process.Start(My.Settings.exeLoc, argument.Trim())

Then in my vendor application, they need to put this code in form_load event and need to create a method to parse parameter based on delimitier “|” (let’s say if you’d like to send more then 1 parameter).

private void Form1_Load(object sender, EventArgs e)
{
   string[] args = Environment.GetCommandLineArgs();
   string param=””;

   // The first commandline argument is always the executable path itself.
   if (args.Length > 1)
   {

     for (int i = 1; i < args.Length;i++ )
     {
         param += args[i];
     }

     this.parse(param); 
   }
}

Have a nice try.

Advertisements

Compare Date in Query method (AX 2009) Tuesday, Mar 17 2009 

Quite stuck in finding how to compare date in query method, but finally I found it. I need to convert it into strXpp so that the date convertion will convert correctly. Here is the example code:

……..
……..
queryRange = SysQuery::findOrCreateRange(qbsInventBatch, fieldnum(InventBatch,expDate));
queryRange.value(strfmt(‘(expDate > %1)’, Date2StrXpp(today())));

……
……

SE Games (Again) Friday, Nov 2 2007 

Kembali saya hadirkan games untuk Sony Ericsson dengan resolusi screen 176×220 (bisa juga untuk nokia dengan resolusi 176×208) yaitu:

1. Pro Footbal Manager 2008

2. Pro Evolution Soccer 2008

3. NFS Pro Street 3D

Just do like usual, if I have filename ProEvo2008jar.odt, please make it’s like this, “ProEvo2008.jar”, and then install to your cell phone, have a nice try 🙂

si pipi bakpau Wednesday, Oct 10 2007 

bayi pipi bakpau

Here’s the chubby  baby 🙂 while he was sleeping, his cheek was so swollen :p

I’ve ever used this picture as my Yahoo picture.

Ojek Setan Thursday, Oct 5 2006 

hiiiiGw aga lupa kejadiannya, kalo ga salah waktu gw dulu
masih ngekos di perumdos. Tingkat 3 kali ya. Waktu itu
kebetulan gw lagi ga bareng ma temen kosan gw
(fathur), truz baliknya kebetulan aga maleman.. Jam
11an apa ya, abis dari rental lah biasa anak cowo :p.
Karena kalo jalan serem banget udah kayak tempat jin
buang anak + jauh pula, ga ada kendaraan lain selain
ojek buat ke tempat itu. Gw udah ngerasa aneh sih
waktu mau nae ojek dari BNI. ko sepi tukang ojek. tapi
gw ngeliat ada 1 nil, di deket saung tempat tukang
ojek pada ngaso. dy ndirian mbil duduk ngeliat ke arah
gww. gw juga bingung, ko ni orang duduknya diem aja,
apa tidur terduduk gw juga ga tau.

gw toel tuh si tukang ojek. Null (bunyinya).. . bang
bang, perumdos bang, cendana 5. tuh tukang ojek aga
nyeremin juga, ga bilang iya, langsung berdiri n jalan
perlahan ke arah motornya. ya gw ngikut aja mbil baca
ayat kursi. takut booooo.
pas buuuuung tu motor melaju cepet banget ke kosan gw,
gw ga sadar udah nyampe kosan. truz gw rogoh kocek gw,
weduh 50rb. gw liat dompet, juga 50rban. (maklum abis
gesek :p)…

Truz nekat aja gw kasih tuh 50rban gw, si Abang diem
aja. gw bilang maap bang ga ada uang kecil,.. baru dy
julurin tangannya tanpa ngadep ke gw mukanya. waktu
itu, tiba” udara dingin banget n ada suara lolongan
anjing melengking tinggi. Kata temen gw, itu pertanda
ada something tak terlihat lagi lewat, kuntilanak ato
apa lah sama seremnya. gw pengen buru” masuk kamar
truz tidur, tapi nunggu kembalian.

Tapi serem juga suasananya pas nunggu kembalian, udara
makin dingin n bulu kuduk gw ikutan merinding.
duuu mati gw, truz gw bilang ke tukang ojek, bang
kembaliannya mana?
dy tetep ga nengok ke arah gw.
Truz, gw inget ma serial kismis di rcti. Gimana ni
kalo tiba” tu tukang ojek nengok, mukanya rata.
huwaaaaaa, bisa” kencing di celana gw.
but gw pertahanin keberanian gw mbil nanya lagi, bang
mana kembaliannya ?

tiba” tuh ojek langsung melaju kencang tanpa
ngembaliin uang kembalian gw. Langsung gw teriak
sekencang mungkin mpe memecah keheningan malam
” OOOOOJEEEEEEEEEEEEE EKKK
SEEEEEEEEEEETAAAAAA AAAAAAAANNNNNNNN NNNNNNNN ……….

–serius amat bacanya :)) ——–

(adapted from :sakit 1/2 jiwa)

what do you want to be.. ? Tuesday, Sep 19 2006 

what do you want to be? Coffee, egg, or coffee powder ?

please download from this link…. here

or directly here https://thomaszae.files.wordpress.com/2006/09/coffee.pps

Next Page »