|
Hi all,
Can anyone tell me that how to fire drag drop event in richtext box in C#.net??
Thanks in advance
Lijo
|
|
|
|
|
Basically, you have to set AllowDrop property to true , and use DragEnter event and DragOver
Calin
|
|
|
|
|
But in .net 2.0 i am not able to find out drag drop and drag enter event for rich text box??so how can i get it??
Regards
Lijo
|
|
|
|
|
|
you are saying that the events are not browsable from the Properties, right?
Try by extending the RichTextBox .
Calin
|
|
|
|
|
Hi ,
I am new to windows application. so i dont have much idea about this.Can u please explain me how it can be done?
Regards
Lijo
|
|
|
|
|
Actually, you don't need to have the events in the properties window, you may handle the events like this:
public Form1()
{
InitializeComponent();
richTextBox1.DragDrop += new DragEventHandler(richTextBox1_DragDrop);
richTextBox1.DragEnter += new DragEventHandler(richTextBox1_DragEnter);
}
void richTextBox1_DragEnter(object sender, DragEventArgs e)
{
throw new Exception("The method or operation is not implemented.");
}
void richTextBox1_DragDrop(object sender, DragEventArgs e)
{
throw new Exception("The method or operation is not implemented.");
}
Calin
|
|
|
|
|
Thank you....
regards
Lijo
|
|
|
|
|
Hi all,
On the release mode only, when build the project I want to execute a bat file. That bat file do another process.
What I've try is add the bat file name as the command argument in project property as pre-build event command line.
But it not works for me. Can anyone comments on this.
Thanks you.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
|
Something like this,
if $(ConfigurationName) == Release yourbatchfile.bat
|
|
|
|
|
Actually I don;t want to run the project. Only in the build, compile, I want to run the .bat file.
I've set the properties on post-build event command line as follows.
call $(ProjectDir)build_help.bat
It calls the bat file correctly. But it's not execute. bat content like this.
echo compiling help documentation<br />
"C:\Program Files\HTML Help Workshop\hhc.exe" Help.hhp<br />
echo done.
error is,
Unable to open Help.hhp
But when I double click on the bat file it works fine.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Try specifying the file path for "Help.hhp", absolute path
or place "Help.php" in the release/debug folder(whichever you are currently building on)
|
|
|
|
|
Seems it's fine. But now the case is I've to place all html files and stuff in bin folder too.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
You can copy then back to where you want with a batch file
Did it not work with an absolute path ?
|
|
|
|
|
As I said earlier once the command is call $(ProjectDir)build_help.bat ask to add bat file into the bin folder.
If I added bat file into the bin, I have to change all paths.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Hi...
Pls help me to retrieve Image from a DataBase(SQL 2005).
|
|
|
|
|
This has been asked sssoooooo many time, try a search clickety[^]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Having been kicked out of the basement yet again to develop a little something in the "higher" level code I'm muddling around in the dark and trying to look bright doing it.
I need to create a service that will launch mulitple instances of an application (APP) and be able to have some interaction with each APP as well as the service itself (via a serperate application to be developed later - which will be mostly used to add/remove APPs).
Just to get the blood flowing, and something started on my desktop, I came up with this little mess...
Process[] p = new Process[portsAL.Count];
NamedPipeServerStream[] pipeServer = new NamedPipeServerStream[portsAL.Count];
for (int i = 0; i < portsAL.Count; i++)
{
p[i] = new Process();
p[i].StartInfo.FileName = appPath;
p[i].StartInfo.Arguments = portsAL[i].ToString();
p[i].Start();
pipeServer[i] = new NamedPipeServerStream("pipe" + portsAL[i].ToString(), PipeDirection.InOut);
pipeServer[i].WaitForConnection();
}
While that actually works (put in a bit-o-code into APP and each instance reported in on its assigned pipe) I will be the first to agree [admit] its not very elegant and I suspect its going to lead to my doing alot more work than my inheritently lazy nature will appreciate. Also, it became clear rather abruptly just how cumbersome it was going to become if I went much farther along these lines.
Soooo..... here I am humbly seeking the wisdom of my betters to give me a shove in the right direction.
---------------------------------------------
Help... I'm embedded and I can't get out!
If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler
|
|
|
|
|
What about sockets? Old fashioned maybe, but you know where you are with a socket. Good for remote management etc. too.
Regards,
Rob Philpott.
|
|
|
|
|
The APPs are actually socket listeners - and they are the "priority" of this project. For example, if I send a "kill" message via the pipe, the APP needs to be a finished state on its port before it will shut down to aid in preventing data loss.
But with my current skills set, I suspect I would find myself in the same situation - using an array in the service to establish/handle each socket connection to the APPs if I went that route. And its the array that I'm looking at as being the cumbersome aspect of my service.
---------------------------------------------
Help... I'm embedded and I can't get out!
If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler
|
|
|
|
|
Hi,
I'm facing the problem when i'm executing the oracle function with input and output parameters which are object type.
i givng my code below.
I created two types for input and output parameter for a functions.
type get1 as object(deptno number(5))NOT FINAL;
TYPE GET2 AS OBJECT(DNAME VARCHAR2(14),LOC VARCHAR2(13))NOT FINAL;
///Function code :
function getdata(id in get1,data out get2)
return varchar2 is retval varchar(10); begin
select get2(dname,loc) into data from dept where deptno = get1.deptno;
retval := 'Result'; return retval; end;
///My .net code :
OracleConnection con = new OracleConnection("Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.2.3)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ORACLE)));User Id=scott;Password=tiger");
OracleCommand cmd = new OracleCommand("getdata", con);
cmd.CommandType = CommandType.StoredProcedure;
GET1 objget1 = new GET1();
GET2 objget2 = new GET2();
objget1.DEPTNO = 10;
GET2[] get22 = null;
OracleParameter outparam = new OracleParameter();
outparam.OracleDbType = OracleDbType.Object;
outparam.Direction = ParameterDirection.Output;
outparam.ParameterName = "data";
outparam.UdtTypeName = "GET2";
outparam.Value = objget2;
OracleParameter inparam = new OracleParameter();
inparam.OracleDbType = OracleDbType.Object;
inparam.Direction = ParameterDirection.Input;
inparam.ParameterName = "id";
inparam.UdtTypeName = "GET1";
inparam.Value = 10;
con.Open();
cmd.ExecuteNonQuery();
when i'm executing the below error is coming.
"ORA-06550: line 1, column 7:\nPLS-00306: wrong number or types of arguments in call to 'GET_DATA_NEW'\nORA-06550: line 1, column 7:\nPL/SQL: Statement ignored"
Pls help me.
|
|
|
|
|
Try the database forum to start with.
Oh and change the userid and password on the database. scott/tiger should never be used - it is the first user anyone would try on an oracle db.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Wouldn't you want to add the parameters you have created to the command before executing it ?
cmd.Parameters.Add(outparam);
cmd.Parameters.Add(inparam);
As I have mentioned before[^], take a look at this [^]
|
|
|
|
|
Ohh Sorry,
thnxs for reply me.
I forgot to paste that lines . Now i applied that applied then another errors is coming.
function GETDATA(id in GET1,data out GET2)
return varchar2 is retval varchar(10); begin
select GET2(dname,loc) into data from dept where deptno = GET1.deptno;
retval := 'Result'; return retval; end;
OracleCommand cmd = new OracleCommand("GETDATA", con);
cmd.CommandType = CommandType.StoredProcedure;
GET1 objget1 = new GET1();
GET2 objget2 = new GET2();
objget1.DEPTNO = 10;
objget1.DEPTNOIsNull = false;
//GET2[] get22 = null;
OracleParameter retval = new OracleParameter();
retval.OracleDbType = OracleDbType.Varchar2;
retval.ParameterName = "retval";
retval.Direction = ParameterDirection.ReturnValue;
cmd.Parameters.Add(retval);
OracleParameter inparam = new OracleParameter();
inparam.OracleDbType = OracleDbType.Object;
inparam.Direction = ParameterDirection.Input;
inparam.ParameterName = "id";
inparam.UdtTypeName = "GET1";
inparam.Value = objget1;
cmd.Parameters.Add(inparam);
OracleParameter outparam = new OracleParameter();
outparam.OracleDbType = OracleDbType.Object;
outparam.Direction = ParameterDirection.Output;
outparam.ParameterName = "data";
outparam.UdtTypeName = "GET2";
outparam.Value = objget2;
cmd.Parameters.Add(outparam);
con.Open();
cmd.ExecuteNonQuery();
Error like
"ORA-03113: end-of-file on communication channel\nProcess ID: 0\nSession ID: 20 Serial number: 25".
pls help.
|
|
|
|