See If A Passed Uielement Has A Particular Property?

Apr 2, 2009

I need to see if a passed uielement (control) has a particular property like borderthickness, itemsdources, backgroundcolor and so on

View 2 Replies


ADVERTISEMENT

Operator Is Not Defined For Types UIElement And UIElement?

Mar 7, 2012

I translate from C# some code into VB.NET, (WPF, .NET 4)[code]How is it possible, that in C# the operator is defined, but in VB.NET - NOT(?)

View 1 Replies

Validate A Value Passed To The Property Before Setting The Property?

Apr 12, 2011

In on a section of my book about classes and properties. In this example, the author is attempting to show how you can validate a value passed to the property before setting the property. Looks like so far in this book, a couple of things have slipped past the editor, and I think this might be another one...Here's the example:

[Code]...

View 2 Replies

Error 5843 - One Of Values Passed To This Method Or Property Is Out Of Range

Apr 18, 2011

I've mainly been recording keystrok macros... I created visual basic code that allows the user of a template to hide table gridlines - which works fine. The code to show gridlines does not work if the table has only one row. Here is the code - it is getting "stuck" on the
.LineWidth = wd

LineWidth050pt for a horizontal border, as there isn't one. I don't know how to change the code to not execute the command if a horizontal border line does not exist.

With Selection.tables(1)
With .Borders(wdBorderLeft)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = 5592405
[Code] .....

View 2 Replies

Can A Generic List Of T Be Passed To Function Similar To Way An Array Is Passed?

Mar 23, 2012

I want to pass a List of T where T is an object I've created that has about ten properties (strings, dates and integers).The lst passes to the function successfully. I am also passing an New T of the Object (itm as T).I can see all the values (see image below), but because it's generic I cannot seem to retrieve the property values and I cannot figure out how to iterate through the properties of each itm as they are retrieved in the For Each.[code]

View 10 Replies

Wpf - Find Out When A New UIElement Is Added In Silverlight?

Apr 18, 2009

I am designing a user control in sliverlight that inherits from canvas. It is necessary for me to find out when a new UIELement is added to Children property of MyBase but there is no event like "ItemAdded". Since I want to animate the children of my canvas, I can not use LayoutUpdated event (It is hit a million times).

View 2 Replies

Find Out Wherer A Mouse Button Is Pressed When Mouse Pointer Is Leaving A UIElement?

Apr 6, 2011

I've been working on a GUI in WPF which I'm fairly new to, having only used Windows Forms up until now. So far, my GUI is very simple: it contains two rectangles, each of which drops a shadow. The shadow creates an effect of rectangles "floating above the canvas" so to speak.

When one of the rectangles is pressed, the myRectangle.MouseDown event is handled such that the shadow goes away, thus creating an effect of the rectangle being pressed down onto the canvas, like a button.Similarly, when mouse button is released, the myRectangle.MouseDown event is handled such that the shadow reappears and the rectangle "floats" again. This behavior make them resemble buttons. Note, there a reasons I want them to be rectangles and not custom buttons.

[Code]...

If the pointer leaves a rectangle while mouse button is pressed, I'd like shadow to reappear. This is arguable simple, because theoretically in this case, any time myRectangle.MouseLeave is raised, the shadow should come back on, even if it was already there.If the pointer left a rectangle when mouse button was pressed, then came back while before the button was released, I want the shadow to disappear again. This one is what gives me problems. No idea how to do this.

View 1 Replies

.net - 'Property' Cannot Implement 'Property' Because There Is No Matching Property On Interface 'IName'?

Dec 9, 2011

I'm having some very weird issues with interfaces right now.

I have a very simple setup. In one of my class, I have a Property implementing a Property from an Interface.

In my class it's like:

Private _oForm As IForm
Public Property Form As IForm Implements IContainer.Form
Set(value As IForm)

[Code]...

I have like dozens of interfaces like this working throughout my project and I can't believe this simple one can't work!

View 1 Replies

ENV Not Passed To Cmd File From VBS?

Jun 7, 2011

I'm very new to vbs scripting and am trying to set a System envinonment variable which will be used by a subsequent cmd file which is called by the VBS script which created the ENV varible.The vbs script creates the varibale correctly but the called CMD file does not find it. I thought a child process inherited its parent env settings. I understand the child can not change the parents env. why the cmd file does not see the variable, am I using the wrong shell command in vbs to call the cmd file or something?Here is the VBS script that simply sets a System varibale and the CMD file below which attempts to log it.on error resume next

Dim objShell
Dim objEnv
Dim usbDrive
Set objShell = WScript.CreateObject("WScript.Shell")

[code]....

View 2 Replies

Arrays Passed To Functions?

Jan 27, 2009

Arrays Passed to Functions

View 1 Replies

