16,004,602 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by TatsuSheva (Top 99 by date)
TatsuSheva
9-Feb-18 15:51pm
View
DataTable here is not already in the invoice.
This is in the stock and now I will use it to store it in the invoice because of that I said I give the total amount and automatically it will fill the invoice with the right items , quantity and price according to the total amount
TatsuSheva
30-Apr-17 10:41am
View
Is it possible that it only shows the total not at each line ! I mean if you see the example in my case the first line in the total Bill there is 2000 and the second line 5000 but I want to be as I described in the question
TatsuSheva
30-Apr-17 10:03am
View
yes you are right, I had to remove if (dt.Rows.Count == 1)....
For the second question, the sum is done but if I click on another row I am having this error : System.InvalidCastException and the error come to this sum += Convert.ToInt32(TAB_Credit.Rows[i].Cells["Total"].Value); and this is the comment : {"Unable to cast a DBNull object in other types."}
TatsuSheva
29-Apr-17 16:50pm
View
I am having another problem , when the first row is filled and I want to fill the second row I can't... look here https://www.codeproject.com/Questions/1184657/Filling-datagridview-cells-after-validating-first
TatsuSheva
11-Jan-17 12:31pm
View
I need it to change....
TatsuSheva
11-Jan-17 5:10am
View
the countdown is not in realtime....
TatsuSheva
10-Jan-17 4:03am
View
i don't want to get the time of the PC
TatsuSheva
10-Jan-17 4:02am
View
If I put today = new Date(); when I change the time of the PC, the countdown change also so it is not what I want...
TatsuSheva
6-Jan-17 4:18am
View
By doing "LIMIT 50,100" is it correct ? I have 300 records...
TatsuSheva
6-Jan-17 4:05am
View
Yes, I have tried to send each 50 by using in the sql request "LIMIT" the first 50 went but when I do this "LIMIT 50,100" the error appears again...
TatsuSheva
5-Dec-16 12:59pm
View
I tried this RewriteEngine On
RewriteRule ^products/(.+)$ products/index.php?p=$1 [L] but it didn't work
TatsuSheva
27-Oct-16 10:34am
View
So, what should I do now ? I am blocked with this issue :/
TatsuSheva
27-Oct-16 10:20am
View
No... but I can't write a comment in the solution above
TatsuSheva
27-Oct-16 10:05am
View
how?
TatsuSheva
7-Oct-16 6:59am
View
Visual Studio: VS Community 2015 , crystal report 13.
TatsuSheva
7-Oct-16 6:18am
View
There is no picture there... Did you try it before ?
TatsuSheva
27-Sep-16 12:17pm
View
Mine is Winform :/
TatsuSheva
27-Sep-16 11:56am
View
Didn't work
TatsuSheva
27-Sep-16 11:28am
View
I found something interesting but I have a problem when I put some numbers in the textbox, the cursor comes always to the left ...
Here is the code:
doubletext=double.Parse(txt.Text);
CultureInfoculture=CultureInfo.CreateSpecificCulture("fr-FR");
txt.Text=text.ToString("N0",culture);
Do you have any idea ?
TatsuSheva
27-Sep-16 6:35am
View
the thousand seperator is not already there, and also I am using textbox
TatsuSheva
27-Sep-16 4:24am
View
It is in a textbox when I write 2500 it becomes 02 500
TatsuSheva
26-Sep-16 13:50pm
View
NumberFormatInfo nfi = (NumberFormatInfo)
CultureInfo.InvariantCulture.NumberFormat.Clone();
nfi.NumberGroupSeparator = " ";
double text = double.Parse(txt.Text);
txt.Text= text.ToString("n", nfi);
I put this but I don't have what I need...
When I write 2500 I have 02 500 but I want 2 500
TatsuSheva
23-Sep-16 13:08pm
View
My idea is to get the title of the presentation and get the process id of the presentation
TatsuSheva
23-Sep-16 12:41pm
View
Ah yes, sorry i will edit it...
TatsuSheva
23-Sep-16 12:04pm
View
Now I need to find the title of the presentation
TatsuSheva
23-Sep-16 12:04pm
View
this is my code...
TatsuSheva
22-Sep-16 7:51am
View
Yes, but my problem here is for the exit event...
TatsuSheva
19-Sep-16 10:52am
View
for each app there is a button are you sure that it will work ?
TatsuSheva
15-Sep-16 13:41pm
View
I can't figure out a solution... Some help please
TatsuSheva
14-Sep-16 12:55pm
View
For app like notepad, calculator, I used processId in order to associate with the button. Like this: private static Button FindProcessButton(long id,FlowLayoutPanel f1)
{
return f1.Controls.OfType<Button>().FirstOrDefault(c => GetProcessId(c) == id);
}
private static long GetProcessId(Control control)
{
if (control.Tag is long)
return (long)control.Tag;
return 0;
}
in the class I call it like this: var button = FindProcessButton(proc.Id, f1);
TatsuSheva
14-Sep-16 12:51pm
View
yes I call an instance of MS Word like what is done in the code above.So I use instance of MS Word how I can associate with the button ?
TatsuSheva
14-Sep-16 12:36pm
View
How could I associate the button and the object together so that when I close my app the button will be removed ?
TatsuSheva
14-Sep-16 12:23pm
View
look at this... Do you think this will resolve my problem ? http://www.codeproject.com/Questions/186322/How-to-get-running-insatnce-of-MS-word-using-C
TatsuSheva
14-Sep-16 9:05am
View
No, It is not what I need. When the window of the MS Word is closed, the button must be removed.
TatsuSheva
8-Sep-16 14:00pm
View
Open MS Word, but I can only open once , when I want to open again Word the error appears
TatsuSheva
8-Sep-16 13:08pm
View
Very funny :)
TatsuSheva
8-Sep-16 12:38pm
View
yes that's right , so there is not a solution ?
TatsuSheva
8-Sep-16 12:20pm
View
I have edited my question
TatsuSheva
8-Sep-16 8:38am
View
Yes, I used the ID for this, now my only problem is when I close the window of Notepad for example the button can't be hidden have a look here for more informations about my problem : https://social.msdn.microsoft.com/Forums/en-US/bd862423-13b9-4458-b270-c005d31e48a8/how-to-restore-the-window-of-an-exems-word-excel-etc-in-c?forum=csharpgeneral
TatsuSheva
7-Sep-16 6:26am
View
I know what you did but my problem is not here... My code works perfectly what it is not working is that it is in a timer and when I open an exe buttons are duplicated here is my problem I need to create only one button for one app , I hope you understood my problem
TatsuSheva
7-Sep-16 5:32am
View
Hello, my aim is my c# application is when I an exe file is open then a button is created on my winform and when the window of the exe is closed the button disappear. the function of the button will be if we click on the button the window is minimized then the window will be restored.
TatsuSheva
6-Sep-16 13:41pm
View
it is simple, in my application I want to open exe applications like Notepad etc, so when the notepad is open, a button is created and when the notepad is closed the button disappear simply and when we click on the button if the window of the notepad is open it will be minmized and whenb the window is minimized it will be restored.
TatsuSheva
6-Sep-16 4:39am
View
When I compile nothing happen even if I put it on a timer.
TatsuSheva
6-Sep-16 4:26am
View
I have to put it on a timer ?
TatsuSheva
5-Sep-16 11:06am
View
What you gave me is the correct one but how I can check if the window is minimized ? Because I want to create a button dynamically when the window is minimized.
TatsuSheva
5-Sep-16 10:18am
View
I need to check if the window is minimized , so a button is created and then when we click on the button the window will restore.
TatsuSheva
5-Sep-16 8:36am
View
Here is what I did:
using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Test
{
class ResizeApp
{
public static IntPtr wdwIntPtr;
[DllImport("user32.dll")]
public static extern IntPtr FindWindow(string className, string windowTitle);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool ShowWindow(IntPtr hWnd, ShowWindowEnum flags);
[DllImport("user32.dll")]
private static extern int SetForegroundWindow(IntPtr hwnd);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool GetWindowPlacement(IntPtr hWnd, ref Windowplacement lpwndpl);
private enum ShowWindowEnum
{
Hide = 0,
ShowNormal = 1, ShowMinimized = 2, ShowMaximized = 3,
Maximize = 3, ShowNormalNoActivate = 4, Show = 5,
Minimize = 6, ShowMinNoActivate = 7, ShowNoActivate = 8,
Restore = 9, ShowDefault = 10, ForceMinimized = 11
};
private struct Windowplacement
{
public int length;
public int flags;
public int showCmd;
public System.Drawing.Point ptMinPosition;
public System.Drawing.Point ptMaxPosition;
public System.Drawing.Rectangle rcNormalPosition;
}
public ResizeApp()
{
}
public static void BringWindowToFront(string processName, FlowLayoutPanel PIC_Barre,Timer tim)
{
tim.Start();
var processes = Process.GetProcessesByName(processName);
if (processes.Any()) //a copy is already running
{
foreach (Process proc in Process.GetProcesses())
{
wdwIntPtr = FindWindow(null, processName);
// IntPtr handle = proc.Handle;
//get t IntPtr handle = proc.Handle; he hWnd of the process
Windowplacement placement = new Windowplacement();
GetWindowPlacement(wdwIntPtr, ref placement);
if ((placement.showCmd & 2) == 2)
{
placement.showCmd = 9;
MessageBox.Show("Restoring");
tim.Stop();
}
else
{
placement.showCmd = 2;
MessageBox.Show("Minimizing");
tim.Stop();
}
// Check if window is minimized
//if (placement.showCmd == 2)
//{
// Button btn = new Button();
// btn.Width = 20;
// btn.Height = 20;
// PIC_Barre.Controls.Add(btn);
// btn.Click += button1_Click;
// //the window is hidden so we restore it
//}
//set user's focus to the window
SetForegroundWindow(wdwIntPtr);
}
}
else
{
}
}
private static void button1_Click(object sender, EventArgs e)
{ ShowWindow(wdwIntPtr, ShowWindowEnum.Restore); }
}
}
But it is not working
TatsuSheva
5-Sep-16 7:54am
View
I don't know if you understood my problem. My problem is how I will do to restore the window of the exe ?
TatsuSheva
19-Aug-16 13:06pm
View
Thank you, this works.
TatsuSheva
19-Aug-16 10:36am
View
You are right... The last solution is to create my own calculator
TatsuSheva
19-Aug-16 8:19am
View
It is possible to show the calculator in a WinForm ? The error comes here SetParent(proc.MainWindowHandle, this.panel1.Handle); but when I remove the Thread.Sleep(200); the calculator appears but not on the winform
TatsuSheva
18-Aug-16 8:52am
View
I put this inside my method ? inside of this ?? if (operator == "+")
{...}
TatsuSheva
18-Aug-16 8:21am
View
In the output I want this to be displayed: 1+1=2+2=4 It means that the operation continue but what I can do is 1+1=2 I can't continue the operation .
TatsuSheva
18-Aug-16 7:56am
View
How to use StringBuilder ? I have never used it.
TatsuSheva
18-Aug-16 7:46am
View
I edited my question.
TatsuSheva
17-Aug-16 11:12am
View
?????
TatsuSheva
17-Aug-16 7:20am
View
Any solution ?
TatsuSheva
17-Aug-16 5:32am
View
Hello, did you tried for the calculator ? Is it working with you ?
TatsuSheva
4-Aug-16 12:05pm
View
yes I am implementing in my computer. The server start before the client.
TatsuSheva
4-Aug-16 11:49am
View
did it but nothing happened
TatsuSheva
4-Aug-16 7:40am
View
I was able to do a LAN chat but if I want to do for an entire company how I can do it ? through Internet ?
TatsuSheva
3-Aug-16 11:48am
View
Ok, I will try to find something else.
TatsuSheva
3-Aug-16 11:41am
View
I am trying to use the code source of this http://www.codeproject.com/Articles/12893/TCP-IP-Chat-Application-Using-C
Is it a good idea ? I can't connect myself to the chat...
TatsuSheva
3-Aug-16 11:34am
View
users name so that when they will try to connect to the chat it is through the database.
TatsuSheva
3-Aug-16 11:09am
View
yes but the users I can get all their names from the database , I mean for the connexion to the chat it is through a server.
TatsuSheva
3-Aug-16 11:06am
View
i know how to use Mysql but in the case of a chat don't know...
TatsuSheva
3-Aug-16 11:05am
View
I read this one but don't know where I have to use MySql http://www.codeproject.com/Articles/12893/TCP-IP-Chat-Application-Using-C
TatsuSheva
3-Aug-16 11:03am
View
I don't know how to begin sincerely it is my first time that i have to deal with that. I need to create an ICQ chat where I have to use Mysql in order to show all the users.
TatsuSheva
29-Jul-16 13:58pm
View
the file specified is unknown
I just had to put the path
TatsuSheva
29-Jul-16 13:22pm
View
I tried to open Word by putting WINWORD.EXE it shows me the error x)
TatsuSheva
29-Jul-16 13:15pm
View
Okay thank you.
TatsuSheva
29-Jul-16 12:43pm
View
In fact, my Win is 64bit but it works perfectly.
TatsuSheva
29-Jul-16 12:34pm
View
Thank you , you saved my day.
TatsuSheva
28-Jul-16 5:44am
View
So how to check if it is by wire then ?
TatsuSheva
28-Jul-16 5:31am
View
I got Tunnel, it means that it is by wire ?
If I want to translate the Tunnel into another language how I can do it ?
TatsuSheva
21-Jul-16 8:38am
View
I am doing an application like a "kiosk mode" so the application will open and then it will show to the user that if he is connected to internet,connected to the database, show the status of the volume.
I am using WAMPServer so when I disconnect WAMPServer, the picture bas_off appears and so on.
TatsuSheva
21-Jul-16 8:23am
View
I didn't touch anything. I only put the timer and then put this code on the timer.
TatsuSheva
21-Jul-16 8:10am
View
I can't write in textbox or click a button when the status is disconnected.
base_on,base_off are pictures that will appear based on the status
TatsuSheva
15-Jul-16 11:13am
View
Ok, thank you it solved my problem.
TatsuSheva
13-Jul-16 10:54am
View
I figured out a solution thank you.
TatsuSheva
13-Jul-16 7:00am
View
I found a solution for this problem but when I start the application in C# all the keys are blocked. I can't write anymore. Is there any solution ?
TatsuSheva
12-Jul-16 10:04am
View
Haha don't worry it is a project work I am in a compagny and my employer asks me to do that.
TatsuSheva
12-Jul-16 7:13am
View
public static class WindowsKey {
///
/// Disables the Windows Key
///
/// <remarks>May require the current user to logoff or restart the system
public static void Disable() {
RegistryKey key = null;
try {
key = Registry.LocalMachine.OpenSubKey("System\\CurrentControlSet\\Control\\Keyboard Layout", true);
byte[] binary = new byte[] {
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x00,
0x03,
0x00,
0x00,
0x00,
0x00,
0x00,
0x5B,
0xE0,
0x00,
0x00,
0x5C,
0xE0,
0x00,
0x00,
0x00,
0x00
};
key.SetValue("Scancode Map", binary, RegistryValueKind.Binary);
}
catch (System.Exception ex) {
Debug.Assert(false, ex.ToString());
}
finally {
key.Close();
}
}
///
/// Enables the Windows Key
///
/// <remarks>May require the current user to logoff or restart the system
public static void Enable() {
RegistryKey key = null;
try {
key = Registry.LocalMachine.OpenSubKey("System\\CurrentControlSet\\Control\\Keyboard Layout", true);
key.DeleteValue("Scancode Map", true);
}
catch (System.Exception ex) {
Debug.Assert(false, ex.ToString());
}
finally {
key.Close();
}
}
}
This code doesn't work for me why ? Yes I read and I tried to use it in my app but I didn't find out.
TatsuSheva
8-Jul-16 6:20am
View
do you know how we can write in the registry using c# ?
TatsuSheva
8-Jul-16 5:38am
View
How can I write a proxy using c# ?
TatsuSheva
7-Jul-16 13:10pm
View
Ok thank you.
TatsuSheva
7-Jul-16 12:38pm
View
Ah Okay I see. I will think about it and maybe bring with something new.
TatsuSheva
7-Jul-16 12:08pm
View
I agree but this is the choice of my employer... I am in internship but what is the best alternatives to avoid MDI ?
TatsuSheva
7-Jul-16 11:34am
View
I have two forms. The first form is in MDI, when I click on the button to go to the next form, the buttons of the first form appeared on the second form like what it is in the picture.
TatsuSheva
7-Jul-16 11:04am
View
Here is the link for the picture http://imagesia.com/user_193e8
TatsuSheva
7-Jul-16 7:53am
View
Thank you, my goal is achieved.
TatsuSheva
7-Jul-16 5:54am
View
thank you it works.
TatsuSheva
5-Jul-16 12:09pm
View
I did for the display but my problem is how I will do for Delete() and UpDate().
i used a DataGridView to display the data but how it will work for deleting and updating
?
TatsuSheva
5-Jul-16 11:13am
View
Here the data are already written but in my case the data will be stored on different textboxes.
Is it the same way ?
TatsuSheva
4-Jul-16 13:41pm
View
I found the solution thank you.
TatsuSheva
4-Jul-16 12:14pm
View
Okay, I will try my best.
TatsuSheva
4-Jul-16 11:48am
View
In your case, it was a transfer of data but mine it is to open a form with the MDI method, do you think it will work ?
TatsuSheva
4-Jul-16 11:35am
View
There is no another method ?
TatsuSheva
30-Jun-16 11:27am
View
Do you know any solution for this ?
Show More