473,670 Members | 2,574 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Set control property as the result of a function taking a data-bound paramater?

Hi,

Pardon the unclear/verbose subject, I just can't think of another way
of phrasing it.

Basically, I can assign the (for instance) "Location" property of a
picture box to a data-bound item. Like, I can get the absoloute
location from an ADO.NET database, and assign it to the
PictureBox.Loca tion property.

But what I want to do is assign MyClass.GetImag e(DATABOUND_PAR AMETER)
to the PictureBox.Loca tion property.

For instance, I get the value "myimage.jp g" from the database. Now I
need to send the text "myimage.jp g" to a function and then assign the
*output of the function* to the PictureBox.Loca tion property.

Via the DataBinding property I can tie the "Location" property of the
PictureBox to the datasource, but I can't seem to get it to send that
value to a function and use the output as the location property.

Any ideas?

Jul 30 '07 #1
7 1883
On Mon, 30 Jul 2007 19:47:51 +0200, Computer Guru <Co**********@N eoSmart.netwrot e:
Hi,

Pardon the unclear/verbose subject, I just can't think of another way
of phrasing it.

Basically, I can assign the (for instance) "Location" property of a
picture box to a data-bound item. Like, I can get the absoloute
location from an ADO.NET database, and assign it to the
PictureBox.Loca tion property.

But what I want to do is assign MyClass.GetImag e(DATABOUND_PAR AMETER)
to the PictureBox.Loca tion property.

For instance, I get the value "myimage.jp g" from the database. Now I
need to send the text "myimage.jp g" to a function and then assign the
*output of the function* to the PictureBox.Loca tion property.

Via the DataBinding property I can tie the "Location" property of the
PictureBox to the datasource, but I can't seem to get it to send that
value to a function and use the output as the location property.

Any ideas?

It's not entirely clear how your DataBinding is set up, but it shouldn't be too difficult to achieve if you have an object between the GUI and the DataBase. The object should have a property you can bind to a Control.Locatio n property. Calculating the location is done by the object and can be as complex or simple as you like.