Check If 24hours Has Passed?

Feb 1, 2012

Ok so I tried to make an application that will open a URL ONLY if 24hours has passed since it had previously opened. My idea is that it will save the time/date to a .txt (unless there another way which im completely missing?) when it is opened (only open if the current time is the saved time/date + 24hours) and rewrite it after every time.

When I say I tried, I mean I opened a project, realised I had no idea what to do and stared at the Form for 10minutes.

View 3 Replies

Format Changes When Passed To The Database?

Jun 7, 2011

I have kind of a problem in a database well its suppose to save a date but like a string, well more like a char type, and i need it that way to do reports.So there to tables Ventas and VentasDD so they have the same information what ever is introduced in the form both those tables have the information, the information is introduced simultaneously.So this is how its supposed to be save like VENTAS image the VENTAS date is saved correctly But the when its saved on VENTASDD table the format for some reason changes even if its the same type and text and everything, like the image shows, the first record i modified it manually but it is displayed like the other 3 records

View 1 Replies

Get The Instance Of The Object Passed To It?

Jan 18, 2011

I am working on a ASP.NET MVC2 website. For learning. I am working with the Visual Basic language.

In a view I would like to do this:

<%: Html.EditorForEnumeracion(Function(v) v.combustible%>

So, I created an HtmlHelper extension method:

Imports System.Runtime.CompilerServices
Imports System.Linq.Expressions
Imports System.Reflection

[Code]....

View 2 Replies

Get Value Of A String That Is Passed As Parameter?

Oct 19, 2011

I need to pass in parameters to my sub/function. When the parameter is passed, the value in the string, I would like to get the value evaluated and sent as:

Dim strParams As String = drRow(0)
' drRow is a row from DB Table. the value in drRow(0) =
' "@FromDate=""" & Now.AddDays(-10).ToShortDateString & """&@ToDate=""" &

[code].....

View 2 Replies

Highlighting Passed Text Of RTB

Apr 15, 2012

I'm trying to make a sub that will highlight the text of a RTB that is passed.
Here is the code:
Private Sub SearchAll(ByVal selectedRichTextBox As RichTextBox)
Dim startPos As Int16 = 0
Dim matchPos As Integer = selectedRichTextBox.Find(TextBoxSearchFor.Text, startPos, selectedRichTextBox.Text.Length, RichTextBoxFinds.None)
selectedRichTextBox.SelectionBackColor = Color.Yellow
[Code] .....

View 4 Replies

Keep ASP.NET ViewState Without Being Passed Via QueryString?

Jul 19, 2011

I have a form with its method being "get" that passes the variables and their values to the query string, respectively. However, it also passes the viewstate variable in the query string. Now, I have a very long viewstate value on the given page, and if passed in the query string, the viewstate variable will cause the page to error out, due to "too long of a query string" which happens to also be too long of a url.

I cannot merely remove the viewstate variable - I need it. But I need to pass the viewstate variable along via some method other than get when the form is submitted, while the other inputs of the form (the non-hidden inputs) are appended to the query string.

View 1 Replies

ListView DataKeys Not Being Set / Passed

Aug 12, 2011

I am in the process of switching over a control from a GridView to a ListView, but am stuck on accessing the new ListViews DataKeys. My ListView is setup as follows[code]...

View 1 Replies

Looping Through Several Passed Parameters With Same Name?

Sep 25, 2011

i am passing paramters from one page to another all witht he same name...how do i look through them?

dim sHtmlBody
sHtmlBody = ""
for i=0 to Request.QueryString("name").Count

[Code]....

this is what i am doing and it works. But how do i access the individual name

Dim Name = Request.QueryString("Name")(i)

View 2 Replies

Passed To Constructor Of A Delegate?

Aug 31, 2011

While creating instance of a Delegetae there comes a intellicence AddressOf , Sub and Function .

AddressOf signifies the address of the function or Sub , what does Sub or Function signifies ?

View 5 Replies

Sub Parameter Is Being Passed An Incorrect Value?

Nov 27, 2009

The parameter to a sub is being passed a value like 501/500, of coarse this value should be converted to 1.002. Unfortunately, the actual value being passed to the parameter is 1.0.

[Code]...

View 2 Replies

Variable Passed By Reference?

Oct 28, 2011

I am working on a little program (game) is called Pig latin. I created a sub procedure and I passed the word to be converted by value and the piglatin word byref.Now when I call the procedure in the button click event I get the wavy green line under the variable passed by reference but the program works ok. Call Convert_to_Pig_Latin(strOriginalWord, trPigLatinThe error message when I hover my mouse over the green line says " Variable strPigLatin' is passed by reference before it has been assigned a value. A null reference exception could result at runtime."

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[code].....

View 4 Replies

Variable Passed In Sub Changes Procedures In Sub?

Apr 9, 2009

The code in my function looks like

FunctionMain(Product,var2,var3)
Call Function1
Call Function2

[code]....

View 11 Replies

VS 2005 String Not Being Passed?

Dec 6, 2011

I'm sure there are better ways to do this and i am open to suggestions. I'm not worried about speed i figured get it to work then i could improve it but my problem is mynewstr2 is not being set to the last value of mynewstr for some reason.(probably something silly im overlooking right now). at this point just converting the image to a string i can work with for my very basic ocr.

Public mynewstr2 As String
Public Sub pictostr(ByVal image As System.Drawing.Bitmap, Optional ByVal Mode As BWMode = BWMode.By_Lightness, Optional ByVal tolerance As Single = 0)

[Code]....

View 7 Replies

Why Text Isn't Being Passed To Website

Feb 9, 2011

I'm having a heck of a time getting this to work....on other forums there isn't a problem with passing text to the websites but this site is driving me nuts.

[Code]...

View 2 Replies

ClientID Not Being Passed Through Forms Correctly

Dec 21, 2011

I've got three forms, one is a search form where you use textboxes to filter the datagridview to find the Client you wish to work on.The second form is basic data entry, their personal details, assets, liabilities, etc is entered on this form.The third form calculates all sorts of reports about the particular client.I filter the binding sources each time to get the appropriate clients data on the form when the particular client is chosen in the first form.When I go to print the word document I create at the button.click event, it comes up with an error saying "Conversion from string "" to type 'Integer' is not valid. I've checked countless times, tabbed in and out of the textbox, named ClientIDTextbox, but it still wont accept that there is a value in that textbox - the error is appearing on the line where I use the textbox to query data from the database using the ID in the textbox.The third form holds the print button, and the second form holds the ClientIDTextbox which is causing this error.

I'm about to try querying the binding source, instead of applying a filter, using ClientBindingSource.DataSource = dt where dt is a datatable. I'll let you know how this goes! But in the meantime, is it because I've filtered the binding source multiple times across forms that the error is appearing?

View 3 Replies

Determine The Type Of A Passed Object?

May 19, 2009

I am still developing this function, but here is what I am intending it to do. This function will accept an Object, then try to determine its type. There are a specific set of types I am looking for: Integer, Boolean, Date, String. What I have so far is pretty privative, but it seems to be working so far:

Private Function DataType(ByVal entry As Object) As ValueType
Try
If IsNumeric(entry) Then

[Code].....

View 3 Replies

Forms :: Add The Argument For The ID In The Labels Tag To Be Passed To This Sub?

Feb 9, 2011

I have created a control, similar to an image combo, but a bit different. Any how, each of the labels that contians text to be clicked has an ID in their tag, that i wish to read. I have a sub routine called CBO_Click() which has the same arguments as a normal label click. How can i add the argument for the ID in the labels tag to be passed to this sub.

View 2 Replies

Forms :: Store The Reference Passed To A Sub?

Aug 6, 2010

I've searched a lot on both google and here but sorry, couldn't find.Maybe I'm just asking the wrong question, so I'll try to explain it here to see if someone can help me:

what I'm trying to do is what in C would be as simple as int varptr = &var I have a form that is just a communication watcher/logger. It's just a blank text box with a Pause/Play button and a copy to clipboard button and every new activity on my serial communication is logged. At the moment the form have a timer that once a second do textbox.text = serial1.log ...

but the problem is that I also have serial2; serial3; sql1 that I would like to keep an eye on them, and considering my work here I'm sure I would be re-using this form a lot if I could make it portable. Create one form for each is just stupid, as you'll all agree.

Then I would like to have an sub initialise(byref log as string) that would store this reference into an local variable within the form; so that every new instance of my form could be initialised with whatever log they'll be looking for and the timer just make textbox.text = LogPointer to the actual value of the log string.So, as I said I really wanted a int varptr = &var

View 4 Replies

How Are Parameters Passed To Functions By Default

May 22, 2012

[code]Is j passed as value ByVal or by reference ByRef?Or does it depends of the data type? What if I have a complex object passed as the value?

View 2 Replies

How Parameters Can Be Passed To Method Using Threading

Aug 20, 2009

How would I go about passing parameters to a method? I would want to do the following:
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
ReceivingUdpClient = New System.Net.Sockets.UdpClient(6767)
Dim receiveBytes As [Byte]() = ReceivingUdpClient.Receive(RemoteIpEndPoint)
Dim ThreadReceive As New System.Threading.Thread(AddressOf receiveMessages(receiveBytes))
ThreadReceive.Start()
End Sub
Private Sub receiveMessages(ByVal receiveBytes As Byte())
'INSERT CODE
<br/>
End Sub

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved