|
Adding a font-family to the control doesn't make sure that what so ever language you're going to use, is being stored. What you need to make sure is that the data source you're going to store works with Unicode too. Either this, or the methodology for displaying the text in the database doesn't work with Unicode.
Here is another question thread[^] that you might be interested in. This problem is just with the Unicode formatting of the characters, to display international-languages and their scripts. So basically, just make sure that the database and the method for displaying it, supports the Unicode structures.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
hi
this is my datatable method
public DataTable Data(string colName)
{ OpenDB();
SqlDataAdapter adapter = new SqlDataAdapter();
DataSet ds = new DataSet();
string strCmd = "Data";
SqlCommand cmd = new SqlCommand(strCmd, conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@col", SqlDbType.VarChar, 50));
cmd.Parameters[0].Value = colName;
adapter.SelectCommand = cmd;
adapter.Fill(ds);
conn.Close();
return (ds.Tables[0]);
}
i want tis method not to return anything
how to modify???
DataSet ds = new DataSet();
adapter.Fill(ds);
return (ds.Tables[0]);
doesnt help if i remove the above 3 lines of code
thanks in advance
modified 2-Aug-18 21:02pm.
|
|
|
|
|
Change the signature to public void Data(string colName) ?
|
|
|
|
|
thank you
but now i am unable to execute my stored prodedure
i need to execute my procedure but expect no return from sql.
modified 2-Aug-18 21:02pm.
|
|
|
|
|
You are looking for ExecuteNonQuery, probably your command type or the adapter.???
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
public void Data(string colName)
{
OpenDB();
string strCmd = "Data";
SqlCommand cmd = new SqlCommand(strCmd, conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@col", SqlDbType.VarChar, 50));
cmd.Parameters[0].Value = colName;
cmd.ExecuteNonQuery();
conn.Close();
}
|
|
|
|
|
Hello there!
I am making a program that lets the user type certain lines in a textbox.
Example:
X: 24+/26~/19+
How can I make the program send these lines out without taking the + as addition and ~ as an enter other than forcing the user to add {} around the signs?
Thanks in advance!
Linus.
modified 1-Feb-15 11:59am.
|
|
|
|
|
It is simple. Take the string in the textbox and replace all special characters with {yourch} by using the string.Replace method.
example:
string x = this.textbox1.text;
x=x.Replace("+", "{+}");
Then send the string x by using the SendKeys method.
Bye!
Lusvardi Gianmarco
|
|
|
|
|
Superb!
Works flawlessly.
Thanks a thousand times buddy!
|
|
|
|
|
You're welcome!
Lusvardi Gianmarco
|
|
|
|
|
Hi,
Everyone
I want to ask that what is an Object Type in c#?
Thanks,
In Advance...
|
|
|
|
|
Hi,
The Object (or object, in C# is the same), is the main type for all reference types (which are classes, like List<t>, Controls, FileInfo and so on). Every class, whether you create it or not, implicitly derives from object even if it derives from another one and I'm going to explain you why. Even if you create a class and make it derive from another, that other class must derive from some other class. If you dig through the hierarchy of a class, you'll find that the very base class is object.
In simple words: any reference type can be converted in object. More exactly, all reference types are objects.
So object is the base class of any other class, even if specified another one to derive from.
Have you understood it more deeply? From the question I can understand you're a beginner. On Codeproject you can find useful tutorials for beginners in C# such as Diving in OOP[^]. Please read them as they are really useful.
To make it even more simple: object can encapsulate every reference type you use. You can say that FileInfo is an object implicitly, but you'll need an explicit conversion to say the contrary: that an object is a FileInfo.
Hope this helps.
LG
Lusvardi Gianmarco
|
|
|
|
|
Not quite: An Object is the base class on which all classes (reference types and value types) are based. Object is not limited to reference types, value types are derived from Object as well.
https://msdn.microsoft.com/en-us/library/9kkx3h3c.aspx[^]
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Yes, you're right. Becuase ValueType, the class all value types derive from, derives from Object. Yes, I forgot to mention this aspect.
Lusvardi Gianmarco
|
|
|
|
|
An Object is the base class on which all classes (reference types and value types) are based - as explained by Lusvardi Gianmarco (Jymmy097) - except that Object is not limited to reference types, value types are derived from Object as well.
But I'm not sure that is what you are trying to find out. Can you explain your question in more detail?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
we are using constant constantAlphaImage we are able to draw but without transparency.
imagingImage allow us to apply transparency to png but dont allow to draw.
We are looking to do this effect on the screenshot [url=http://postimg.org/image/bl2e8iy2v/full/][img]http://s7.postimg.org/hm035lkp7/overlaping.png[/img][/url]
Where 1 lap overlap the other chaning the color.
|
|
|
|
|
OK, so what's the question?
|
|
|
|
|
Given the limits of the Compact FrameWork drawing library which include use of transparency for only one color [^], and the fact that people generally have trouble with using the Alpha channel:
"Unfortunately, the NETCF bitmap loader creates a bitmap with the same pixel format as the display when loading a bitmap file or resource and loses the alpha channel information (if present)." [^].
The MSDN blog linked to above may be your best starting point, and it does have usable code.
Looks like you are in for some hairy use of P/Invoke. Note that I don't have a Win Phone and have never programmed to CF.
«I'm asked why doesn't C# implement feature X all the time. The answer's always the same: because no one ever designed, specified, implemented, tested, documented, shipped that feature. All six of those things are necessary to make a feature happen. They all cost huge amounts of time, effort and money.» Eric Lippert, Microsoft, 2009
modified 1-Feb-15 6:38am.
|
|
|
|
|
we try this, but we cant draw polygon with imagingimage,we can only alpha blending files png.
|
|
|
|
|
How can use these WinApi function in c#
Hello i want use a dll file in C#;
this dll file have made in C++ Language.
I want use two function in this Dll file.
This dll file definition c# file is like here:
Code:
using System;
using System.Runtime.InteropServices;
public static class Lcad
{
public const int LC_FALSE = 0;
public const int LC_TRUE = 1;
public const int LC_LBUTTON = 1;
........
.........
[DllImport("litecad.dll", EntryPoint="lcDrwLoadMem", CharSet = CharSet.Unicode, ExactSpelling = true)]
public static extern bool DrwLoadMem(int hDrw, int hMem, int hLcWnd);
[DllImport("litecad.dll", EntryPoint="lcDrwSaveMem", CharSet = CharSet.Unicode, ExactSpelling = true)]
public static extern int DrwSaveMem(int hDrw,int hMem, int MemSize);
}
I want use lcDrwLoadMem and LcDrwSaveMem in my appliation.
I want give some information from dll help file:
These two function definitons:
int lcDrwSaveMem (
HANDLE hDrw,
HANDLE hMem,
int MemSize
);
Parameters
hDrw
Handle to a drawing object.
hMem
Pointer to a memory buffer. If this value is NULL, then LiteCAD will not write to a memory, but, calculates the drawing's size only.
MemSize
Size of the memory buffer, in bytes. This will be ignored if the hMem argument is NULL.
Return Value
Number of bytes copied to a memory. If the return value is zero - an error occurred during this operation. This can happen if the memory buffer size is too small to contain the drawing.
If hMem parameter is NULL, then the return value is a number of bytes required to contain the drawing.
Remarks
Your application must allocate a memory buffer of sufficient size to store the drawing. To determine the drawing's equivalent buffer size, use this function with the hMem=NULL parameter.
And other function:
--------
Loads a drawing's data from a memory buffer. The data must has LCD format.
BOOL lcDrwLoadMem (
HANDLE hDrw,
HANDLE hMem,
HANDLE hLcWnd
);
Parameters
hDrw
Handle to a drawing object.
hMem
Pointer to a memory buffer containing a drawing in LCD format.
hLcWnd
Handle to a design window. Specify NULL if you do not want to display the drawing.
Return Value
If the function succeeds, the return value is nonzero (TRUE).
And I want give an Example from help file:
Code sample LiteCAD API
Save and load a drawing using memory buffer
Code:
// global memory buffer
BYTE* gpMem = NULL;
// Save a drawing into memory buffer
//-----------------------------------------------
BOOL SaveToMem (HANDLE hLcDrw)
{
int MemSize;
if (gpMem != NULL){
// the buffer is not empty, clear it
delete[] gpMem;
gpMem = NULL;
}
// get size required for memory buffer
MemSize = lcDrwSaveMem( hLcDrw, 0, 0 );
if (MemSize > 0){
// allocate memory buffer
gpMem = new BYTE[MemSize];
// write a drawing database into the memory buffer
lcDrwSaveMem( hLcDrw, (HANDLE)gpMem, MemSize );
return TRUE;
}
return FALSE;
}
// Load a drawing from memory buffer
// If you don't need to display the loaded drawing, then specify 0 for hLcWnd
//-----------------------------------------------
BOOL LoadFromMem (HANDLE hLcDrw, HANDLE hLcWnd, BOOL bClearMem)
{
BOOL bRet = FALSE;
if (gpMem != NULL){
bRet = lcDrwLoadMem( hLcDrw, (HANDLE)gpMem, hLcWnd );
// clear memory buffer (if don't needed any more)
if (bClearMem == TRUE){
delete[] gpMem;
gpMem = NULL;
}
}
return bRet;
}
Can anybody convert this example to c# code.Please help me.
|
|
|
|
|
Hi,
I have configured the tessnet2 in c# for my project and it is reading complete sentence when
there is no space in sentence.If any gap or space found in the sentence it will not continues. This
means it is reading only one word.
Please help.
Deatails :
If my image having the data : ABCDEFGH
Result : result from tessnet2 ABCDEFGH
if my image having the data : ABCD EFGH (space between the words)
Result : result from tessnet 2 ABCD
please help and how to solve this issue.
Regards,
Praveen
|
|
|
|
|
We can't answer that - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
We have no idea what your code looks like, how you "configured the tessnet2 in c# for my project", or anything else that might be relevant.
Please, edit your question and provide better information.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
if (Convert.ToInt32(Request.QueryString["update"]) == 1)
{
// go postback
}
}
if (!Page.IsPostBack)
{
UserAccordion12.Visible = false;
PRINT.Visible = false;
SAVE.Visible = false;
Image22.Visible = false;
lblMessage.Visible = false;
DataList4.Visible = false;}
|
|
|
|
|
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
So apart from mismatched brackets, that doesn't make much sense.
Please, try to explain in better detail!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Really? Come on. If you need to call a block of code from multiple places you put that block of code in its own method. You can then call it from anywhere else you need to.
|
|
|
|