|
ok but there are mush software that fake the windows message show in the same time two or more windows like activated.
For example Photoshop and its tool property etc.. windows, then Fireworks, Dreaweaver, Premiere and so on...
How just they do?
They prevent the windows title bar to is redrawed to unactived...
Please someone know how to do?
Thanks.
|
|
|
|
|
They draw their own toolbox windows themselves! The window doesn't really have the focus, but you can give the user the illusion that it does. But, the only way to do it is if you draw the entire window yourself. Windows won't manage it for you the way you want.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have created a super complex object and implemented all IXmlSerializable methods. And my webserice have to return this object from a method. Everything is almost fine. But i got a empty object returned from the method. I have debugged it also and I found that my webservice already have the object to return, but seem that my client didn't get the object back from the method ? How's come ??!!!!
I have invoke the webservice alone, and it return a complete XML's object. But well .... don't know why my client's object got nothing !!!!
Now I have to deserialize and serialize by myself from both server and client by passing a XML string, not the object class. But it looks so stupid if this is only way to do so !!!
Please help.
PS. In fact i have 2 - 3 simple classes that also passed between webservice and client and they are all fine .. but not the super complex object ??? becaseu it is too big ??
|
|
|
|
|
I am not a guru at all, but we do here do some semi-complex custom class passing around with Web Services.
My only though is, if your Class contains in turn classes, did you add the XMLInclude attribute?
Here is an example, hope it's not too long winded
<br />
[Serializable]<br />
[XmlInclude(typeof(Discount)), XmlInclude(typeof(Expression)), XmlInclude(typeof(ExpressionClause))]<br />
public class OrderDiscounts<br />
{<br />
[XmlElement("OrderLevelDiscounts",typeof(Discount))]<br />
public Discount[] OrderLevelDiscounts;<br />
<br />
[XmlElement("ItemDiscounts",typeof(Discount))]<br />
public Discount[] ItemDiscounts;<br />
<br />
}<br />
<br />
<br />
[Serializable]<br />
[XmlInclude(typeof(Expression)), XmlInclude(typeof(ExpressionClause))]<br />
public class Discount<br />
{<br />
[XmlElement("ConditionExpression",typeof(Expression))]<br />
public Expression ConditionExpression;<br />
<br />
}<br />
<br />
[Serializable]<br />
[XmlInclude(typeof(ExpressionClause))]<br />
public class Expression<br />
{<br />
[XmlElement("ExpressionClauses",typeof(ExpressionClause))]<br />
public ExpressionClause[] ExpressionClauses;<br />
<br />
}<br />
<br />
[Serializable]<br />
public class ExpressionClause<br />
{<br />
public string PropertyName;<br />
public string Operator;<br />
public string Value;<br />
}
|
|
|
|
|
Well the problem is i hv a listview in which files of all types (media, doc, txt etc.) are listed , i want to open each of them in their corresponding application by double clickin on them.i want to use some API in the click event of the listview that wud search for the executable of that file by looking at its extension.
how do i do that?
|
|
|
|
|
try
Process.Start("yourfilename.extension");
|
|
|
|
|
Is is THAT urgent that you have to post this question twice?
David
|
|
|
|
|
Well the problem is i hv a listview in which files of all types (media, doc, txt etc.) are listed , i want to open each of them in their corresponding application by double clickin on them.i want to use some API in the click event of the listview that wud search for the executable of that file by looking at its extension.
how do i do that?
|
|
|
|
|
you can simply use System.Diagnostics.Process as follows
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents=false;
proc.StartInfo.FileName= this.listView1.FocusedItem.Text.ToString();
proc.Start();
If you look at the eventhandler property of listview, you will see it has the DoubleClick eventhandler associated with it. So simply insert the above code into this event handler. However you need to remove "this.listView1.FocusedItem.Text.ToString();" and use the event handler input argument as a substitute.
|
|
|
|
|
Use System.Diagnostic.Process[^].
It works the same way as if you double-clicked file in Explorer, Windows search Registry for exacutable (e.g MS Word, Paint or browser ) associated with extention (.doc, .bmp, .html).
All you need to know is file name.
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
Hey Everybody!
I created an application that that is using the IE AxWebBrowser com component (to surf the net...).
so using my "new" web browser I can surf the net, but I want to create an off-line homepage using web forms.
the problem is that it doesn't matter what I do, I never see the page correctly!
I want to use my asp page to run things in my c# application, so I created the web form in a different project (because it is impossible to add web form to a c# project), and write down the code as it was in my app, but as I wrote down earlier, when I surf that asp page I cannot see the buttons, just the label I used in the form.
HELP ANYONE???
thanks!
|
|
|
|
|
How are you surfing the ASP page? What URL are you using? Are you running IIS or some webserver on your PC?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
well, I guess thats what I did wrong
I've never used asp before...
how should I surf to the page?!
|
|
|
|
|
You need to run a ASP.NET (or ASP, if you're using plain ASP) capable web server. IIS (Internet Information Services) comes as part of Win XP Pro, you can use that or use one of the free webservers (like Cassini).
Create a virtual directory (let's call it mypage). Put ASP page in that directory. Start the webserver and navigate to http://localhost/mypage/yourpagename.asp
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
oh okay
no problem, it works fine on my computer. vs.net created it for me so the aspx and aspx.cs are in my http://localhost/mypage/ .
but if I want to run that asp page on someone else computer, how can I make windows create the 'http://localhost/' at my app's directory (so my page will be at http://localhost/mypage.aspx) or just controling the position of the localhost?
|
|
|
|
|
hi, i have a code works with oracle sql i want to change the problem in it that doesn't work with sql2000 soplease any one help me
the sql statement is:
select folderindex, NAME, PARENTFOLDERINDEX from pdbfolder
connect by prior FOLDERINDEX=PARENTFOLDERINDEX
start with PARENTFOLDERINDEX = " + indexx + "
order by(PARENTFOLDERINDEX)
it gives me an error on line to when i test it on the sql 2000 query analyzer so what is the solution
Thanks alot
Hamody
|
|
|
|
|
Hi!
First of all, sorry about my wrong english
So I have the problem:
I'm using my C# Windows application to start a given exe file with System.Diagnostics.Process.
The application starts correctly, but I want to manipulate the given application window properties eg.:title,size,topmost or something like thesee things.
How can I do this?
Thank's for the helpfoul people, I wait yuor answers.
Bes regards:
Nemo
|
|
|
|
|
I would like to make a schedule service that run jobs at a specific time.
Is there anyway that I can hook into the windows clock og windows scheduler and get events when the time is something specific.
I would like to avoid the Timers in .NET, because these run in a given interval, and not a specific time.
Any ideas?
|
|
|
|
|
Use a timer, and check DateTime.Now at ever smaller intervals.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Timers are not optimal for this job.
I thing all you need is to know current time System.DateTime.Now
and you can separate teh part of these date eg.: you can catch the current time: System.DateTime.Now.Hour and System.DateTime.Now.Minute
And if you specify an intervall nedd to be do somethig:
- define the intervall eg.:10 minute
- make a timer with a minimal chack intervall eg.:1 minute and start it
- catch current time
- when the timer elepsed just you need
<br />
<br />
private void tim_Elapsed(object sender, System.Timers.ElapsedEventArgs e)<br />
{<br />
<br />
if(curr==t+intv)<br />
{<br />
<br />
t=curr;
}<br />
<br />
}<br />
This only a little stupid method to do it, but it works, and hope helpful to understand mechanism.
|
|
|
|
|
hi,
i want to know if i can crate new mail accounts on my
mailserver via programming? help me...
|
|
|
|
|
Hello
I have a string with data divided by a ":". I would like to take the data from before the ":" and set as object key in a hashtable, and take the data after the ":" and set as the object value in the same hashtable. What is the best way to go about achieving this?
/regards
|
|
|
|
|
The string class has a split method for doing this. Assuming there is only ever one :, this is the one to use. If it gets more complex than that, use a regular expression Searching for the index of : and doing your own substrings is messy, definately your last port of call
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I am having trouble using Stored Procedures. I am using C# .Net, and Visual Studio. In Visual Studio I created a 'SqlDataAdapter' and then generated a Stored Procedure which I will include as well a
s the code that I am trying use to call the procedure. Can someone get me ontrack!!;)
Thanks Norm
private void Save_Click(object sender, System.EventArgs e)
{
sqlUpdateCommand1.Connection = sqlConnection1;
if (sqlConnection1.State != ConnectionState.Open)
sqlConnection1.Open();
SqlCommand cmd = new SqlCommand("InsertCommandServices");
cmd.CommandType = CommandType.StoredProcedure;
SqlParameterCollection pc = cmd.Parameters;
pc.Add("[service-code]",SqlDbType.Int, 4, txtServiceCode.Text);
pc.Add("[service-description]",SqlDbType.Char, 30, txtSeviceDesc.Text);
pc.Add("[large-animal-cost]",SqlDbType.Money, 8, cbLargeAnimalCost.Text);
pc.Add("[service-description]",SqlDbType.Money, 8, cbMediumAnimalCost.Text);
pc.Add("[service-description]",SqlDbType.Money, 8, cbSmallAnimalCost.Text);
}
IF EXISTS (SELECT * FROM sysobjects WHERE name = 'InsertCommandServices' AND user_name(uid) = 'dbo')
DROP PROCEDURE [dbo].[InsertCommandServices];
GO
CREATE PROCEDURE [dbo].[InsertCommandServices]
(
@Param11 int,
@Param12 char(30),
@Param13 money,
@Param14 money,
@Param15 money
)
AS
SET NOCOUNT OFF;
INSERT INTO services([service-code], [service-description], [large-animal-cost], [medium-animal-cost], [small-animal-cost]) VALUES (@Param11, @Param12, @Param13, @Param14, @Param15);
SELECT [service-code], [service-description], [large-animal-cost], [medium-animal-cost], [small-animal-cost], [service-nbr] FROM services WHERE ([service-nbr] = @@IDENTITY);
GO
|
|
|
|
|
NormBohana wrote:
service-code
Put an @ in front of variable names
NormBohana wrote:
@Param11
Use those nice names here, instead of this meaningless stuff.
Looks OK otherwise. Why on earth are you selecting back the stuff you stuffed in ? Why not return something useful, like @@IDENTITY ?
Christian Graus - Microsoft MVP - C++
|
|
|
|