|
If you don't know the target language, then learn it! Otherwise you can't sort out subtle differences between the two - and you end up with the computer equivalent of Chinese manuals translated to English: "Thank you for your purchase of CHUWI products Hi12 Series Tablet poly nuclear, Hi12 is a quad-core Tablet PC products CHUWI well-launch of the brand can swim the internet." (Which is the intro to the user manual for the WookieTab)
Sorting out the code version of that can be a total nightmare unless you understand the target and source languages pretty damn well!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I don't know if this is possible. I'm relatively new to C#. I would like to overlay a largely transparent line drawing over the entire screen (or parts of it) such that the image does not receive focus. Rather, any windows directly below the image would receive focus as if the image were not there at all, yet the image would be "always on top" of the windows below. The effect would be similar to taping a line drawing on transparent plastic to the screen. I can overlay an image, but the trick is for the image to ignore mouse activity and pass the mouse to the window(s) below. Thanks for any tips.
|
|
|
|
|
Yes, it is possible, but it is not a simple matter for someone new to C#.
|
|
|
|
|
Richard: Thanks for your quick reply. I'm not really new to C#, just rusty since I haven't used it in a while. However I have in the past worked with images, windows, etc., so if you could give me some hints on the tricks necessary to create what I would call a ghost overlay I'd really appreciate it. You don't need to keep it simple or basic. I will get it. I'm guessing there would be some message re-routing or pass-through involved, but I'm not sure. Thanks again.
|
|
|
|
|
|
No shame in offering solutions.
|
|
|
|
|
I installed "CRRuntime_32bit_13_0_19" but in installation time it give me file missing error
I ignored that and it installed.
Now when i make a report by wizered it runned successfully but when i give it data table as datasource to it give the file not load error
|
|
|
|
|
Perhaps you ought to re-install the package and not ignore the error this time?
|
|
|
|
|
As CHill60 says, ignoring a missing file is probably not a good idea. If you bought a new car and when it was delivered one of the front wheels was missing, would you accept it and expect it to work fine? No? So why would you expect software to work with a big chunk missing either?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Send wheelz! Urgent!
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I have a DataGridView in which there are 4 columns; Reference,Quantity, Rate and Amount.
The DataGridView is Editable. When I enter a value in the Reference Column then immediately it will fill the other values in the others cells from mysql database.
This is what I tried....
private void TAB_Credit_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
try
{
if (TAB_Credit.CurrentCell.ColumnIndex == 0)
{
MySqlDataAdapter sa = new MySqlDataAdapter("SELECT * FROM table WHERE Reference='" + TAB_Credit.Rows[e.RowIndex].Cells["Reference"].Value + "'", MyConnexion);
DataTable dt2 = new DataTable();
sa.Fill(dt2);
double value = (double)TAB_Credit.Rows[e.RowIndex].Cells["Quantite"].Value * (double)TAB_Credit.Rows[e.RowIndex].Cells["PU"].Value;
TAB_Credit.Rows[e.RowIndex].Cells["Designation"].Value = dt2.Rows[0]["Designation"].ToString();
TAB_Credit.Rows[e.RowIndex].Cells["Quantite"].Value = dt2.Rows[0]["Quantite"].ToString();
TAB_Credit.Rows[e.RowIndex].Cells["PU"].Value = dt2.Rows[0]["Prix_Unitaire"].ToString();
TAB_Credit.Rows[e.RowIndex].Cells["Total"].Value = value.ToString();
}
}
catch
{ }
}
So in the datagrid, when I insert in the Reference Cell nothing is appearing in the other cells.
Thank you.
|
|
|
|
|
Get rid of the try-catch. You are swallowing any exceptions that are being raised which is very, very bad practice.
Also never, ever use string concatenation with user-entered information to create sql commands - you are leaving yourself wide open to SQL Injection attacks - see Query Parameterization Cheat Sheet - OWASP[^]
Make those two changes and see what happens. If there is an error reported let us know what it is.
|
|
|
|
|
Do not repost you have already posted this in C# questions.
modified 20-Sep-20 21:01pm.
|
|
|
|
|
i want to create point and move it from point to another point on picturebox in time
i want this code in c#
|
|
|
|
|
Member 13154038 wrote: i want this code in c# Then you will need to write it; this site does not provide code to order.
|
|
|
|
|
DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalization if you want to be taken seriously.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
When I finished serialize and Deserialize,and create a local file .
But if i need update code, i create a new variable in SerializationInfo ,for example ,I declare a new variable "A" in code. But when i deserialize exist old local file, the exception warning is "can not find A", so Deserialize failed. How can i do if i want to ignore A when deserialize old files?
|
|
|
|
|
It depends how your deserialisation is working, but basically you need something in the file to tell you which version the contents were created with.
|
|
|
|
|
how to do it? I don't know how to do....Could u send me an example?
|
|
|
|
|
Example of what? I have no idea what your code is doing or how you are managing your data. Just think about what you are trying to do. If you change the definition of a class after it is serialised, then the data will no longer match. So you need some way to use the previous definition to deserialise it. How you achieve this will depend a lot on the structure of your data and the associated classes.
|
|
|
|
|
Yes, but i have no idea to achieve it...Could u help me?
For example,
Class A
{
int a=0;
int b=0;
}
When i finished serialise class A and create a local file "Saved".
When i update my Class A
Class A
{
int a=0;
int b=0;
int c=0;
}
Then deserialise "Saved", it will throw exception ,how can i do it? I hope when i deserialize "Saved",it will ignore c.
|
|
|
|
|
You cannot do it with the new class, because it does not match. You must deserialize into an instance of the old class and then copy the data to the new one.
[edit]
If the new version of your class is actually based on the original you may be able to do it that way using a cast. Should be easy to test.
[/edit]
|
|
|
|
|
Oh, actually, my Class is a form , i use serilized to store input data, like textbox or radiobutton data.
When my project version update, maybe i will add some textbox or other controls in form class, so i will not deserilize old file, i don't know how to handle it.
Please tell me a method to realize save function.
|
|
|
|
|
You probably need to write a custom serialiser.
|
|
|
|
|
Please help i am new to C# and i have a windows form with textbox1, textbox2, and buttom1 i would like to print the value of textbox1 without previewing or let me say straight to the printer without any interactions, textbox value has to be the number of capies i would love to print and also to page number all those copies say if i input 3 it should say page 1/3 2/3 3/3 please help and excuse my english i have the following code under my button
private void button1_Click(object sender, EventArgs e)
{
PrintDocument printDocument = new PrintDocument();
printDocument.DefaultPageSettings.Landscape = true;
printDocument.DefaultPageSettings.PaperSize = new PaperSize("zed", 400, 850 );
//printDocument.PrinterSettings.Copies = 2;
printDocument.PrintPage += PrintDocumentOnPrintPage;
printDocument.Print();
|
|
|
|