Search found 4 matches

by newbi2009
Fri Jun 18, 2021 3:02 am
Forum: PowerShell GUIs
Topic: functions and parameters
Replies: 8
Views: 2843

Re: functions and parameters

I am sorry - I just might be too stupid, to get this.... ?! When I call the function (from the main window) like you said: copyright $this ....and do a write-host $window in the function, I do not get anything.... I think, that the issue is, that I have to have either $Mainwindow.Controls.Add($copyR...
by newbi2009
Fri Jun 18, 2021 12:31 am
Forum: PowerShell GUIs
Topic: functions and parameters
Replies: 8
Views: 2843

Re: functions and parameters

Maybe it helps to post my code: Can somebody tell me, how to get the copyright-button from the function into the mainwindow and the second window? Thank you very much function copyright([object]$window){ $copyRight = New-Object System.Windows.Forms.Button $copyRightFont = New-Object System.Drawing.F...
by newbi2009
Fri Jun 18, 2021 12:21 am
Forum: PowerShell GUIs
Topic: functions and parameters
Replies: 8
Views: 2843

Re: functions and parameters

Thanks for answering on this. But could you give me another hint, how to pass an object to a function?

Thanks again
by newbi2009
Thu Jun 17, 2021 4:59 am
Forum: PowerShell GUIs
Topic: functions and parameters
Replies: 8
Views: 2843

functions and parameters

Hi there, I am experimenting with functions, at the moment and do have the following issue: I have a little GUI-based program, which has several windows. I now want to add a little "copy right -logo" into every windows. Since I do not want to add the copy-right-code into every window, I am trying to...