ThєSαvícs ↝ darKSaviC
ThєSαvícs ↝ darKSaviC
CC#
Created by ThєSαvícs ↝ darKSaviC on 4/14/2024 in #help
How do i make .txt file watcher with VS
. Thats why i need to help its too complicated for me
8 replies
CC#
Created by ThєSαvícs ↝ darKSaviC on 4/14/2024 in #help
How do i make .txt file watcher with VS
If I summarize the code along with its errors; when there is an update in 'veriler.txt', my DataGridView table named 'veriTablosu' is deleted and reloaded. However, when this table is deleted and reloaded, as shown in the example above, the 8th and empty data shift to the left, and the 9th, 10th, 11th, 12th, and 13th data take their place. Also, there is a code assigned to Cell_Click where data is sent to a total of 10 TextBoxes and 2 ComboBoxes located at the top whenever a cell is clicked. Somehow, this code also transfers the spaces around the '|' symbol in 'veriler.txt' to the 'veriTablosu' along with the data. As a result, spaces are added before and after the text in the total of 10 TextBoxes, and nothing is selected in the ComboBoxes as if that data were not there.
8 replies
CC#
Created by ThєSαvícs ↝ darKSaviC on 4/14/2024 in #help
How do i make .txt file watcher with VS
depending on how I fill them out, they are recorded in the "veriler.txt" file.
8 replies
CC#
Created by ThєSαvícs ↝ darKSaviC on 4/14/2024 in #help
How do i make .txt file watcher with VS
in the first example eighth one is sometimes can be empty or not
8 replies
CC#
Created by ThєSαvícs ↝ darKSaviC on 4/14/2024 in #help
How do i make .txt file watcher with VS
Dark | Savic | APLİKASYON | 05343543435 | Yok | antakya | 1_Mıntıka | | 6 | 5000 | 4000 | ARAZİ YAPILMADI | 13.04.2024 19:04:00
Dark | Savic | APLİKASYON | 05343543435 | Yok | antakya | 1_Mıntıka | | 6 | 5000 | 4000 | ARAZİ YAPILMADI | 13.04.2024 19:04:00
and
Light | Savic | APLİKASYON | 05343583935 | Yok | antakya | 1_Mıntıka | 56 | 4 | 5000 | 4000 | ARAZİ YAPILMADI | 13.04.2024 19:05:00
Light | Savic | APLİKASYON | 05343583935 | Yok | antakya | 1_Mıntıka | 56 | 4 | 5000 | 4000 | ARAZİ YAPILMADI | 13.04.2024 19:05:00
8 replies
CC#
Created by ThєSαvícs ↝ darKSaviC on 4/10/2024 in #help
✅ I cant combine folder paths
i fully redesigned code, now code getting datas from datagridview its done
11 replies
CC#
Created by ThєSαvícs ↝ darKSaviC on 4/10/2024 in #help
✅ I cant combine folder paths
its just gives me which thing is missing or wrong and i took only that messagebox codes from chatgpt
11 replies
CC#
Created by ThєSαvícs ↝ darKSaviC on 4/10/2024 in #help
✅ I cant combine folder paths
sorry i forgot to reply to you
11 replies
CC#
Created by ThєSαvícs ↝ darKSaviC on 4/10/2024 in #help
✅ I cant combine folder paths
i tried to edit string when i put actual text string ilce = "arsuz" and changed messagebox's code ("Program location: " + ilce... its works but when i put duzenleIlce.Text its not working i dont know why
11 replies
CC#
Created by ThєSαvícs ↝ darKSaviC on 4/10/2024 in #help
✅ I cant combine folder paths
I want to delete both the folder and the "Not.txt" files inside the folder. However, I cannot update the file location with this code. The result is always the same: Program location: C:\Users\ASUS\Documents\LIHKAB\LIHKAB_3102-811\
11 replies
CC#
Created by ThєSαvícs ↝ darKSaviC on 4/10/2024 in #help
✅ I cant combine folder paths
The program only shows me this location. I need a way for the other strings (ilce, mahalle, klasorAdi) that I added to "folderPath" to be included as well. Because in the continuation of the code;
string targetFolderPath = Path.Combine(folderPath);
string targetNotePath = Path.Combine(targetFolderPath, "Not.txt");

