|
my problem that i want to make simple c# program that take a arabic word and translate it to english (like dictionary) and vise verse from english to arabic
i think that i can use Word Automation especially research pane in MS word but i do not know how i can use it in my c# program,
if anyone know how i can use it or he has an alternative solution to my problem ,please tell me
Thanks
|
|
|
|
|
Do a search on MSDN for 'Localization'
There are 10 kinds of people in the world.
Those that read binary...
...and those who don't.
|
|
|
|
|
Hi Everybody !
My name is Kostas and i build a C# Application about e-learning .
My problem is to make the *.mpg files come with my Application not to play on any Media Player exept my application .
I can Encode and Decode my files with many tools i found to protect them .
But the Decoding must be on the fly - So the user dont have to wait to Decode the media and then Play .
Please is there anyone can help .
|
|
|
|
|
Hi Kostas
From my point of view i think this idea isn't practical at all BUT
you can Compress them in a password protected pckage ( like zip, rar, and preferably 7z ) and silently decompress it in the background and then play it
Ahmad Shaban
|
|
|
|
|
I create a form in the first Part of my class via
FormBuzWindow myFormBuzWindow = new FormBuzWindow(); and set this one visible.
Via pressing ALT+F4 this one can be closed. Is there a way to "reuse" the myFormBuzWindow Variable. I tried a to use myFormBuzWindow = new FormBuzWindow(); in case I notice this is gone, but the form never shows up again. Did I do something wrong or knows anyone how to make the form come back again?
|
|
|
|
|
Hi,
I created a custom control inheriting the class Control. my idea was to create a transparent control like LinkLabel.
i can click the button deploying my test application to PPC but in smart phone i cannot select the created controls though it has TabIndex value specified.
do i have to override some specific method to enable selection of control?
will really appreciate,
rnv
|
|
|
|
|
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.OleDb;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace Personal_WebPage
{
///
/// Summary description for WebForm1.
///
public class Login : System.Web.UI.Page
{
protected System.Web.UI.HtmlControls.HtmlTable tblContent;
protected System.Web.UI.WebControls.Label lblUser;
protected System.Web.UI.WebControls.Label lblPass;
protected System.Web.UI.WebControls.TextBox txtUser;
protected System.Web.UI.WebControls.TextBox txtPass;
protected System.Web.UI.WebControls.Label lblError;
protected System.Web.UI.WebControls.Button btnLogin;
protected System.Web.UI.HtmlControls.HtmlTable tblHeaderMF;
protected System.Web.UI.HtmlControls.HtmlTable tblMenuMF;
protected System.Web.UI.HtmlControls.HtmlTable tblFooterMF;
protected System.Web.UI.HtmlControls.HtmlTable tblFrame;
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.btnLogin.Click += new System.EventHandler(this.btnLogin_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void btnLogin_Click(object sender, System.EventArgs e)
{
string ConnectionString =
"Provider=Microsoft.Jet.OLEDB.4.0 " +
";Data Source= C:\\Inetpub\\wwwroot\\Personal_WebPage\\Database.mdb";
Search(ConnectionString);
}
private void Search(string ConnectionString)
{
string SQLcmd;
string strUser, strPass;
bool Check=false;
OleDbConnection conn = new OleDbConnection(ConnectionString);
conn.Open();
strUser = txtUser.Text;
strPass = txtPass.Text;
SQLcmd = string.Format("select UserName,PassWord from tblAccount where UserName = {0} and PassWord = {1}",strUser,strPass);
OleDbCommand cmd = new OleDbCommand(SQLcmd,conn);
OleDbDataReader objReader;
objReader = cmd.ExecuteReader();
while (objReader.Read())
{
if ((objReader.GetString(0) != "") && (objReader.GetString(1) != ""))
Check = true;
}
if (Check==true)
Response.Redirect("MainFrame.aspx");
else
{
lblError.Visible=true;
Response.Redirect("Login.aspx");
}
objReader.Close();
conn.Close();
}
}
}
|
|
|
|
|
You've not posted any question!!
|
|
|
|
|
hi,
atleast tell what problem u r having.
Regards
|
|
|
|
|
yamacom wrote: SQLcmd = string.Format("select UserName,PassWord from tblAccount where UserName = {0} and PassWord = {1}",strUser,strPass);
That's a really dangerous security problem. You should use parameterized queries, like this article says:
SQL Injection Attacks and Some Tips on How to Prevent Them[^]
And posting code is not enough, you have to ask a question. Also, don't post much code, just a few lines where you are having your problem.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
|
|
|
|
|
hi everyone!
i think the code was right but it's always reported that there is an error at:
objReader = cmd.ExecuteReader();
i have no idea why was that
|
|
|
|
|
yamacom wrote: SQLcmd = string.Format("select UserName,PassWord from tblAccount where UserName = {0} and PassWord = {1}",strUser,strPass);
You have to enclose the user name and password in quotes. Eg:
SQLcmd = string.Format("select UserName,PassWord from tblAccount where UserName = <big><big>'</big></big>{0}<big><big>'</big></big> and PassWord = <big><big>'</big></big>{1}<big><big>'</big></big>",strUser,strPass); BUT that is not a secure practice. You should use parameterized queries, and store the hash of the password instead of the actual password in your database. Read the article I linked to in my previous post. Better yet, I'll link to it again:
SQL Injection Attacks and Some Tips on How to Prevent Them[^]
[EDIT: next time, post just a little code, the problem you're having and your question, and any error message you might be getting. That will give your question more chances of being answered.]
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
The amount of sleep the average person needs is five more minutes. -- Vikram A Punathambekar, Aug. 11, 2005
-- modified at 12:29 Wednesday 22nd March, 2006
|
|
|
|
|
Hi!!
i am developing an C# Windows application!!
in that i want to programatically find out if a Particular File is Open(in use) or not!!
Is there any way ?
One Shot dont miss you chance to go!!!!
|
|
|
|
|
Try to rename the file, and if an exception is throw , means
that you cannot open it .
DevIntelligence.com - My blog for .Net Developers
|
|
|
|
|
hi!!
I have drawed a rectangle, then i want to change the angle and repaint again by mouse event.
I try to use Graphic.RotateTransform method, but the whole graphics is rotate and i cannot catch the right co-ordinate of that rectange.
How can i catch the co-cordinate after changing angle or what method can i use to make it work?
Thanks!!
|
|
|
|
|
Hi Guys,
I'm creating a descent dll to use for future programming with COM objects.
I'm having trouble with passing some parameters like the following:
<br />
unsafe public long GetDlgText(long dlgid, long fldid, long row, long col, [MarshalAs(UnmanagedType.BStr)] string text){<br />
long returnvalue = -1;<br />
try{<br />
object[] cmds = { dlgid, fldid, row, col, text };<br />
returnvalue = Convert.ToInt64(Interaction.CallByName(idisp, "GetDlgText", CallType.Method, cmds));<br />
}
catch(Exception e) {<br />
lasterrormessage = "Could not invoke GetDlgText function: " + e;<br />
}
return returnvalue;<br />
}
which I've translated from the following:
long GetDlgText(long DlgId, long FldId, long Row, long Col, BSTR* Text);
I'm calling it like this:
string test = "";<br />
idisp.GetDlgText(101, 47, 1, 0, test);<br />
I get a TYPE_DISMATCH error and I'm pretty sure it's the last parameter (all the complete non-pointer methods work)
What do I do wrong? I've searched on Marshal, passing by value and a lots of other things, but MSDN isn't kind to me .
I hope somebody can help me, tnx!
No hurries, no worries.
|
|
|
|
|
You most likely need int and not long
|
|
|
|
|
I've tried, even with short, but it doesn't work .
tnx though
No hurries, no worries.
|
|
|
|
|
|
I've tried, still the same, and with Int16 also
thanks for the effort though
No hurries, no worries.
|
|
|
|
|
Hi, I'm trying to read a .DBF (Database 4) file with ADO.NET and CodeBase for .NET. Everything works for all the fields, except the password field which is encrypted. Below you will find the code. The data is stored properly on the database, but when I read it back I'm getting different results. On the database is 0xAA091B3BFA. Reading it back in I can see the 0xAA and the 0xFA at the end have been changed to something else. Is there a way to read the data and say AS IS? Or could this be a bug with CodeBase?
strUserID = efUserID.Text;<br />
strUserID = strUserID.ToUpper( );<br />
<br />
strSelect = "Select * from USERIDS where ID = " +<br />
"'" + strUserID + "'";<br />
<br />
odbcDataAdapter = new OdbcDataAdapter(strSelect, odbcConnection);<br />
odbcCommandBuilder = new OdbcCommandBuilder(odbcDataAdapter);<br />
odbcDataAdapter.Fill(dataSet, "User");<br />
#endregion<br />
<br />
#region Populate the local variables with the table values<br />
DataTable dataTable = dataSet.Tables[0];<br />
<br />
foreach (DataRow dataRow in dataTable.Rows)<br />
{<br />
strUserID1 = (string) dataRow["ID"];<br />
strName = (string) dataRow["NAME"];<br />
strPassword = (string) dataRow["PASSWORD"];<br />
strExtension = (string) dataRow["EXTENSION"];<br />
} <br />
Thank you,
Glenn
|
|
|
|
|
Hi,
I'm realtively new to regex expressions and I'm trying to make the best out of documentation, however I don't know how to go on about this one.
I want to match crc checksum enclosed in square brackets. The best I can come up with based on documentation and expresso examples is this:
(?<=(?:\[))[a-fA-F0-9]{8}(?=(?:\]))(?x)
The problem is that I want to make it a little more foolproof. Is it possible to check if the expression inside the square brackets has at least two numbers AND at least two characters AND has a total length of 8? Is it possible at all?
PS a little side question, not related to the main one. MSDN says that [0-9]^4 will match any 4 digit sequences, however when I try it out in expresso it doesn't work... In fact it doesn't appear to work at all (except as a part of negation in a set).
PPS actually I have another side question. I also match quoted expressions. Documentation says :q should match it, which is equivalent to (("[^"]*")|('[^']*')). However neither :q nor \q work for me, however if I put it in explicit form (("[^"]*")|('[^']*')) it does. What am I doing wrong?
Thanks, JJR
-- modified at 9:29 Tuesday 21st March, 2006
|
|
|
|
|
Hello,
I have a dataset, that has only one table. I load the dataset using SQLDataAdapter. I add a single row to the table. Here is a dilema:
How do I push the changes to the server, and then reload the datatable with the updated source. The thing is, I use
this.adapter.Update(dataTable);
now, I want to reload only the new row that I have added and not the whole table. So is there a way of getting back only the new row from a server, and not clear the whole table and then Fill the table again using the adapter. Any ideas?
Thank you.
|
|
|
|
|
Hi friends,
Am on the deveelopment of a private chat web-application module. I need to know the intiative i have taken will head to the right point. i have started doing it with Socket Programming and TCP. Is this the right way to do or is there a better method.
Requirement goes like this.
A link will be displayed on the user profile page that "I am online". On click of this a window should pop in both the user's computers and they should be able to do a private chat.
Am at a stage where I can connect two Systems on LAN and exchange messages through socket programming via Console application. Also please let me know how to open a new widow on a different computer and display the sent messages in it. Do i need to use Remoting concept to do this.
Please advice.. Any sugestion or advice would be appreciated..
Thanks in Advance,
shabeer
|
|
|
|
|
hi shabeer,
If your application is only for LAN then TCP sockets is somethig that is genrally used. If you need your application to be used from Internet then this TCP socket will not work if you computer is behind a proxy. So It all depends what is the scope of your project.
Also its better if you use synchronous communication for sosckets as you handle of all threads and can manage threading rather that using system threads when by using asynhronous communication.
In short- TCP sockets will not work behind proxy.
you need to have all you system with external IP if using tcp sockets.
Regards,
Anil
|
|
|
|
|