Issue creating Item Activated Events for a third party form Control in Windows Powershell

I was asked at work to look into converting some of our VB.Net Applications to PowerShell. We use the
QIOS dev Suite for some of the controls to make it more visually appealing. I have been testing to controls out and I can load and create forms with no issue in powershell but I'm stumped on the error I'm
receiving when I add and ItemActivated event. I need to make it so when a user clicks on a given menu Item the form gets which menu item is clicked. 
Below is the code to my test form.
[VOID][reflection.assembly]::Load('System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[VOID][reflection.assembly]::LoadFile("C:\Code\Qios.DevSuite.Components.dll")
[System.Windows.Forms.Application]::EnableVisualStyles()
$form1 = New-Object 'System.Windows.Forms.Form'
$Menu = New-Object 'Qios.DevSuite.Components.QCompositeControl'
$item = New-Object 'Qios.DevSuite.Components.QCompositeMenuItem'
$DOSOMETHING={Write-Host "DO SOMETHING"}
# form1
$form1.Controls.Add($Menu)
$form1.ClientSize = '202, 262'
$form1.Name = "form1"
$form1.Text = "Form"
$form1.add_Load($form1_Load)
#MenuItem
$Item.ItemName = "Test Item"
$Item.Title = "Test Item"
# Menu
$Menu.Location = '13, 12'
$Menu.Name = "panel1"
$Menu.Size = '177, 238'
$Menu.Items.Add($Item)
$Menu.Add_ItemActivated($DOSOMETHING)
$form1.ShowDialog()
If someone could take a look and tell me what I'm doing wrong that would be great. If you need the dll file below is a link to my copy.

I was able to get the attached code to work in windows 7 with powershell version 2. I have to see why it dosent like windows 8 and powershell version 4.
Update: I just did powershell -version 2 in windows 8 and I was able to run the code. 
[void][reflection.assembly]::Load('System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
[void][reflection.assembly]::LoadFile("C:\Users\xAdmin\Desktop\Qios.DevSuite.Components.dll")
$frmMain = New-Object 'System.Windows.Forms.Form'
$ccMenu = New-Object 'Qios.DevSuite.Components.QCompositeControl'
$ccitem = New-Object 'Qios.DevSuite.Components.QCompositeMenuItem'
$Function = {
param ($sender, $e)
[System.Windows.Forms.MessageBox]::Show($e.Item.ItemName)
$frmMain.Controls.Add($ccMenu)
$frmMain.ClientSize = '202, 262'
$frmMain.Name = "form1"
$frmMain.Text = "Form"
$frmMain.add_Load($form1_Load)
$ccMenu.Location = '13, 12'
$ccMenu.Name = "panel1"
$ccMenu.Size = '177, 238'
$ccMenu.Items.Add($ccitem) | Out-Null
$ccMenu.Add_ItemActivated($Function)
$ccitem.ItemName = "Test Item"
$ccitem.Title = "Test Item"
$ccitem.Configuration.StretchHorizontal = $true
$frmMain.ShowDialog()

Similar Messages

  • Visual Studio 2013 Pro - Winforms toolbox icons beside items are missing for some 3rd party vendors controls

    I noticed last weekend after installing VS 2013.4 update that the Winforms toolbox, while showing all items, did not display the icons beside the items for any custom/third party Winform controls. The only icon
    showing in the toolboxes are the Pointer icon. I can select and drop any control onto a project, and as soon as I move mouse into the design surface the icon shows. Neither the
    builtin Winforms controls nor the WPF toolbox exhibit the same symptom. It is specific to Winforms third party controls (ActiPro and DevExpress). At first I thought it was due to the update, then I found that my laptop was
    already exhibiting this symptom, running 2013.3 (I had not dropped any controls from the toolbox in the past few weeks so I did not notice).
    The two machines (laptop and workstation) are running Windows 7 64-bit Professional and Ultimate, respectively. These machines are dedicated to development, and are secured, also running Norton Antivirus.
    I also have VS 2010 and VS 2012 which don't exhibit the symptom, though I finally removed 2012 last night during my adventures. I had all three VS side by side, running well for months (I added VS 2013 in June). VS
    2013 had been functioning well on a daily basis for the dozen or so Winforms projects and the odd WPF or MVC project.
    I use DevExpress v2014 and ActiPro controls; I have been using them for years now.
    I've spent 2 days trying remedies that include:
    Resetting Toolbox
    Removal of *.spd files in %APPDATA%, restarting VS
    Uninstall Visual Studio, remove and delete of any Visual Studio remnant in the registry, Program Files(x86), %APPDATA% and %PROGRAMDATA%, reinstall.
    Repeat step 3 with VS 2013.1 and .3
    Downgraded .NET to 4.5.1 to match my third, correctly functioning computer (also running Windows 7 x64 Ultimate).
    DevExpress has told me this isn't a problem they have seen. At first I agreed, since my ActiPro controls also are missing their icons, but then I noted that other vendor controls display fine. Not sure what else to do but to nuke the workstation and install
    from OS up.

    DevExpress is discussing this issue in the thread here : https://www.devexpress.com/support/center/Question/Details/T174133#comment-a98eedf1-ca54-4920-a2d6-49506ddae5b5
    The small sample they provided in the thread actually reproduces the bug in my environment.
    Since I cannot post screenshots here on MSDN forum (I explained above, when I try to attach pictures I
    receive an error that my account is not verified). There is nothing more I can do.
    This appears to be a bug in Visual Studio 2013. VS 2010 and 2012 are on the same machine and do not exhibit
    the problem. It is frustrating how unresponsive Microsoft is to my issue. I am a long-time MSDN subscriber, as well as customer of multiple seats of the retail copies of Visual Studio. It looks like the only way to get attention is to pay for a incident. If
    Microsoft is interested in actually seeing this bug in action, I have 2 machines that are preserved. I have installed a fresh environment on my backup PC.

  • Create an Activity Report for Current Week

    I would like to create a activity report for the current week. The trick is that if the weekday is Wednesday or earlier (Sunday being the first day of the week), the report shows last week's activities; but if the weekday is Thursday or later (Saturday being the last day of the week), the report shows the current weeks activities.
    I have a filter that works in Access but does not seem to work in Siebel. It does just what I explained above:
    Between CDate(Int((IIf(Weekday(Now())<=4,Now()-(6+Weekday(Now())),Now()-(Weekday(Now())-1))))) And CDate(Int((IIf(Weekday(Now())<=4,Now()-Weekday(Now()),Now()+(7-Weekday(Now()))))))
    Thank you,
    David
    Edited by: DavidE on Oct 7, 2008 4:17 PM

    David,
    try this:
    case DAYOFWEEK(CAST(Activity."Planned Start Time" AS date))when 1 then timestampadd(sql_tsi_day,1,CAST(Activity."Planned Start Time" AS date)) when 3 then timestampadd(sql_tsi_day,-1,CAST(Activity."Planned Start Time" AS date)) when 4 then timestampadd(sql_tsi_day,-2,CAST(Activity."Planned Start Time" AS date)) when 5 then timestampadd(sql_tsi_day,-3,CAST(Activity."Planned Start Time" AS date)) when 6 then timestampadd(sql_tsi_day,-4,CAST(Activity."Planned Start Time" AS date)) when 7 then timestampadd(sql_tsi_day,-5,CAST(Activity."Planned Start Time" AS date)) else CAST(Activity."Planned Start Time" AS date) end
    This gave me the sunday of the week. You should be able to modify this format for your purposes.
    cheers
    Alex

  • RFC destination for your third-party tool

    Hello SAP Guru's,
    I have recently established external db connect for an iseries database. Now developers wants to use the open hub destination to extract data to non-SAP systems. They are using API: RSB_API_OHS_3RDPARTY_NOTIFY to connect a third-party tool to the BI system and use this third-party tool to distribute data to other non-SAP systems. To do so they need RFC destination for the third party tool. Could you tell me which RFC connection i have to use in SM59 ? I mean is it ABAP connection or TCP/IP connection or HTTP connection to external server?
    I would highly appreciate any help on this.
    FYI:
    I have already gone through below help link:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/8de3f4743b22a8e10000000a1553f6/frameset.htm

    This will be of type TCP/IP.
    You will need to create an RFC server application on the thirdparty system, and implement this function there. You will need to define that server application in your RFC destination definitions (host/Program).
    You may need to read up RFC server help documentation; you can also browse the SAPGUI subfolders for RFC server sample applications and C code (if you have installed GUI in full, there should be such subfolders on your PC). You can also ask for help on 'application server' or 'abap' forums for this.

  • Where can i complaint about a Developer imposture for a third party app that i have already purchased?

    Where can i complaint about a Developer imposture for a third party app that i have already purchased?

    I'm not sure what you mean by a "developer imposture", but if you are having a problem with an app that the app's developer cannot or will not assist with, go here:
    http://www.apple.com/support/itunes/contact/
    and follow the instructions to report the issue to the iTunes Store.
    Regards.

  • To create a stock transport order and third party order

    please explain steps to create a stock transport order and third party order with transaction code what are the pre-requisite. related to MM?

    First you need a supplying plant. stock ready to transfer for a matetrial which should be created/extended at both the suppling and receiving plants.
    The order type is UB
    rest of the things are Pur org, Pur Grp, Company Code etc...
    The most important part is Vender has been replaced by supplying plant.

  • Looking for a third-party affiliate program that will integrate well with Adobe Business Catalyst.

    Dear Adobe Community,
    I am looking for a third-party Affiliate Program that will integrate well with the Adobe Business Catalyst platform.
    The requirement is fairly basic, i.e.,  to track multiple affiliates and down-stream affiliate-to-affiliate referrals. Also looking to report and display these referrals an affiliate’s dashboard.
    We have looked into Affiliate Program Software, Affiliate Tracking Software Marketing and would like to entertain other options before making a decision.
    Any assistance would be greatly appreciated! —Thank You!
    Kind Regards,
    Doug McClure

    For what it is worth, I am a fan of NuGen, I have both SEQ 1 and 2 and two stereo enhancing tools (stereoizer and stereoplacer I think they're called). Since I have the SEQ 1 it replaces all Channel EQ's. And the stereotools sound great and very lush, in stead of the more usual cheezy combfilterthingies that pass for stereo enhancing tools.
    And I actually like the interfaces. Simple, but stylish, functional and ergonomic (in this case meaning you can see all parameters in a quick glance, no guessing at settings).

  • I renewed my subscription for a third party app and was charged TWICE! $38 bux a pop. How do I go about getting one of the charges refunded?

    I renewed my subscription for a third party app and was charged TWICE! $38 bux a pop. How do I go about getting one of the charges refunded?C

    You can try contacting iTunes support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • HT201335 Is there a way to get airplay to work from iOS to my macbook without having to pay for a third-party application?

    Is there a way to get airplay to work from iOS to my macbook without having to pay for a third-party application?
    I've been trying to get my iPhone screen to play onto my macbook.

    There are no free ways to do it that I have seen. However, Reflector is reasonably priced. http://www.airsquirrels.com/reflector/

  • Is it possible for a third party to be added to an esatblished text message thread?

    Is it possible for a third party to be added to a text message thread (between 2 people). This test message thread has been established for over a year! He says he could see our message history via his icloud. Is this possible? Please help.....

    How "third party" are we talking about here.....? Not another user (usually family) who has access to the same Apple Id, is it? I know, that seems too obvious.....
    Could you explain the situation a little more? Did you or the other party forward your iMessage ("text" between "i" devices/Mac users) to this 3rd party? How did this 3rd party end up with any portion of your conversation (or is that the question)? I know it is easy to forward a portion of your conversation to another user. When you choose to forward a "text bubble", you receive round check boxes next to all messages in the conversation; you just pick and choose how much you want the 3rd party to receive. Other than that method, I know of no way to loop in a 3rd party to an existing conversation via iPhone or iPad.
    Anyone else?
    Best of luck,
    Bill

  • IOS 5 Notifications Not Working for Some Third Party Apps

    Recently updated my iPhone 4 to iOS5. Notification center worked perfectly for a week, but then I noticed that certain apps (Beluga) would not show up in the notification center despite receiving new messages. The home page didnt update with a badge either. It seems as if push notifications for some third party apps are not working correctly.
    I have already attempted all of these to correct the problem to no avail:
    1. Confirming notification settings for each application
    2. Turning notifications off and then on
    3. Removing and reinstalling app
    4. Restarting the iPhone
    5. Shutting down and powering up the iPhone
    6. Restoring the iPhone

    Having the same problem...  Ipad 2 running iOS 5 working fine.  My iPhone 4s gets the occasional Facebook notification but not much else.  Got home today and had about 5 notifications on the iPad that never came through to the iPhone.  Tried everything you tried and nothing....

  • Connections with third-party source control - will they be retained?

    I have RoboHelp installed on my hard drive. Company is swapping out my hard drive and I will need to reinstall it.
    All my RH projects are connected to a third-party source control mechanism (Visual SourceSafe).
    When I reinstall RH, will the connections to Visual SourceSafe be retained for all my projects?

    Hi,
    Just getting the latest version should work. I had a similar problem after a crash. RoboHelp can't detect which projects are in the VSS database, but after getting them, it all worked fine.
    You may however still want to backup your projects on a removable media to be sure. After the reinstall, just make sure the VSS client in installed, copy your project from the media and get back to work -- Could it be that simple? Well, it was for me.
    Greet,
    Willam

  • Item Details - Event for 'Create', 'Close' buttons - possible?

    Hi Friends,
    I am looking for EPCF Events for Item Details iView. I am able to show the record in this iview by selectIdHandler. Now, i want to clear the iView content - the functionality when we click 'Close' button.
    So, does any one of you know any Events to fire Create, Close buttons on Item Details iView?
    Thanks,
    Raags

    Hello Raags,
    Have you discovered how to trigger any of those events? I'm having a similar issue.
    I need when I open the record to have it in Edit mode already, not to click the Edit button in order to get there.
    Let me know if you discovered a solution.
    Best regards,
    Boris

  • Rescheduling for the third party items

    Dear Experts,
    I have one issue. In the sales order there are TAN and TAS items. TAN items are delivered and done with PGI. For TAS items PO created and then MIRO also done. Now some new items are added in the sales order.
    Why is it that the system reschedules the dates (Delivery date, loading date as well as Material availability date) for TAS items but at the same time it does not reschedules the TAN items. Strange but true..
    I would like to add here one more point. When there is a complete delivery indicator system considers the delivery date of the TAS item as the highest delivery date and reschedules the dates for rest of the items. Actually TAS items should not be considered at all since the MIRO is processed and the delivery to the customer has taken place.
    Is this a standard process..? Kindly help on this issue. if anyone has any idea on SAP note please do let me know.
    Thanks in advance.
    Regards,
    Vishita..
    Edited by: Vishi19 on May 18, 2010 12:44 PM

    Hello
    There are no other supported interfaces or tools other than LOGMINER to mine and interpret the oracle redo/archived logs. Oracle has the rights to change the redo format or make any changes in the redo stream or change vectors as part of any patchsets or new releases. Any third party software might face problems if Oracle changes its redo format or makes changes in the redo format.
    You might need to take a look at the following metalink note:
    <Note: 97080.1> "Extracting Data from Redo Logs Is Not A Supported Interface"
    However Oracle has a replication technology called Oracle Streams which infact mines the redo/archived logs with the help of a new background process called 'capture process' which does not use any APIs but is built into to Oracle Kernel itself. Oracle Enterprise Edition will have this feature built-in.
    Thanks,
    Rijesh

  • Separtae  PO for the third party vendor while adding the item in the sales

    Hi
      There is any possible to create to separate PO for the added new item (third party vendor)in the existing sale order .
    Thanks
    Ramesh

    I don't think it will update the Billing Date. However, In VF while creating Invoice, we can mention the required Date.
    Regards,
    Rajesh Banka

Maybe you are looking for