try
{
string folderPathN = Path.Combine(targetNotePath);
string folderPathF = Path.Combine(targetFolderPath);

// Delete Note
if (File.Exists(folderPathN))
{
File.Delete(folderPathN);
}

// Check folder exists
if (Directory.Exists(folderPathF))
{
// Delete Folder
Directory.Delete(folderPathF, false);
MessageBox.Show("Program location: " + folderPathF, "Location Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
MessageBox.Show("Folder successfully deleted.", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
MessageBox.Show("Program location: " + folderPathF, "Location Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
MessageBox.Show("The specified subfolder could not be found.", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Warning);

}
}
catch (Exception ex)
{
string folderPathF = Path.Combine(targetFolderPath);

MessageBox.Show("Program location: " + folderPathF, "Location Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
MessageBox.Show("An error occurred while deleting the folder: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
string targetFolderPath = Path.Combine(folderPath);
string targetNotePath = Path.Combine(targetFolderPath, "Not.txt");

try
{
string folderPathN = Path.Combine(targetNotePath);
string folderPathF = Path.Combine(targetFolderPath);

// Delete Note
if (File.Exists(folderPathN))
{
File.Delete(folderPathN);
}

// Check folder exists
if (Directory.Exists(folderPathF))
{
// Delete Folder
Directory.Delete(folderPathF, false);
MessageBox.Show("Program location: " + folderPathF, "Location Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
MessageBox.Show("Folder successfully deleted.", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
MessageBox.Show("Program location: " + folderPathF, "Location Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
MessageBox.Show("The specified subfolder could not be found.", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Warning);

}
}
catch (Exception ex)
{
string folderPathF = Path.Combine(targetFolderPath);

MessageBox.Show("Program location: " + folderPathF, "Location Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
MessageBox.Show("An error occurred while deleting the folder: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
11 replies
CC#
Created by ThєSαvícs ↝ darKSaviC on 4/10/2024 in #help
✅ I cant combine folder paths
My code is working, but only the folder path in "baseFolderPath" is visible. In my code, there is a place where I display the content of "folderPath" with MessageBox, and there the code tells me this: Program location: C:\Users\ASUS\Documents\LIHKAB\LIHKAB_3102-811\
11 replies
CC#
Created by ThєSαvícs ↝ darKSaviC on 4/10/2024 in #help
✅ I cant combine folder paths
it use like that without adding any path "C:\Users\ASUS\Documents\LIHKAB\LIHKAB_3100-800" i need paths like that "C:\Users\ASUS\Documents\LIHKAB\LIHKAB_3100-800\ISLEM\ILCE\MAHALLE\klasorAdi" and i need 1 more thing "C:\Users\ASUS\Documents\LIHKAB\LIHKAB_3100-800\ISLEM\ILCE\MAHALLE\klasorAdi\Note.txt"
11 replies
CC#
Created by ThєSαvícs ↝ darKSaviC on 11/10/2023 in #help
❔ Form goes fully transparent please help
still waiting
8 replies
CC#
Created by ThєSαvícs ↝ darKSaviC on 11/10/2023 in #help
❔ Form goes fully transparent please help
.-.
8 replies
CC#
Created by ThєSαvícs ↝ darKSaviC on 11/10/2023 in #help
❔ Form goes fully transparent please help
rep
8 replies
CC#
Created by ThєSαvícs ↝ darKSaviC on 11/10/2023 in #help
❔ Form goes fully transparent please help
c#
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Drawing.Text;

namespace HUB
{
public partial class Menu : Form
{
public Menu()
{
this.EnableBlur();
BackColor = Color.Azure;
TransparencyKey = Color.Azure;
InitializeComponent();
guna2ShadowForm1.SetShadowForm(this);
}
}




public static class WindowExtension
{
[DllImport("user32.dll")]
static internal extern int SetWindowCompositionAttribute(IntPtr hwnd, ref WindowCompositionAttributeData data);

public static void EnableBlur(this Form @this)
{
var accent = new AccentPolicy();
accent.AccentState = AccentState.ACCENT_ENABLE_BLURBEHIND;
var accentStructSize = Marshal.SizeOf(accent);
var accentPtr = Marshal.AllocHGlobal(accentStructSize);
Marshal.StructureToPtr(accent, accentPtr, false);
var Data = new WindowCompositionAttributeData();
Data.Attribute = WindowCompositionAttribute.WCA_ACCENT_POLICY;
Data.SizeOfData = accentStructSize;
Data.Data = accentPtr;
SetWindowCompositionAttribute(@this.Handle, ref Data);
Marshal.FreeHGlobal(accentPtr);
}

}
enum AccentState
{
ACCENT_ENABLE_BLURBEHIND = 3
}

struct AccentPolicy
{
public AccentState AccentState;
public int AccentFlags;
public int GradientColor;
public int AnimationId;
}

struct WindowCompositionAttributeData
{
public WindowCompositionAttribute Attribute;
public IntPtr Data;
public int SizeOfData;
}

enum WindowCompositionAttribute
{
WCA_ACCENT_POLICY = 19
}
}
c#
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Drawing.Text;

namespace HUB
{
public partial class Menu : Form
{
public Menu()
{
this.EnableBlur();
BackColor = Color.Azure;
TransparencyKey = Color.Azure;
InitializeComponent();
guna2ShadowForm1.SetShadowForm(this);
}
}




public static class WindowExtension
{
[DllImport("user32.dll")]
static internal extern int SetWindowCompositionAttribute(IntPtr hwnd, ref WindowCompositionAttributeData data);

public static void EnableBlur(this Form @this)
{
var accent = new AccentPolicy();
accent.AccentState = AccentState.ACCENT_ENABLE_BLURBEHIND;
var accentStructSize = Marshal.SizeOf(accent);
var accentPtr = Marshal.AllocHGlobal(accentStructSize);
Marshal.StructureToPtr(accent, accentPtr, false);
var Data = new WindowCompositionAttributeData();
Data.Attribute = WindowCompositionAttribute.WCA_ACCENT_POLICY;
Data.SizeOfData = accentStructSize;
Data.Data = accentPtr;
SetWindowCompositionAttribute(@this.Handle, ref Data);
Marshal.FreeHGlobal(accentPtr);
}

}
enum AccentState
{
ACCENT_ENABLE_BLURBEHIND = 3
}

struct AccentPolicy
{
public AccentState AccentState;
public int AccentFlags;
public int GradientColor;
public int AnimationId;
}

struct WindowCompositionAttributeData
{
public WindowCompositionAttribute Attribute;
public IntPtr Data;
public int SizeOfData;
}

enum WindowCompositionAttribute
{
WCA_ACCENT_POLICY = 19
}
}
8 replies
CC#
Created by ThєSαvícs ↝ darKSaviC on 11/10/2023 in #help
❔ Form goes fully transparent please help
and code:
8 replies
CC#
Created by ThєSαvícs ↝ darKSaviC on 11/10/2023 in #help
❔ Form goes fully transparent please help
No description
8 replies
CC#
Created by ThєSαvícs ↝ darKSaviC on 8/13/2023 in #help
❔ maximized form and draging problem in C# Winforms
???
5 replies