Saturday, 6 August 2011
Restore Windows State from minimized to previous state
SendMessage(docView.Handle, WM_SYSCOMMAND, SC_RESTORE, 0);
Saturday, 25 June 2011
How to configure the Store to Database option in IRD
Here is what to do:
1. Run Sql script against configuration Database. ird_create_tables_sql
2. Created a New DBServer Application in CME
3. Installed DB Server (As a Client of Configuration server)
4. Created New Database Access Point, which uses new DBServer
5. In IR Designer I made a connection to the Database Access Point
6. Database access Point needs to point to the Configuration Database (Or where you ran the Script)
NOTE:
You do not have to create a New DBServer, you can use the existing one.
Thursday, 23 June 2011
How to: Change an Assembly Name (Visual Basic, C#)
To change the Assembly Name property
- With a project selected in Solution Explorer, on the Project menu, click Properties.
- Click the Application tab.
- In the Assembly Name field, type the name for your application.
| Note |
|---|
| Although the default value of the Assembly Name is the same as the project name, the two are unrelated; changing the project name does not change the Assembly Name and changing the Assembly Name does not change the project name. |
http://msdn.microsoft.com/en-us/library/f0c12ze9.aspx
Wednesday, 22 June 2011
Get Last Modified File from Folder
Dim directory As DirectoryInfo = New DirectoryInfo("C:\Temp")
Dim filter As String = txtFileName.Text
If directory.GetFiles(txtFileName.Text).Count > 0 Then
Dim myFile As FileInfo = directory.GetFiles(filter).OrderByDescending(Function(f) f.LastWriteTime).First()
MsgBox(myFile.Name)
Else
MsgBox("No files found")
End If
Monday, 20 June 2011
Best way to convert seconds into (Hour:Minutes:Seconds:Milliseconds) time?
TimeSpan t = TimeSpan.FromSeconds(secs);
string answer = string.Format("{0:D2}h:{1:D2}m:{2:D2}s:{3:D3}ms",
t.Hours,
t.Minutes,
t.Seconds,
t.Milliseconds);
Wednesday, 1 June 2011
Outbound : Convert seconds to UTC Time and vice versa
Dim sDate As String = "01/06/2011 16:46:44"
Dim date1 As Date = #1/1/1970#
Dim date2 As Date = DateTime.Parse(sDate).ToUniversalTime
inSeconds = DateDiff("s", date1, date2))
To convert seconds from database to date and time
Dim localTime As Date
Dim date1 As Date = #1/1/1970#
localTime = date1.AddSeconds(1306943204).ToLocalTime
Debug.Print localtime.ToString
Monday, 6 December 2010
Outlook 2003–Small/Large Text when replying
It is such annoying..
Yesterday, accidently I changed text size when responding to email in Outlook 2003. Font size went really small and was very difficult to read/write the messages. Unfortunately, it is not easy to change it and with few help from Microsoft posts, finally got the solution and listed simple one below.
- In Outlook 2003, Select File –> New –> Mail Message
- Go to View –> Zoom
- Change percentage value to 100%
That’s it. you will back to Normal font size and your work can continue normally.