|
Well thanks for that. I'm obviously far too stupid to click your original bloody link. I really do need you to copy that post down just in case I missed some subtle nuance. I mean, what's the point of clarifying your original post when it's much easier to post the same old crap and hope that the telepathic helpers happen to stumble on your jumbled, inane ramblings. I'm now going to boil my head to remove the despair you've caused.
|
|
|
|
|
With the introduction of Vista, my previous VB script code that registers a dll using regsvr32 now fails.
So I've scanned the blogs on the subject and found that calling shellexecuteex will get round the access (elevation) issue.
I found the following code and modified it to call regsvr32
#include <windows.h>
#include <shellapi.h>
int __cdecl main(int argc, char **argv)
{
if (argc == 3) {
SHELLEXECUTEINFO sei = { sizeof(sei) };
sei.fMask = SEE_MASK_FLAG_DDEWAIT;
sei.nShow = SW_SHOWNORMAL; // added 27 Nov
sei.lpVerb = argv[1];
sei.lpFile = argv[2];
ShellExecuteEx(&sei);
}
return 0;
}
so at the Command prompt I type
'executable name' regsvr32 ddlname
and get the following error message (well words to that effect)
"unknown file type. File needs to be associated via Control panel".
If I typed
'executeable name' open filename it works fine and opens the <filename>.
How / what is missing when I run regsvr32 using shellexecuteex?
many thanks,
ian</filename>
|
|
|
|
|
I am working in C++/CLI with Windows Forms and I want to have my compiled html help point to a topic specific to where the mouse is pointing (like as a menu item) but I can't seem to determine which control the mouse is hovering over.
private: System::Void FrmMain_HelpRequested(System::Object^ sender, System::Windows::Forms::HelpEventArgs^ hlpevent)
{
Point pt = this->PointToClient(hlpevent->MousePos);
Control^ requestingControl = dynamic_cast(sender);
Control ^ctrl = this->GetChildAtPoint(pt);
Control ^ctrl2 = this->ActiveControl;
if( File::Exists(this->helpProvider->HelpNamespace ) == true)
{
Help::ShowHelp(this, this->helpProvider->HelpNamespace);
}
}
ctrl is the form itself and crtl2 is the last active mdichild in my application.
requestingControl returns the form (same as ctrl)and not the item the mouse is over.
Hope someone can help
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
I work in vb.net, and each control has it's own Help_Requested event...which fires when you click on the control (the textbox or label or whatever...) while you have the help mode activated. Perhaps it is similar in your language.
Hope this helps.
|
|
|
|
|
Got worked out. Here is my final code.
for each ( ToolStripMenuItem ^tmpMS in this->menuMainForm->Items )
{
for each ( ToolStripItem ^tmpCntl in tmpMS->DropDownItems )
{
if (tmpCntl)
{
if ( tmpCntl->Selected )
String ^tmpCntlName = tmpCntl->Name;
OpenHelpForMenuItem(tmpCntlName);
}
}
}
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
Hi,
I have one remote method (http) which is placed on server (particular machine).
say http://swserver/MMServer
Now I want to check whether that server's method/service is available or not.
Help me out.
Thank you.
|
|
|
|
|
There's no other way to do it other than to try and call it. If it errors out, it's down.
You can PING the machine, but that only tells you if the TCP/IP stack is working. It doesn't tell you if the service your method is in is running. There's no way to tell that other than trying to call it.
|
|
|
|
|
Could someone kindly please show me (C# code) how to have 2 control units(image buttons) in one datagrid column (one button for edit and one button for delete) the column header will read "Change"
Thanks
Evgeny
|
|
|
|
|
|
I need to place 2 button one under the second(winforms)
so if you can refer me to some post.
|
|
|
|
|
Did you even open the link? There's an onus on you to actually do some of your own research yourself.
|
|
|
|
|
Hi all,
I need a datagridview cell of containing multiple datagridview cell.If it is possible then pls tell the way of code.
|
|
|
|
|
If I understand your question correctly, you want what is known as heirarchical data grids.
In maybe version 1.0 this was supported. But in the 2.0 framework on it does not.
The only way to get that working is to either a) write your own heirarchical datagridview or b) buy one.
|
|
|
|
|
I'm dynamically populating a tree as the user selects nodes. Prior to clicking on a node, parent nodes actually have no children and after click, they get populated. This results in expandable nodes not having the "plus" sign next to it until after you click on it. Anyone got any ideas on smart ways to make every node have a plus sign, whether it has a child or not?
Thanks,
Jeff
|
|
|
|
|
jeffb42 wrote: Anyone got any ideas on smart ways to make every node have a plus sign, whether it has a child or not?
Ownerdraw
|
|
|
|
|
Easy. Give every node a "dummy" child. When a node is expanded, you check the children of the node for the "dummy" child node. If it's there, remove it and populate the children as you see fit.
|
|
|
|
|
Thanks Dave, I was hoping there was a bit easier way, but this sounds reasonable.
Thanks,
Jeff
|
|
|
|
|
jeffb42 wrote: I was hoping there was a bit easier way, but this sounds reasonable.
Not that I've found. That's about as easy as it gets.
|
|
|
|
|
i tried the following windows service application to send the email alerts automatically..
mean on a specific date and time.
but when i am running this i am getting the msg:"The goodday service on local computer started and then stopped .Some services stop automatically if they have no work to do, for example, the performance logs and Alerts service"
how to rectify it??
this s the application:http://www.codeproject.com/KB/cs/WIndows_Service.aspx[^]
modified on Wednesday, January 02, 2008 11:17:19 AM
|
|
|
|
|
You put all of your code in the OnStart event of the service. OnStart is used to start a seperate thread where your service does all it's work. OnStart is expected to start this processing thread and return control back to the Service Control Manager inside of 30 seconds.
Your code does all of it's processing, and I'm suspecting does a Thread.Sleep in there somewhere, in the OnStart method, never returning control back to the Service Control Manager.
|
|
|
|
|
Hi all,
I have 2 forms in my application say form1.cs, form2.cs
in form1.cs form load event iam writing the following code
form2 obj;
for(int i=0;i<n;i++)>
{
obj = new form2();
obj.show();
}
each instance of form2 does some operation and closed automatically.this code working fine.
now what my problem is
in some control (say textbox or label) on form1, i want to show how many instances of form2 are running. this value should modify when form2 instantiated/closed.
how can i proceed.
thanks in advance.
this is sumanth, completed m.c.a from india.
|
|
|
|
|
what u need is the no of instances right ....to do this take a static variable in the form1 say static int count; now in the form2.load event increament the variable as form1.count++;
after the obj.show; line assign the label value as form1.count; hope it works
if this thing also dint work then take a thread or timer to which executes a function and in that function assign the value to the label or textbox
regards
sindhu tiwari
its me sid
|
|
|
|
|
Application.OpenForms.Count
Application.OpenForms["Form1"]
I think this should help you out.
|
|
|
|
|
Hi,
if you want to know how many instances of a specific class exist, you should add some
code to that class, including: a static int counter, a property to get its value,
and one or two events to increment and decrement the counter. For form visibility,
the event would be Form.VisibleChanged
|
|
|
|
|
Hello everybody,
Can anyone tell me please what can I do to achieve Accordion's behavior in Windows form as most as possible
thanking you in advance
Rachamim
|
|
|
|