|
|
I do doubt that two wrongs make a right
I would point you to DirectX for full sound control, or third party control suites.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
Hello.
i am using asp.net2.0 c# with atlas ajax enabled website.
in one module i have to creat radmenu inside the update panel on a button click..
but in this dynamic control generation its creating problem.
like its initial state is fully expand.
if i added post back trigger for that button now its generated in actual format like menu should be.
but now when i am scrolling my page then menu is always remain same as its postion but actually its should move as scroll move.
i hope i make my question clear.
if any one have any hint for this.please help me and mail me soln.
my address is dearviveksingh@gmail.com
thanx in advance.
|
|
|
|
|
Other forum members may feel different, but I would suggest that you post this in the forum of the site where you recieved the control.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
dearvivek wrote: dearviveksingh@gmail.com
Dumb move, you will get spam, but not from this site, from screenscrapers that look for addresses on the web.
This is not the ASP.NET forum. So you're two steps removed, you should ask Telerik, and if you have ASP.NET questions, you shuld not ask them in the C# forum
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I want to disable a specific element in a ComboBox, see:
http://www.telerik.com/demos/aspnet/ComboBox/Examples/Programming/AddRemoveDisable/DefaultCS.aspx[^]
I am halfways done, the following code makes an item gray (by calling ((ComboBoxExItem)comboBox.Items[0]).Enabled = false; ), but the item is still selectable:
class ComboBoxEx : ComboBox
{
public ComboBoxEx()
{
DrawMode = DrawMode.OwnerDrawFixed;
}
protected override void OnDrawItem(DrawItemEventArgs ea)
{
ea.DrawBackground();
ea.DrawFocusRectangle();
Rectangle bounds = ea.Bounds;
bool enableItem = false;
if (ea.Index != -1)
{
enableItem = ((ComboBoxExItem)this.Items[ea.Index]).Enabled;
}
Font myFont = new Font(ea.Font, FontStyle.Italic);
if (ea.Index != -1)
{
if (enableItem)
{
ea.Graphics.DrawString(Items[ea.Index].ToString(), ea.Font, new SolidBrush(Color.Black), bounds.Left, bounds.Top);
}
else
{
ea.Graphics.DrawString(Items[ea.Index].ToString(), ea.Font, new SolidBrush(Color.Gray), bounds.Left, bounds.Top);
}
}
else
{
ea.Graphics.DrawString(Text, ea.Font, new SolidBrush(Color.Gray), bounds.Left, bounds.Top);
}
base.OnDrawItem(ea);
}
}
class ComboBoxExItem
{
private string _text;
public string Text
{
get { return _text; }
set { _text = value; }
}
private bool _enabled;
public bool Enabled
{
get { return _enabled; }
set { _enabled = value; }
}
public ComboBoxExItem()
: this("")
{
}
public ComboBoxExItem(string text)
: this(text, false)
{
}
public ComboBoxExItem(string text, bool enabled)
{
_text = text;
_enabled = enabled;
}
public override string ToString()
{
return _text;
}
}
Anybody have some suggestions how I can make an item truly disabled, so that it cannot be selected? I don't mind using DLL imports in my code.
modified on Friday, June 27, 2008 9:22 AM
|
|
|
|
|
This is the xml inside the Settings.xml file.
At present I read this xml data using xmlReader.
How can I update the data using code please?
Thanks
<?xml version="1.0" encoding="utf-8" ?>
<settings>
<setting>
<MailServer>smtpinternalserver</MailServer>
<MailTo>myaddress</MailTo>
<MailFrom>anotherAddress</MailFrom>
<Folder>C:\Work\Developments</Folder>
<Filter>*.*</Filter>
<EnableMonitor>True</EnableMonitor>
</setting>
</settings>
|
|
|
|
|
You can use XMLWriter , but it won't allow to append data. Easy way would be load the file to a XMLDocument instance, do necessary changes to the data and call "Save " on XMLDocument instance.
|
|
|
|
|
Yes, but remember that I am updating the xml data using a winform application and I am NOT manually changingthe xml file data (The winform is doing that).
Do you still think xmldocument is a better choice.
Thanks
|
|
|
|
|
XMLDocument is a .NET framework class. It can be used in winforms as well as ASP.NET.
|
|
|
|
|
How do I get the immediate window in visual studio 2008 please?
Thanks
|
|
|
|
|
arkiboys wrote: How do I get the immediate window in visual studio 2008 please?
When you are debugging, you can go Debug > Windows > Immediate or Ctrl+D, I.
|
|
|
|
|
Dear Friend ,
I have some problem to handle WebBrowser control in my Visual Studio 2005 windows application using C# language, actually i create an apllication which show important details about an control use in web site like if i pass url of http://www.google.com in WebBrowser Control it will open that site in that control and with some logic i show the important control list present in that web form with there imp property which will easy for us in testing web site controls and there properties for our sites...
all working fine...
But when i use an site for test which is after login (from that WebBrowser control) try to open in new Fullscreen form, because of which i think it lost the thread and give me login fail error as well as it will open in new form because of which i can't access the forms control using mshtml dll (which will usefull for accessing html controls and there properties) and WebBrowser control.
I dont know what to do for this, is it threading problem???
Or is it possible to open that new window in the same WebBrowser control with same thread with some logic, so that i can access the properties of that control???
Please give me an idea i m bang my head lots of time on my desk (I know this is not an a good idea..), Please Help Me....
thanks in advanced
Sasmi
|
|
|
|
|
Hi... I need to create an XML file from an object, and I have to obtain the the following root element:
<declaresalary>
xmlns:st="http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationServiceTypes"
xmlns:ct="http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationContainer"
xmlns:sd="http://www.swissdec.ch/schema/sd/20051002/SalaryDeclaration"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ct:requestcontext>
...
My problem is that I can't figure out how to set all those xmlns attributes.
Can somebody give me an hint please?
Life is not short... the problem is only how you organize yourself
|
|
|
|
|
JoZ CaVaLLo wrote: My problem is that I can't figure out how to set all those xmlns attributes.
<br />
System.Xml.Serialization.XmlSerializerNamespaces i think
|
|
|
|
|
the right use of XmlSerializerNamespaces is
XmlSerializerNamespaces namespaces = new XmlSerializerNamespaces();
namespaces.Add("ct", "http://www.swissdec.ch/schema/sd/20051002/SalaryDeclarationContainer");
namespaces.Add("sd", "http://www.swissdec.ch/schema/sd/20051002/SalaryDeclaration");
namespaces.Add("xsi", "http://www.w3.org/2001/XMLSchema-instance");
System.IO.File.Delete(pPathToGenerate);
fs = new System.IO.FileStream(pPathToGenerate, System.IO.FileMode.Create);
writer = new System.Xml.Serialization.XmlSerializer(typeof(XmlSerializatorItems.DeclareSalary));
writer.Serialize(fs, oDeclare, namespaces);
fs.Close();
In the object to serialize you have to specify the namespace for each field.
Life is not short... the problem is only how you organize yourself
|
|
|
|
|
Hi all,
Am trying to call a simple function held against an Oracle database. I've included the function at the bottom of this post. All it does is return a varchar(3) value along the lines of 'ROW' or 'ENG', depending on what value was passed in so one IN parameter and one OUT.
The C# code used to call this is as follows:
OracleCommand cmd = new OracleCommand("SMD2EUP.get_lan_id", con);
cmd.CommandType = CommandType.StoredProcedure;
OracleParameter cv_Ref = new OracleParameter("cv_ref", OracleType.Number, 5);
cv_Ref.Value = item.CV.Ref;
cv_Ref.Direction = ParameterDirection.Input;
OracleParameter lan_ID = new OracleParameter("this_lan_id", OracleType.VarChar, 3);
lan_ID.Direction = ParameterDirection.Output;
cmd.Parameters.Add(cv_Ref);
cmd.Parameters.Add(lan_ID);
cmd.Connection = con;
con.Open();
cmd.ExecuteNonQuery();
string result = cmd.Parameters["this_lan_id"].Value.ToString();
The SMD2eup is the name of the package that the function is stored in and get_lan_id is the name of the function. All code compiles successfully. When I run the application I get ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'GET_LAN_ID'
What am I missing as I can't see anything wrong with the code, 1 IN paramter of type Number (or int) and 1 OUT parameter of type VARCHAR(3) (or string) with the directions being declared.
Please can some one help?
Thanks very much...
FUNCTION get_lan_id(cv_ref eup_comm_veh.xvol_region_ref%TYPE) RETURN eup_comm_veh.lan_id%TYPE
IS
this_lan_id eup_comm_veh.lan_id%TYPE;
BEGIN
SELECT lan_id
INTO this_lan_id
FROM eup_comm_veh
WHERE cvh_id IN (SELECT MIN(cvh_id)
FROM eup_comm_veh
WHERE xvol_region_ref = cv_ref);
RETURN(this_lan_id);
EXCEPTION
WHEN NO_DATA_FOUND THEN
this_lan_id := LAN_ERROR;
RETURN(this_lan_id);
WHEN OTHERS THEN
this_lan_id := LAN_ERROR;
RETURN(this_lan_id);
END get_lan_id;
|
|
|
|
|
Try changing the direction of the output parameter to Return.
|
|
|
|
|
Hello,
I am developing an application by using c# that sends SMS messages? But I don't know from where can I start? I have no expereince in doing that.
Thanks.
Dad
|
|
|
|
|
To send an SMS you need hardware or you need someone with the hardware to do it for you. I'm assuming you've not got the hardware, so you need to find someone on-line to do it for you.
They will provide an API, usually in the form of a web service that you can call to send the SMS.
(Don't expect this for free, I suspect most carriers will charge for this service).
Simon
|
|
|
|
|
Getting the hardware is pretty easy - all one needs a mobile and a way to connect it to the computer (cable, IrDA, Bluetooth). Then it's only a matter of working out how to connect to the phone and make it send an SMS.
|
|
|
|
|
|
I want to delete the last index array value?
it is possible or not?
for example
t is an PointF array. it contains 5 values
but i need only 4 values for calculation.
how to delete the last index value?
PointF[] t = {{120,200},{300,400},{500,550},{890,900},{900,900}};
i need only t[] = {{120,200},{300,400},{500,550},{890,900}}
|
|
|
|
|
You can't resize an array. Copy the needed contents from this array to a new one.
|
|
|
|
|
Just loop through the first 4 indexes...and use them for calculations..
ok..
"Programming is a fun"
|
|
|
|