|
There can't be a universal way, when not every HWND has a document. If they are all MFC MDI apps, then perhaps there's something you could try, but I am certain that Word at least does not use MFC.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
I think I' combine managed and unmanaged code by using fileswatcher and hooking
some applications.
Thank you for your opinion.
|
|
|
|
|
You're not going to be able to hook the API in managed code. And the FileSystemWatcher will not tell you when an application opens a file.
You simply have no choice but to write interop code for each application you want to interact with.
|
|
|
|
|
Thank you for answer.
Now I know what to do. I need to check all opened file and then compare with
target windows title.
|
|
|
|
|
Hello,
our coder created an application on vb dot net that opens another exe file with process process.start command, the small exe he coded only checks for credentials and asks you to select the branch you belong to from a list of branches.
the program always showing Activex component can't create object, and all the articles on inet did not help so far, any one got any idea, i could post the code but it's long for a forum
Thanks
|
|
|
|
|
Impossible to help based on this. You could check your error log for more info on why the object can't be created.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Is the ActiveX DLL registered inoto GAC? Just check.
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
ActiveX controls can never be registered in the GAC.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
well, he created a log on his small code to say how further it went and it finished okay (that's what i was told), but still it won't work on SOME computers,
what is missing like MDAC or dlls? ocxs?
|
|
|
|
|
Well, I would hope you've confirmed the ocx is present and registered.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
HE does not know what OCX , because his small app does not include anything in source
|
|
|
|
|
If his app doesn't have a reference to the OCX, how is he calling it ? If you don't know what the OCX is, why does your program require it ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
There is no OCX inside his code.
Would be best if i could show you the code.
http://pastebin.com/d3971bd44
Thanks
|
|
|
|
|
Yeah Chris, you are right. Thanks for pointing out and sorry from my side for the mistake.
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
Dear All,
I have sql query which is
create proc sp_detail
(
@p varchar(max)
)
as
select * from tblName where code in (@p)
I am passing @p from c# application, but it doesent reterieve any data while there is data
cmd=new SqlCommand("sp_detail",p.con);
cmd.CommandType= CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@p",codes);
DataTable dtResult=new DataTable();
if (cmd.Connection.State!=ConnectionState.Open)
cmd.Connection.Open();
dtResult.Load((cmd.ExecuteReader(CommandBehavior.CloseConnection)));
codes is a string which contains codes seperated by comma, as 28-2801,28-2802...
what is wrong here
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
This is a SQL question, really. You're passing the parameter in fine. If you enter your parameter as a variable and run the SQL, does it work then ? Might the issue be your parameter being escaped on the way in ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
the thing is, if i use simpl select statement from c# application every thing works fine as
select * from community where code in ('28-2801','28-2802',...)
but when the store procedure is executed, i got the statement of that from profiler as follows
exec sp_details @p=N'28-2801,28-2802'
while these code exits in database, when i execute this statement from sql, it doesent retrieve a value while if i execute it like this
exec sp_details @p=N'28-2801'
then it returns a rows
with single code it retrieve data, but when passing it seperated by comma nothing is retrieved.
any error there?
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
The error seems obvious to me. Passing in your parameter means you specify the whole lot in one set of quotes, when you need to place quotes inside the string. So the value you pass in, needs to have those single quotes around each value, as in
Abdul Rahman Hamidy wrote: '28-2801','28-2802'
and not
Abdul Rahman Hamidy wrote: '28-2801,28-2802'
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
i thought the same as you, but i have done following from sql server, still i am getting no records
<br />
declare @codes varchar(max)<br />
select @codes=cast(quotename('28-2801','''')+','+quotename('28-2802','''') as varchar(max))<br />
print @codes --prints '28-2801','28-2802'<br />
exec [sp_detail] @codes
this doesent work too.
i think first i have to execute the statement in sql server, then i can simply can execute from c#.
in above statement any thing goes worong?
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
hmmm.... perhaps there's a reason that I don't know why you can't pass in a string like that. Have you tried string mashing the sql in your proc, or just creating the SQL in code instead of using a proc ?
I think at this point you'd be better asking in the SQL forum ( where this question belonged from the start ), because that's where the SQL heavyweights will be hanging out .
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Asking in the SQL forum would be best
|
|
|
|
|
i'm trying to get a selected range of data from a data set into a new data set,i use an array(dr2) of data rows and from that i get one row at a time and add it to new datatable(dt2), after it is added to a data set.
DataSet ds2 = new DataSet();
DataTable dt2 =new DataTable();
for (int start = startindex ;start < startindex+5 ; start++)
{
DataRow dd = dr2[start];
dt2.ImportRow(dd);
}
ds2.Tables.Add(dt2);
return ds2;
but the problem is when the dataset is returned it has the table with correct no of row, but the rows contain no data, what might be the problem
|
|
|
|
|
sorry to disturb you people , i just found the solution , i missed the clone the table ,
thanx.
|
|
|
|
|
|
How can i use avicap32.dll. in example i found some one user WebCamLib....may i know how can i user it? what reference?
using WebCamLib;
how can i add WebCamLib to my reference?
A S E L A
|
|
|
|