.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to: Change a value in a window through another window

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :WPF
im working in Visual Studio 2010 and im programing with VB.net
so i'm working on Media Player with WPF and i want to know how i can
change a value in the main window through another window. I tried the code
ImgOpacitySlider.Value = My.Windows.main1.Backimage.Opacity
but it did not work.
Can someone help me??!!
!NOTE: I have a slider.Its name is "ImgOpacitySlider" ,a window (or class) .its name is main1 ,an image in main1 .its name is Backimage and a window (or class) to work with options .its name is Option.
Thanks very much.

View Complete Post

More Related Resource Links

How can I change the WPF window title bar size through Interop services

Hi all,      I want to use my custom title bar in my custom window. In that need a title bar with more height than default widow title bar height. How can I achieve this through window Interop services???? Thanks in Advance.. Suresh.

Change a controls properties from another window

I have a WPF App that opens a window (MainWindow) and has a button control that creates a new instance of a Window2 class and calls window2.show() When I click this button I disable it from within MainWindow code. The question I have is when the Window2 onclosing event is called  how do I access the Mainwindow button properties to enable it again. TIA Mike

How do you change the color of the main frame on a Window in WPF?


I have an application where all windows have a very custom look/feel.  When the user has their theme set to Classic, or even set to certain default themes, the colors clash with my main app colors.

Seems like it should be easy to set a brush on the Frame portion of a Window in WPF but this appears to be missing from WPF.

I have searched around, but the only solutions have found involve making the main window transparent and manually creating the border and drawing the frame yourself and handling all the sizing/move options yourself.  I got this to work just fine, however I have a window on which I need to use INTEROP to show an HwndHost on a canvas.

HwndHost doesn't appear when being used on a Transparent window, so I simply cannot make the window Transparent without making my app useless.

I have tried setting the WindowStyle="None" and that gets me close, but shows an ugly thin frame around whatever I put on the window.  I wish "None" really meant none..  Unfortunately, it doesn't.

Does anybody have any way to override the color of the main window frame without making it Transparent or setting the WindowStyle="None" ?

Please help me out with a code sample if you have a good solution for this?

Thanks a bunch,



How to change a text color in window form button!



I got an Export button in the form. I like the button text color that change from original black to white when I press it. I can change the background color of the button, but I am not sure how to change the Export text color to white. Please help. Thanks in advance.

Change domain AD + upgrade Sharepoint 2007->2010 = window with a request login/password


New installation of Sharepoint 2010 in Domain_A domain. I added a content database WSS_content2007 from Sharepoint 2007 (from domain Domain_B). I didn't run the command stsadm -migrateuser. New accounts from domain Domain_A were manually added to SharePoint 2010. In table Userinfo on WSS_Content2007 on Sharepoint 2010 are accounts from both domains. Old domain Domain_B was deleted.
Users get a window with a request re-enter your username and password from time to time.
What should I do? Can I delete the account from the domain Domain_B with stsadm command? Should the column tp_title contain unique records for the same user and the same site?


help to change from cursor to cte or window function or set based

Hi i have table lots of heartbeats i need to know when heartbeat started and when it stopped, and not all the heartbeats in between. Can be multiple heartbeat stops. Thanks
set nocount on
create table #temp (id int, alive bit, checktime datetime)
insert #temp values (1,1,dateadd(minute,-7,GETDATE()))
insert #temp values (1,1,dateadd(minute,-6,

Change location of a control in C# , it works fine in XP but in window 7 it donot take proper effect


I have created many custom control in my application. In these controls I make some text boxes  visible and invisible and change their locations according to my requirement. These controls work fine when I run application in window XP but when I run this application in windows 7, text boxes don't appear on proper locations and often overlap each other.

Please help me

Modal popup window in ASP.Net

A Masked div or modal popup window is a child window created from the parent window which prevents the user from interacting with parent window before he returns to the parent application.

lossing focus from model pop up window controls


hi i using a model pop up window with some textbox but when i click on textbox of model pop up focus move to back to page textbox control plz help me 

Open PopUp Window From Error httpModule


I would like to open a popup window from the assembly to present the information to the user. Does anyone know if this is possible, I am presently doing the following:

        WriteLine("body {font-family:""Verdana"";font-weight:normal;font-size: .7em;color:black; background-color:white;}")
        WriteLine("b {font-family:""Verdana"";font-weight:bold;color:black;margin-top: -5px}")
        WriteLine("H1 { font-family:""Verdana"";font-weight:normal;font-size:18pt;color:red }")
        WriteLine("H2 { font-family:""Verdana"";font-weight:normal;font-size:14pt;color:maroon }")
        WriteLine("pre {font-family:""Lucida Console"";font-size: .9em}")

Create a user friendly pop up window


Hello friends I am new to asp.net programming. While working with windows form(windows application) i have created a window for editing purpose(just like popup window ) which contains three bounded dropdown list a button and a gridview. After making selections from the drop down when we press button the corresponding result should display in a grid.After that when you click on the grid row it will load the corresponding datas in my form. i want to create such control in asp.net . i have to use jquery or ajax.And this pop up window i have to use more than twenty times in my application.am using VS2008 ASP.NET and C# 3.5 . Plese suggest me what to do. Thanks in advance

problem in consuming WCF service through Window application


I have a silverlight application and WCF service all made in VS 2010 , i had hosted my site to web server which contain Window 2008 and IIS 7.0

now the problem is i have another application which is a window application developed in VS2008 , when i try to add the service reference it gives me error


The document at the url was not recognized as a known document type.

The error message from each known type may help you fix the problem:

- Report from 'DISCO Document' is 'There was an error downloading 'http://dev_qa.emspa.com/HRDev3/Service.svc?disco'.'.

  - The request failed with HTTP status 400: Bad Request.

- Report from 'WSDL Document' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

- Report from '' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

- Report from 'XML Schema' is 'The document format is not recognized (the content type is 'text/html; charset=UTF-8').'.

Metadata contains a reference that cannot be resolved: ''.

Content Type application/soap+xml; charset

Crystal Report parameter value window.


 Hi friends,

   I am using Crystal report which displays the result of stroed procedure which have 2 paramater.

  When i run report it shows two window for getting each parameter.

  My need is, can i have one window for getting all the paramter value for stored procedure.


  With Advanced thanks,






Aero Glass: Create Special Effects With The Desktop Window Manager


In this article we introduce the Desktop Window Manager, the new interface that manages how windows are rendered on the Windows Vista desktop.

Ron Fosner

MSDN Magazine April 2007

C++ Q&A: Window Destruction in the .NET Framework


If a window is destroyed, does the .NET Framework immediately destroy the corresponding Form, or does it wait until a garbage collection to do this? How can you release my resources as soon as the window is destroyed? This month Paul DiLascia gives you the answers.

Paul DiLascia

MSDN Magazine May 2003

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend