|
Hello Sojaner,
I m not sure.
But I think that this application it self working as an Icon.
Becoz when I m tring to hide desktop Icons this plant also hide.
regards,
Divyang Mithaiwala
System Engineer & Software Developer
|
|
|
|
|
Hi Divyang Mithaiwala,
Thanx for attention, but as I know, the plants are window, cause they have their own process and if you find and download the TaskManagerEx program in the articles, you will see that the process has a window, and I'm almost sure that it is the plant window.
I know that there are some windows that make the main shape of the windows UI, and they have names like "Desktop" that makes the desktop window containing the task bar man desktop icons and a window named "Program manager" that contains the desktop icons and desktop elements, and when you hide this window, the whole wdesktop elements will become hidden!
So I wrote a program that maks a window form and makes it the child of the "Program Manager" window and It became one of the thesktop elements, but the problem is that even when I try to set the "Z Order" to the lowest window, my window will stay in front of the Icons and the plants even!
Sojaner
|
|
|
|
|
I am trying to pass an Excel.Application object from c# to c++ DLL via PInvoke.
The c++ code expects an IDispatch.
The Pinvoke Wizard paulyao.com suggests:
[DllImport("myDLL.dll")]<br />
public static extern short Initialise(ref LPDISPATCH pExcel);
so I have tried this code c#:
[DllImport("myDLL.dll")]<br />
public static extern short Initialise([MarshalAs(UnmanagedType.IDispatch)]ref object pExcel);
and
[DllImport("myDLL.dll")]<br />
public static extern short Initialise([MarshalAs(UnmanagedType.IUnknown)]ref object pExcel);
And this is the code that calls the routine.
Excel.Application excelApp= (Excel.Application)application;
object o=(object)excelApp;<br />
Initialise(ref o);
When the c++ code is called it throws a COleDispatchException error. m_wCode is 00000000 and 80020005 respectively.
Any ideas on how I should pass the Excel Application object?
Regards
Alias47
|
|
|
|
|
Hi,
Using VS2005;
Somehow or another I lost my "view" of a bindingNavigator. I located it in the Properties window and changed it's Visible option to true and "recovered" it. This has happened before when I have copied an item from the toolstrip(bindingNavigator) to another toolstrip. I also had to reconnect the on-click events for each item in the affected bindingNavigator.
The RenderMode on the bindingNavigator was set to ManageRenderMode which was in fact the XP style format however using either ManageRenderMode OR Professional option gives me the XP button style BUT NOT the blue colour.
Does anyone know how I can get the blue colour back keeping the XP Style?
As a matter of interest, I have another bindingNavigator in the same project and it's working fine.
Glen Harvy
|
|
|
|
|
I am trying to right an if statement for a project that pulls data from a table.
like for instancte I have
int Mem = 0;
if (Mem ==1)//for true
{
lbMember.text = applicant.getfname() +" "+ applicant.getlname();
lbAdd.Text = address.getAddress();
}
else
lbMember.text = "not selected";
}
when I use int Mem = 0; I will get the else statement
when I use int Mem = 1; then I get the if selection
how do I get it to make the selection of choice from where the data is put in.
Thanks in advance
|
|
|
|
|
Please rephrase as I can't understand what it is you want. I would be glad to help, otherwise.
TWatson47 wrote: when I use int Mem = 0; I will get the else statement
when I use int Mem = 1; then I get the if selection
how do I get it to make the selection of choice from where the data is put in.
On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. - Charles Babbage
|
|
|
|
|
when I set the values to 0 or 1, it is like I am forcing the statement to be true or false. Like if there is no joint member, I would like it to be false and use the else statement. If there is a joint member I would like it to be true and use the if statement. How should write the code to allow the selection to come from when they input the criteria.
Thanks so much for your help and speedy response
|
|
|
|
|
I still have no idea what you are asking.
On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. - Charles Babbage
|
|
|
|
|
ok, I will try to explain a little better. I have created some forms that say for instance a new member comes into a bank and want a loan. When the Agent puts there info into a build it is then saved to a server(database). The Idea is to have there info pull up with the selected loan form that they are wanting. Say for instance a auto loan. I have been able to pull the form with there info on it fine. However, I wanted to add some logic in place that looks to see if there is a joint member. If there is then hit all the tables requesting the joint information and load to the form. My problem is that when I set the variable, say for instance Jmem = 0, even if there is a joint member it comes up as false, and gives the else statement. My question is what do I need to add to the previous if statement that will except the joint member as true. The same if for beneficiary also.
I hope this helps in understanding
Thanks
|
|
|
|
|
If that is the case consider using booleans. Also from what I can gather it entirely possible that your value is not being set correctly if the if statement is not evaluating. Try setting a break on the if and checking the value of the variables. There are a lot of particular scenarios that can be causing your problem but the code
int mem = 0;
..some code that may reset me
if(mem == 1){
...
}
else{
...
}
is valid.
On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. - Charles Babbage
|
|
|
|
|
Thanks for you help. That is excactly how I had it coded, I just wasn't sure why I was having the problems. I even tried using
bool mem = false;
if(mem)
{...
}
else
{...
}
and it did the same thing.
|
|
|
|
|
Is your project building? If you have an incorrect version the debugger will still step but perform strange actions. Very confusing but it happens.
On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. - Charles Babbage
|
|
|
|
|
TWatson47 wrote: int Mem = 0;
if (Mem ==1)//for true
Not trying to second guess your logic, but why wouldn't you want to use a bool type variable to do this?
bool mem = false;
if (mem) {
lbMember.text = applicant.getfname() +" "+ applicant.getlname();
lbAdd.Text = address.getAddress();
} else {
lbMember.text = "not selected";
} Why co-opt an int ? That's a retro, "C"-type thing to do...
Just wondering.
Sean
|
|
|
|
|
I am new to C# I use to write in C++. Your idea looked good, however, I am still having the same problem. I am still get a false reaction even though it is true. I am getting a read out of "not selected" when it should be the members info.
Any suggestions, it looked like you where on the right path.
Thanks for the help
|
|
|
|
|
Are you saying you want to base your if/else on user input?
If so you can add a radio button with yes and no and do something like this
<br />
if (rbMember.SelectedItem.Text == Yes)<br />
{<br />
}<br />
else<br />
{<br />
}<br />
<br />
|
|
|
|
|
TWatson47 wrote: how do I get it to make the selection of choice from where the data is put in.
I'm not sure what you mean ? If you mean the UI provides the case, use a checkbox.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
The code that you are showing is perfectly valid, and will never have the problems that you are talking about.
Therefore:
:: Your code is different in some way from the code that you have shown.
:: Either the variable doesn't contain what you think it does, or you are doing the comparison wrong.
---
b { font-weight: normal; }
|
|
|
|
|
Your question interests me. What value are you storing in the database to indicate it is a joint or individual loan?
|
|
|
|
|
okay what it sounds like is that you are trying to get data from a database and use that value to do a specific action you obviosly need someway of obtaining that data from the database i don't know how you have this information stored but if its in some sort of class then you would do something like
<br />
if(Loan.JointAccount == "MyWife")<br />
{<br />
do logic here<br />
}<br />
else<br />
{<br />
do non joint logic here<br />
}<br />
|
|
|
|
|
Hi,
i think i got ur question.
wat about adding a checkbox to your form.
when it is selected you can set the value to true and take steps accordingly.
and if its not selected ie. false and you can perform the steps for false value.
hope this works.
Nitin...
|
|
|
|
|
so If I'm doing a BeginReceive on my client socket....can I just to a regular send for sending data or do I need to do a BeginSend to make my client socket app truly async?
Also if I want to fire an event when data comes in ...and I want to pass the incoming data with my event....do I want to do that after I call my EndReceive?
Thanks
Tom Wright
tawright915@gmail.com
|
|
|
|
|
For firing the event when data comes in, you'll have to do that after you call EndReceive, or you won't know how much data you received (and possibly your buffer will not have the data - can't remember off-hand).
I've always used regular sends for sending data, and BeginReceive/EndReceive on the receiving end. I don't know if this really makes async, but I never quite understood the reasons for the overhead involved with BeginSend/EndSend - regular Send has always worked just fine for me.
-----
In the land of the blind, the one eyed man is king.
|
|
|
|
|
Do I need to block on my send when sending?
Tom Wright
tawright915@gmail.com
|
|
|
|
|
Hello
Tom Wright wrote: I need to do a BeginSend to make my client socket app truly async?
Sending and receiving are two different operations. If you send using Send() method and recieve using BeginReceive() method, then your sending will be blocking, or sync opertation while recieving is not!!
For me, I prefer using multithreading. This is what really happens in the background. The Begin methods actually make a thread for you to do the job. Well, I like to have a control over my threads, even if I have ot write few more lines!!
So, my advice, Make a thread for each socket to handle sending/receiving data. A better more advanced approach -needs more care though- is to make two threads for each socket. One to send and the other to receive.
Regards
|
|
|
|
|
The problem is (I have this now) that when doing seperate threads for send and receive, I cannot seem to get the correct status of the socket back. So if the connection drops....ungracefully. My app never knows and keeps trying to send. So one way to get around this is to use the BeginSend and BeginReceive.
Do you have any other suggestions? Thank
Tom Wright
tawright915@gmail.com
|
|
|
|