|
If the comboBox is populated from a dataSource, why would the user's selection not exist in the dataSource? Or did you mean something else and just explain it poorly?
And to prevent user typing into the comboBox, again, if thats what you mean as its hard to understand your english, change its DropDownStyle to that of DropDownList.
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|
|
hi friends.. i have a text box.. in one form.. and i dont want user to do copy the contents from some other place and paste it at text box..how to do this? please help me
|
|
|
|
|
Hello,
actually i dont think its the best.
at the texbox's Properties change the "ShortcutsEnabled" to "False"
or at runtime
<br />
txtTrial.ShortcutsEnabled = false;<br />
this will prevent the user from copying or pasting
|
|
|
|
|
hi
how i can transfer files between PC to PPC ?
thanks
|
|
|
|
|
You're in the wrong forum. Try asking this in a Mac forum.
|
|
|
|
|
use - a floppy disk, or
- a network, or
- a thumb drive, or
- a removeable hard drive, or
- print the file out and retype it into the other computer, or
- a tape drive, or
- get a geek to do it, or
- email the file to yourself as an attachment, or
- some other option, or
- what are you really asking for?
Silence is the voice of complicity.
Strange women lying in ponds distributing swords is no basis for a system of government. -- monty python
Might I suggest that the universe was always the size of the cosmos. It is just that at one point the cosmos was the size of a marble. -- Colin Angus Mackay
|
|
|
|
|
Hi all!!!
I have used a cell validated event on Datagrid combobox column and want to remove the row from the datagridview if it is not the appropriate one selected..... I use Datadrigview.Rows.RemoveAt method but its not working...... Can anybuddy help??????
Regards
Sam Chughtai
|
|
|
|
|
i think that event will call only when you close that form, put a breakpoint on your code and check when it called.
and you should put your code in CellEndEdit or CellParsing event
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
I'm connecting to an external program to register for some updates to some values. The external program periodically returns updates to a method in my class. I submit a reference id when registering for all the different updates, and the external program returns the reference id I submitted and the relevant update. My problem is this. . .
When I get the update (with the reference id as a string also returned to me), if I search a hastable that has the reference id as a KEY, can I directly set the relevant variable by putting it in as the VALUE part of the Hashtable? Which other way could I do this, because if I have to hard code multiple Switch statements to implement it, I'll have lots of duplicate coding etc.
Here are some code snippets of what I'd like to implement:
Int Price = 0;
. . . .. . . . . . .. .
Hashtable TopicsForRegistering = new Hashtable();
TopicsForRegistering["PRICE"] = Product.Price;
. . . . . ... . . . .
[I have to implement this interface here. . ]
ExtProg.RegisterForUpdates("PRICE", , ,, , ,,, ,)
. . . . . . .. . . . .
[I have to implement this interface here also. .I collect an array with two columns and one row]
System.Array Updates = ExtProg.CollectUpdates();
int ReferenceID = Convert.ToInt32(Updates.GetValue(0,0);
int UpdateValue= Convert.ToInt32(Updates.GetValue(1,0);
TopicsForRegistering [ReferenceID] = UpdateValue;
[At this point, I'd like the value of the original Product.Price to have changed, not just the value in the Hashtable. . . . ]
I'd appreciate any help at all on this.
Best regards,
Tom.
|
|
|
|
|
My tree view generation is happening inside InitilizeComponent() it's System.Windows.Forms.TreeNode is local to InitilizeComponent()
I want to make it's TreeNode private member variable of the same class.
I did it is working fine but after any modification in GUI it is changing
automatically.
How to stop that??
Truth Is The Simplest !!!!
|
|
|
|
|
Don't alter anything inside the InitializeComponent section as it's likely to get changed. Make any alterations outside of that method (in the constructor after the InializeComponent(); if you like).
Dave
|
|
|
|
|
InitializeComponent() is clearly marked as being generated code that should not be modified. You should slap yourself for doing such a move.
In your main code, you need to create your tree separately following the call to InitializeComponent(). I typically write a method for my own initialization and call it Initialize{something} --> in your case InitializeTreeview(); Then write that as part of your forms mainline code. Stay out of the designer. Don't ever touch it again. Or some midgit will be sent from the Programmer Police and he will slap your kneecaps silly.
|
|
|
|
|
1. I have the following tables in the sql server
(a) tblforms - This table contains all the form names of the project
(b) tbluserdetails - This table contains the user information
(c) userforminfo - this table contains the information about which form pertains to which user.
2. I have a web form named form management , there in the form , i have the dropdownlist and a gridview.
in the gridview , i have two columns (formname , checkbox)
Dropdownlist populates all the user names , and the currently selected user name in the dropdownlist selects the form name in the checkbox of gridview .
Now my question is , how should i select the form name for the particular user and leave the rest unselected in the checkbox.
According to my understanding , i should first populate all the formnames and then for the currently selected user in the dropdownlist , i should extract all the formnames for that user.Now for each form name(extracted for the user) i should loop for 25 forms (because i have 25 forms i the gridview).
Am I proceeding in the right direction ?
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
Hello friends,
I am developing C#,NET windows application here i have a label now what i want that user can decrease or increase font size according to its requirement by selecting size from combo box.
Thanks
|
|
|
|
|
What you want is to have a Font object assigned to myLabel.Font
Have an event that fires when the selection in the comboBox is changed, get the value of the comboBox item that was selected and use it to see how big your font should be.
e.g.
Font myfont = new Font("Verdana", 12, FontStyle.Regular);
Will create a font of size 12. Just adjust that value to your requirements.
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|
|
And dont forget to dispose the old font if you use that approach.
|
|
|
|
|
Hello,
here is another ,its much easier but its only when you are using (RichTextBox).
add your items to the ComboBox (1,2,3,4,5)
it actually means 1x,2x,3x,4x,5x.
Code:
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
richTextBox1.ZoomFactor = float.Parse(comboBox1.Text);
}
try it
Regards Hamza
|
|
|
|
|
Hi all,
I am using .Net framework 1.1 and i want to download files from FTP using C#. Anybody can please tell how to do this?
Pravin
|
|
|
|
|
|
Amazingly, Google provided a result...
"The hand icon was added to mimic the standard Win32 constants allowed by the API. However the hand icon in Windows is from the Win3.x days and maps to the stop sign in all current versions of Windows."
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|
|
This adds 10 points for recursive re-use-ability, Win3.x to Win Vista!
Do rate the reply, if it helps or even if it doesnot, because it helps the members to know, what solved the issue. Thanks.
|
|
|
|
|
hi
Can you plz tell me how can i use visual web developer and develop a website in c# or vb.net?Any reference on this topic.
plz reply at delhi_egle@yahoo.co.in
thanks in advance
|
|
|
|
|
how can i hide the maximize and minimize box of mdi child form...but i want to show the X (close button) of a mdi child form....and another problem is....
how can i use the Window toolstrip menu item in C# to show the selected (opened)form choosed by user....hope u got the problem...plzzzz someone help
|
|
|
|
|
Use these properties
MaximizeBox
MinimizeBox
ActiveMdiChild
Eslam Afifi
|
|
|
|
|
And DON'T double post, be patient and wait for someone to answer.
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|