--
Happy coding!
Morten Wennevik [C# MVP]
Jul 30 '07 #2
On Jul 30, 8:58 pm, "Morten Wennevik [C# MVP]"
<MortenWenne... @hotmail.comwro te:
On Mon, 30 Jul 2007 19:47:51 +0200, Computer Guru <ComputerG...@N eoSmart.netwrot e:
Hi,
Pardon the unclear/verbose subject, I just can't think of another way
of phrasing it.
Basically, I can assign the (for instance) "Location" property of a
picture box to a data-bound item. Like, I can get the absoloute
location from an ADO.NET database, and assign it to the
PictureBox.Loca tion property.
But what I want to do is assign MyClass.GetImag e(DATABOUND_PAR AMETER)
to the PictureBox.Loca tion property.
For instance, I get the value "myimage.jp g" from the database. Now I
need to send the text "myimage.jp g" to a function and then assign the
*output of the function* to the PictureBox.Loca tion property.
Via the DataBinding property I can tie the "Location" property of the
PictureBox to the datasource, but I can't seem to get it to send that
value to a function and use the output as the location property.
Any ideas?

It's not entirely clear how your DataBinding is set up, but it shouldn't be too difficult to achieve if you have an object between the GUI and the DataBase. The object should have a property you can bind to a Control.Locatio n property. Calculating the location is done by the object and can be as complex or simple as you like.

--
Happy coding!
Morten Wennevik [C# MVP]- Hide quoted text -

- Show quoted text -
Hi Morten, thanks for your reply.

I'm not sure I follow:

I have a GUI (datagrid), a bindingsource, and a dataset. The
PictureBox.Imag eLocation property is the one I'd like to set via a
function - but the function needs to get it's parameter from the
bindingsource (which obviously changes every time a new row is
selected in the datagrid).

The current code (takes the information directly from the database and
sticks it directly in .ImageLocation) :
this.pictureBox 1.DataBindings. Add(new
System.Windows. Forms.Binding(" ImageLocation", this.dvdsBindin gSource,
"Image", true));

So what I need is somehow:
pictureBox1.Ima geLocation = new
System.Windows. Forms.Binding(" CalculateImage" , this.dvdsBindin gSource,
"Image", true)

Where CalculateImage is a delegate/callback to a function that takes a
single parameter (the field "Image" from the database) and returns a
value to store it in .ImageLocation. ...

Weird, I know.

Thanks :)

Jul 30 '07 #3
On Mon, 30 Jul 2007 20:17:56 +0200, Computer Guru <ComputerGuru@N eoSmart..netwro te:
On Jul 30, 8:58 pm, "Morten Wennevik [C# MVP]"
<MortenWenne... @hotmail.comwro te:
>On Mon, 30 Jul 2007 19:47:51 +0200, Computer Guru <ComputerG...@N eoSmart.netwrot e:
Hi,
Pardon the unclear/verbose subject, I just can't think of another way
of phrasing it.
Basically, I can assign the (for instance) "Location" property of a
picture box to a data-bound item. Like, I can get the absoloute
location from an ADO.NET database, and assign it to the
PictureBox.Loca tion property.
But what I want to do is assign MyClass.GetImag e(DATABOUND_PAR AMETER)
to the PictureBox.Loca tion property.
For instance, I get the value "myimage.jp g" from the database. Now I
need to send the text "myimage.jp g" to a function and then assign the
*output of the function* to the PictureBox.Loca tion property.
Via the DataBinding property I can tie the "Location" property of the
PictureBox to the datasource, but I can't seem to get it to send that
value to a function and use the output as the location property.
Any ideas?

It's not entirely clear how your DataBinding is set up, but it shouldn't be too difficult to achieve if you have an object between the GUI and the DataBase. The object should have a property you can bind to a Control.Locatio n property. Calculating the location is done by the object and can be as complex or simple as you like.

--
Happy coding!
Morten Wennevik [C# MVP]- Hide quoted text -

- Show quoted text -

Hi Morten, thanks for your reply.

I'm not sure I follow:

I have a GUI (datagrid), a bindingsource, and a dataset. The
PictureBox.Imag eLocation property is the one I'd like to set via a
function - but the function needs to get it's parameter from the
bindingsource (which obviously changes every time a new row is
selected in the datagrid).

The current code (takes the information directly from the database and
sticks it directly in .ImageLocation) :
this.pictureBox 1.DataBindings. Add(new
System.Windows. Forms.Binding(" ImageLocation", this.dvdsBindin gSource,
"Image", true));

So what I need is somehow:
pictureBox1.Ima geLocation = new
System.Windows. Forms.Binding(" CalculateImage" , this.dvdsBindin gSource,
"Image", true)

Where CalculateImage is a delegate/callback to a function that takes a
single parameter (the field "Image" from the database) and returns a
value to store it in .ImageLocation. ...

Weird, I know.

Thanks :)

Well, if your BindingSource contained a list of your own objects insteadof the DataSet you could easily create a CalculateImage property, although you would lose the ability to update the Database easily.

Something like

List<MyObjectli st = FillListFromDat abase();
BindingSource source = new BindingSource(l ist);
pictureBox1.Dat aBindings.Add(" ImageLocation", source, "Location") ;

class MyObject()
{
public Image Image{ get; set; } // C# 3 syntax
public Point Location
{
get{ return CalculateImageL ocation(); }
}
}

--
Happy coding!
Morten Wennevik [C# MVP]
Jul 30 '07 #4
On Jul 30, 9:35 pm, "Morten Wennevik [C# MVP]"
<MortenWenne... @hotmail.comwro te:
On Mon, 30 Jul 2007 20:17:56 +0200, Computer Guru <ComputerG...@N eoSmart.netwrot e:
On Jul 30, 8:58 pm, "Morten Wennevik [C# MVP]"
<MortenWenne... @hotmail.comwro te:
On Mon, 30 Jul 2007 19:47:51 +0200, Computer Guru <ComputerG...@N eoSmart.netwrot e:
Hi,
Pardon the unclear/verbose subject, I just can't think of another way
of phrasing it.
Basically, I can assign the (for instance) "Location" property of a
picture box to a data-bound item. Like, I can get the absoloute
location from an ADO.NET database, and assign it to the
PictureBox.Loca tion property.
But what I want to do is assign MyClass.GetImag e(DATABOUND_PAR AMETER)
to the PictureBox.Loca tion property.
For instance, I get the value "myimage.jp g" from the database. Now I
need to send the text "myimage.jp g" to a function and then assign the
*output of the function* to the PictureBox.Loca tion property.
Via the DataBinding property I can tie the "Location" property of the
PictureBox to the datasource, but I can't seem to get it to send that
value to a function and use the output as the location property.
Any ideas?
It's not entirely clear how your DataBinding is set up, but it shouldn't be too difficult to achieve if you have an object between the GUI and the DataBase. The object should have a property you can bind to a Control.Locatio n property. Calculating the location is done by the object and can be as complex or simple as you like.
--
Happy coding!
Morten Wennevik [C# MVP]- Hide quoted text -
- Show quoted text -
Hi Morten, thanks for your reply.
I'm not sure I follow:
I have a GUI (datagrid), a bindingsource, and a dataset. The
PictureBox.Imag eLocation property is the one I'd like to set via a
function - but the function needs to get it's parameter from the
bindingsource (which obviously changes every time a new row is
selected in the datagrid).
The current code (takes the information directly from the database and
sticks it directly in .ImageLocation) :
this.pictureBox 1.DataBindings. Add(new
System.Windows. Forms.Binding(" ImageLocation", this.dvdsBindin gSource,
"Image", true));
So what I need is somehow:
pictureBox1.Ima geLocation = new
System.Windows. Forms.Binding(" CalculateImage" , this.dvdsBindin gSource,
"Image", true)
Where CalculateImage is a delegate/callback to a function that takes a
single parameter (the field "Image" from the database) and returns a
value to store it in .ImageLocation. ...
Weird, I know.
Thanks :)

Well, if your BindingSource contained a list of your own objects instead of the DataSet you could easily create a CalculateImage property, although you would lose the ability to update the Database easily.

Something like

List<MyObjectli st = FillListFromDat abase();
BindingSource source = new BindingSource(l ist);
pictureBox1.Dat aBindings.Add(" ImageLocation", source, "Location") ;

class MyObject()
{
public Image Image{ get; set; } // C# 3 syntax
public Point Location
{
get{ return CalculateImageL ocation(); }
}

}

--
Happy coding!
Morten Wennevik [C# MVP]- Hide quoted text -

- Show quoted text -
Gotcha. So basically there is no easy way to add a proxy between the
bindingsource and the PictureBox alone; leaving the original
connection from other objects to the bindingsource and from the
bindingsource to the dataset/DB intact.

*just occurred to me*

Create a new control that inherits from PictureBox, and overrides just
the Location property.

customPictureBo x : PictureBox
{
string ImageLocation {
get { return base.ImageLocat ion; }
set { base.ImageLocat ion = CalculatePath(v alue); }
}

Wouldn't that work?

Jul 30 '07 #5
On Mon, 30 Jul 2007 21:25:44 +0200, Computer Guru <ComputerGuru@N eoSmart..netwro te:
On Jul 30, 9:35 pm, "Morten Wennevik [C# MVP]"
<MortenWenne... @hotmail.comwro te:
>On Mon, 30 Jul 2007 20:17:56 +0200, Computer Guru <ComputerG...@N eoSmart.netwrot e:
On Jul 30, 8:58 pm, "Morten Wennevik [C# MVP]"
<MortenWenne... @hotmail.comwro te:
On Mon, 30 Jul 2007 19:47:51 +0200, Computer Guru <ComputerG...@N eoSmart.netwrot e:
Hi,
Pardon the unclear/verbose subject, I just can't think of another way
of phrasing it.
Basically, I can assign the (for instance) "Location" property of a
picture box to a data-bound item. Like, I can get the absoloute
location from an ADO.NET database, and assign it to the
PictureBox.Loca tion property.
But what I want to do is assign MyClass.GetImag e(DATABOUND_PAR AMETER)
to the PictureBox.Loca tion property.
For instance, I get the value "myimage.jp g" from the database. Now I
need to send the text "myimage.jp g" to a function and then assign the
*output of the function* to the PictureBox.Loca tion property.
Via the DataBinding property I can tie the "Location" property of the
PictureBox to the datasource, but I can't seem to get it to sendthat
value to a function and use the output as the location property.
Any ideas?
>It's not entirely clear how your DataBinding is set up, but it shouldn't be too difficult to achieve if you have an object between the GUIand the DataBase. The object should have a property you can bind to a Control.Locatio n property. Calculating the location is done by the object and can be as complex or simple as you like.
>--
Happy coding!
Morten Wennevik [C# MVP]- Hide quoted text -
>- Show quoted text -
Hi Morten, thanks for your reply.
I'm not sure I follow:
I have a GUI (datagrid), a bindingsource, and a dataset. The
PictureBox.Imag eLocation property is the one I'd like to set via a
function - but the function needs to get it's parameter from the
bindingsource (which obviously changes every time a new row is
selected in the datagrid).
The current code (takes the information directly from the database and
sticks it directly in .ImageLocation) :
this.pictureBox 1.DataBindings. Add(new
System.Windows. Forms.Binding(" ImageLocation", this.dvdsBindin gSource,
"Image", true));
So what I need is somehow:
pictureBox1.Ima geLocation = new
System.Windows. Forms.Binding(" CalculateImage" , this.dvdsBindin gSource,
"Image", true)
Where CalculateImage is a delegate/callback to a function that takes a
single parameter (the field "Image" from the database) and returns a
value to store it in .ImageLocation. ...
Weird, I know.
Thanks :)

Well, if your BindingSource contained a list of your own objects instead of the DataSet you could easily create a CalculateImage property, although you would lose the ability to update the Database easily.

Something like

List<MyObjectl ist = FillListFromDat abase();
BindingSourc e source = new BindingSource(l ist);
pictureBox1.Da taBindings.Add( "ImageLocation" , source, "Location") ;

class MyObject()
{
public Image Image{ get; set; } // C# 3 syntax
public Point Location
{
get{ return CalculateImageL ocation(); }
}

}

--
Happy coding!
Morten Wennevik [C# MVP]- Hide quoted text -

- Show quoted text -

Gotcha. So basically there is no easy way to add a proxy between the
bindingsource and the PictureBox alone; leaving the original
connection from other objects to the bindingsource and from the
bindingsource to the dataset/DB intact.

*just occurred to me*

Create a new control that inherits from PictureBox, and overrides just
the Location property.

customPictureBo x : PictureBox
{
string ImageLocation {
get { return base.ImageLocat ion; }
set { base.ImageLocat ion = CalculatePath(v alue); }
}

Wouldn't that work?

That should work, although you may need to have your customPictureBo x implement INotifyProperty Changed. Not sure, and the base might take care of it, but if not it would look something like this

public string ImageLocation
{
get{ return base.ImageLocat ion; }
set
{
base.ImageLocat ion = CalculatePath(v alue);
notifyPropertyC hanged("ImageLo cation");
}
}
public event PropertyChanged EventHandler PropertyChanged ;
private void notifyPropertyC hanged(string property)
{
if(PropertyChan ged != null)
PropertyChanged (this, new PropertyChanged EventArgs(prope rty));
}
--
Happy coding!
Morten Wennevik [C# MVP]
Jul 30 '07 #6
On Jul 30, 10:25 pm, Computer Guru <ComputerG...@N eoSmart.netwrot e:
On Jul 30, 9:35 pm, "Morten Wennevik [C# MVP]"

<MortenWenne... @hotmail.comwro te:
On Mon, 30 Jul 2007 20:17:56 +0200, Computer Guru <ComputerG...@N eoSmart.netwrot e:
On Jul 30, 8:58 pm, "Morten Wennevik [C# MVP]"
<MortenWenne... @hotmail.comwro te:
>On Mon, 30 Jul 2007 19:47:51 +0200, Computer Guru <ComputerG...@N eoSmart.netwrot e:
Hi,
Pardon the unclear/verbose subject, I just can't think of another way
of phrasing it.
Basically, I can assign the (for instance) "Location" property of a
picture box to a data-bound item. Like, I can get the absoloute
location from an ADO.NET database, and assign it to the
PictureBox.Loca tion property.
But what I want to do is assign MyClass.GetImag e(DATABOUND_PAR AMETER)
to the PictureBox.Loca tion property.
For instance, I get the value "myimage.jp g" from the database. Now I
need to send the text "myimage.jp g" to a function and then assign the
*output of the function* to the PictureBox.Loca tion property.
Via the DataBinding property I can tie the "Location" property of the
PictureBox to the datasource, but I can't seem to get it to send that
value to a function and use the output as the location property.
Any ideas?
>It's not entirely clear how your DataBinding is set up, but it shouldn't be too difficult to achieve if you have an object between the GUI and the DataBase. The object should have a property you can bind to a Control.Locatio n property. Calculating the location is done by the object and can be as complex or simple as you like.
>--
>Happy coding!
>Morten Wennevik [C# MVP]- Hide quoted text -
>- Show quoted text -
Hi Morten, thanks for your reply.
I'm not sure I follow:
I have a GUI (datagrid), a bindingsource, and a dataset. The
PictureBox.Imag eLocation property is the one I'd like to set via a
function - but the function needs to get it's parameter from the
bindingsource (which obviously changes every time a new row is
selected in the datagrid).
The current code (takes the information directly from the database and
sticks it directly in .ImageLocation) :
this.pictureBox 1.DataBindings. Add(new
System.Windows. Forms.Binding(" ImageLocation", this.dvdsBindin gSource,
"Image", true));
So what I need is somehow:
pictureBox1.Ima geLocation = new
System.Windows. Forms.Binding(" CalculateImage" , this.dvdsBindin gSource,
"Image", true)
Where CalculateImage is a delegate/callback to a function that takes a
single parameter (the field "Image" from the database) and returns a
value to store it in .ImageLocation. ...
Weird, I know.
Thanks :)
Well, if your BindingSource contained a list of your own objects instead of the DataSet you could easily create a CalculateImage property, although you would lose the ability to update the Database easily.
Something like
List<MyObjectli st = FillListFromDat abase();
BindingSource source = new BindingSource(l ist);
pictureBox1.Dat aBindings.Add(" ImageLocation", source, "Location") ;
class MyObject()
{
public Image Image{ get; set; } // C# 3 syntax
public Point Location
{
get{ return CalculateImageL ocation(); }
}
}
--
Happy coding!
Morten Wennevik [C# MVP]- Hide quoted text -
- Show quoted text -

Gotcha. So basically there is no easy way to add a proxy between the
bindingsource and the PictureBox alone; leaving the original
connection from other objects to the bindingsource and from the
bindingsource to the dataset/DB intact.

*just occurred to me*

Create a new control that inherits from PictureBox, and overrides just
the Location property.

customPictureBo x : PictureBox
{
string ImageLocation {
get { return base.ImageLocat ion; }
set { base.ImageLocat ion = CalculatePath(v alue); }

}

Wouldn't that work?- Hide quoted text -

- Show quoted text -
Just for the record, it worked great.

Add this class:

class cPictureBox : PictureBox
{
public new string ImageLocation
{
get
{
return base.ImageLocat ion;
}
set
{
base.ImageLocat ion = CalculatePath(v alue);
}
}

string CalculatePath(s tring dvdid)
{
return "C:\\" + dvdid;
}
}
}

Search for the declaration and intialization of pictureBox1 and change
the type from PictureBox to cPictureBox.
All done :-)

Jul 30 '07 #7
On Jul 31, 12:20 am, "Morten Wennevik [C# MVP]"
<MortenWenne... @hotmail.comwro te:
On Mon, 30 Jul 2007 21:25:44 +0200, Computer Guru <ComputerG...@N eoSmart.netwrot e:
On Jul 30, 9:35 pm, "Morten Wennevik [C# MVP]"
<MortenWenne... @hotmail.comwro te:
On Mon, 30 Jul 2007 20:17:56 +0200, Computer Guru <ComputerG...@N eoSmart.netwrot e:
On Jul 30, 8:58 pm, "Morten Wennevik [C# MVP]"
<MortenWenne... @hotmail.comwro te:
On Mon, 30 Jul 2007 19:47:51 +0200, Computer Guru <ComputerG...@N eoSmart.netwrot e:
Hi,
Pardon the unclear/verbose subject, I just can't think of another way
of phrasing it.
Basically, I can assign the (for instance) "Location" property of a
picture box to a data-bound item. Like, I can get the absoloute
location from an ADO.NET database, and assign it to the
PictureBox.Loca tion property.
But what I want to do is assign MyClass.GetImag e(DATABOUND_PAR AMETER)
to the PictureBox.Loca tion property.
For instance, I get the value "myimage.jp g" from the database. Now I
need to send the text "myimage.jp g" to a function and then assign the
*output of the function* to the PictureBox.Loca tion property.
Via the DataBinding property I can tie the "Location" property of the
PictureBox to the datasource, but I can't seem to get it to send that
value to a function and use the output as the location property.
Any ideas?
It's not entirely clear how your DataBinding is set up, but it shouldn't be too difficult to achieve if you have an object between the GUI and the DataBase. The object should have a property you can bind to a Control.Locatio n property. Calculating the location is done by the object and can be as complex or simple as you like.
--
Happy coding!
Morten Wennevik [C# MVP]- Hide quoted text -
- Show quoted text -
Hi Morten, thanks for your reply.
I'm not sure I follow:
I have a GUI (datagrid), a bindingsource, and a dataset. The
PictureBox.Imag eLocation property is the one I'd like to set via a
function - but the function needs to get it's parameter from the
bindingsource (which obviously changes every time a new row is
selected in the datagrid).
The current code (takes the information directly from the database and
sticks it directly in .ImageLocation) :
this.pictureBox 1.DataBindings. Add(new
System.Windows. Forms.Binding(" ImageLocation", this.dvdsBindin gSource,
"Image", true));
So what I need is somehow:
pictureBox1.Ima geLocation = new
System.Windows. Forms.Binding(" CalculateImage" , this.dvdsBindin gSource,
"Image", true)
Where CalculateImage is a delegate/callback to a function that takes a
single parameter (the field "Image" from the database) and returns a
value to store it in .ImageLocation. ...
Weird, I know.
Thanks :)
Well, if your BindingSource contained a list of your own objects instead of the DataSet you could easily create a CalculateImage property, although you would lose the ability to update the Database easily.
Something like
List<MyObjectli st = FillListFromDat abase();
BindingSource source = new BindingSource(l ist);
pictureBox1.Dat aBindings.Add(" ImageLocation", source, "Location") ;
class MyObject()
{
public Image Image{ get; set; } // C# 3 syntax
public Point Location
{
get{ return CalculateImageL ocation(); }
}
}
--
Happy coding!
Morten Wennevik [C# MVP]- Hide quoted text -
- Show quoted text -
Gotcha. So basically there is no easy way to add a proxy between the
bindingsource and the PictureBox alone; leaving the original
connection from other objects to the bindingsource and from the
bindingsource to the dataset/DB intact.
*just occurred to me*
Create a new control that inherits from PictureBox, and overrides just
the Location property.
customPictureBo x : PictureBox
{
string ImageLocation {
get { return base.ImageLocat ion; }
set { base.ImageLocat ion = CalculatePath(v alue); }
}
Wouldn't that work?

That should work, although you may need to have your customPictureBo x implement INotifyProperty Changed. Not sure, and the base might take care of it, but if not it would look something like this

public string ImageLocation
{
get{ return base.ImageLocat ion; }
set
{
base.ImageLocat ion = CalculatePath(v alue);
notifyPropertyC hanged("ImageLo cation");
}}

public event PropertyChanged EventHandler PropertyChanged ;
private void notifyPropertyC hanged(string property)
{
if(PropertyChan ged != null)
PropertyChanged (this, new PropertyChanged EventArgs(prope rty));}

--
Happy coding!
Morten Wennevik [C# MVP]- Hide quoted text -

- Show quoted text -
btw, it wasn't necessary to use the notifyPropertyC hanged function to
get it to work.

Thanks for all your help.

Jul 30 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1355
by: Mike Barrett | last post by:
I have a strange one here and I believe it is a bug. I googled it and saw others having a similar issue and nobody seems to have a fix. I will take another shot. I get this ERROR MESSAGE... "Specified argument was out of the range of valid values. Parameter Name: '9' is not a valid value for 'index'." ....when I attempt to "Refresh" a ListView control AFTER it has been sorted.
9
2925
by: ckerns | last post by:
I want to loop thru an array of controls,(39 of them...defaults = 0). If value is null or non-numeric I want to assign the value of "0". rowString = "L411" //conrol name if (isNaN(eval ("document.forms."+rowString+".value")) == true ) { //this alert works if the value is a letter,i.e,"a" alert("You have entered an non-numeric value.\nEnter a number in the appropriate box.");
16
25404
by: sneill | last post by:
How is it possible to take the value of a variable (in this case, MODE_CREATE, MODE_UPDATE, etc) and use that as an object property name? In the following example I want 'oIcon' object to have the properties: mode1, mode2, and mode3. This seems simple but I can't quite figure it out... Any ideas anyone?
2
3741
by: John Hargrove | last post by:
I'm having trouble setting decimal place values in the results field of a sample management database I'm building for an environmental testing laboratory. The degree of sensitivity varies among test methods; consequently, some results are reported to 2 decimal places, some to 3, etc. The Results subform consists of Test Parameter, Result, Report Unit, Analysis Date, Analyst and other fields. The test parameter control is a drop-down...
8
2259
by: David Lozzi | last post by:
Howdy, I have a user control that is a report to display data. On the page the control is inserted in, I have filter options to filter the report. When I try to do something like this, nothing happens. dim filt as string ... build filter string... UserControl.ReportFilter = filt
0
5561
by: Brian Young | last post by:
Hi all. I'm using the Property Grid control in a control to manage a windows service we have developed here. The windows service runs a set of other jobs that need to be managed. The control is used to view the state of the running jobs and schedule new jobs. The control also runs in the context of Internet Explorer (we do this so the administrators of the jobs can always receive the latest control). The property grid is used to...
0
1903
by: Brian Henry | last post by:
Ok I've never implemented a snap location before so I dont really know what im doing wrong here... anyways, I am making a custom slider control that takes dates as its values instead of integers... then taking that date range and finding dates specifiec between them (in a list of dates) and putting snap marks, so if you slide it near one of them it should snap to that tick, but that part i cant figure out. the rest seems ok so far... here...
15
1834
by: Hamed | last post by:
Have I posted the message to wrong newsgroup? Or Does the question is so much strage? Would someone please kindly direct me to a true newsgroup or resource? Best Regards Hamed
4
2102
by: Rick | last post by:
Hello, I built a composite web control that has a textbox and a date control. added my custom control on a webform where there are other standard controls. Each control on the form has a required validator. I need to have a validator for my custom control, but don't know how to do this. I added a CustomValidator to the form, but in design mode, my custom
0
1955
by: ChopStickr | last post by:
I have a custom control that is embedded (using the object tag) in an html document. The control takes a path to a local client ini file. Reads the file. Executes the program specified in the ini on the client's PC. After the program has ended the control looks in a client side temp folder (specified by the ini file) for an image created by the executed program. If the image is there, then the control moves the file to a public folder...
0
8466
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8384
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8901
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8813
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8659
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7412
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6212
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4388
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2037
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.