|
|
|
How can i get the message which was send by another computer. (netsend)
This message is always shown in such a terrible looking screen. How can I put the arrival message into a myself programmed screen??
Richie
-- modified at 14:37 Tuesday 21st March, 2006
|
|
|
|
|
hi, can any body help me out for serial communication using rs232 standard in c#
|
|
|
|
|
Hello,
I have a parent form where i load a child form on a panel. Now i want to access from the panel a control on the parent, here the toolstripprogressbarr. How can I manage that?
On the parent form I do the following to load the child in the control panel1 of parent.
newF = new Child01();
newF.TopLevel = false;
newF.Parent = panel1;
newF.Show();
Now I do a small manual operation in the Child01 form which leeds to an operation. during this operation I'd like to make the toolstripProgressBar Visible.
I hope that someone can point me in a good direction.
|
|
|
|
|
Have the child throw an event and the parent will catch it and and then do stuff. Create a delegate in the child, have the delegate point to a parent method, when the event runs, the child will call its delegate, which of course will call the parent method.
There are examples of this on MSDN, just search for delegate, event, or maybe subscriber/publisher design.
Mike
|
|
|
|
|
Hi,
I'm trying to display a string that has some weird characters in hex so I can see what they are. I've tried the code below but I'm still getting the characters, not the hex values that make up the characters:
<br />
string sHex = string.Format("{0:4x}", sPassword);<br />
How do I display a hexidecimal representation of the string?
Thank you,
Glenn
|
|
|
|
|
Loop through the characters of the string, convert each character value to an int and format that as a hex value.
---
b { font-weight: normal; }
|
|
|
|
|
I'm writing a deployment package and I am down the the last piece of what I need to do. All of the DLL's will have been installed. Now I need to call my custom installer and perform the following two items:
Register 5 DLL's in the GAC
Add registry keys to those components so they show up in Add Reference
Are there any managed API calls I can make to accomplish these two tasks? Or do I have to use out of process calls to GACUTIL and make Win32 calls for the registery?
Oh yes, I'm using Visual Studio 2003.
Thanks!
-- modified at 13:23 Tuesday 21st March, 2006
|
|
|
|
|
Well I think I have the solution to my problem.
First for the registry entries I can just use the Registry portion of my setup project to dynamically manage those entries.
For GAC registration, I'm creating a .cmd file with the gacutil commands then I create a process for that .cmd file which I then do a process.Start(); followed by a process.WaitForExit(); and I think I've got it.
|
|
|
|
|
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!!
|
|
|
|