Hi again! There are couple of video recording solutions for Windows and most of them are time limited. The following solution uses ffmpeg to merge different type of video files. It is using the 64-bit of ffmpeg. Use at your own risk 😛 Btw, it will merge more than one file into a file named as OUTPUT on your desktop. If the file exists, [...]
baran
Well, one can easily check the state of a file (whether it is used or not) via FileWatcher in C#.NET. Following is more handy if you want to handle it manually and need to log it. // create an event public delegate void FileUpdatedEventHandler (object sender, EventArgs e); public event FileUpdateEventHandler Updated; private _lastWrite = [...]
baran
Nowadays, I am using some other 3rd party solution for the need to find a string in an MSSQL but well, this one might be handy and I can verify it works just fine. Lose the tags and type your db and search str instead of mydbname and I want to find USE mydbname declare @SearchStr nvarchar(100) Set @SearchStr = 'I want to find%' -- [...]
baran
Long time ago, I wanted to drop databases starting with the word ‘SS’ in mssql. I didn’t want to do this manually so I wrote the following script. use master DECLARE @Name nvarchar(1000); DECLARE testdb_cursor CURSOR FOR SELECT 'ALTER DATABASE' + '[' + NAME + ']' + ' SET SINGLE_USER WITH ROLLBACK IMMEDIATE DROP DATABASE [...]
baran
This is a handy script if you need to find a column in MSSQL db with query. USEmydb GO SELECT t.name AS table_name, SCHEMA_NAME(schema_id) AS schema_name, c.name AS column_name FROM sys.tables AS t INNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID WHERE c.name LIKE '%keyword%' ORDER BY schema_name, table_name;
baran
I remember that I needed yet another form before the main form. The elegant way to do that is as follows: static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Form1 f1 = new Form1(); f1.Opacity [...]
baran
Long ago, I wanted to have a fading effect in my windows form application. Here you go: public partial class Form1 : Form { bool fading = false; bool fadingComplete = false; System.Windows.Forms.Timer myTimer = null; public Form1() { InitializeComponent(); } protected override void OnClosing(CancelEventArgs e) { if (fading && [...]
baran
Long ago, I need to determine the Visual Studio version of a csproj file: csproj is an xml file and the content is something similar as follows: Debug AnyCPU 9.0.21022 If you don’t have got .sln file, examining the csproj is a way to determine where the project is structured. Product Name Product Version File Format Visual Studio [...]
baran
Long ago, I had a C# solution with some projects in it and every project had its own snk file. I was curious: 1) What is the use of snk files? 2) How to create a snk file for my project newly added to my solution? Assemblies can be assigned a cryptographic signature, called a strong name, which provides name uniqueness for the assembly [...]
baran