|
I am looking for showing image only on specific node. That does not work in this way. It shows image for all nodes or none.
Gurpreet
|
|
|
|
|
You can set the image index on individual nodes.
Node.ImageIndex
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
You need to set the ImageIndex (and optionally, the SelectedImageIndex ) on the TreeNode you are interested in changing. If you only want to display an image on this node, you effectively have 2 choices - one is to add a dummy transparent image as the default image for the other nodes; the other is to change the ImageIndex /SelectedImageIndex for the ones you don't want.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
I am getting the following error while installing the web service on windows 2008 server:
"Error 1001. Error executing command. No mapping between account names and security id"
The installer works perfect on windows 2003 server. I have migrated my installer from visual studio 2005 to VS 2010.
Gurpreet
|
|
|
|
|
Is it possible to have few secure and few unsecure web methods within a webservice. If yes, how?
Gurpreet
|
|
|
|
|
Put the security within the webmethod call itself. I have a service that does that .. some methods are "public" others are only accessible by users in particular security groups.
So the secure web methods have an if around all the code that checks if the user is allowed to use it. The Webservice implements Integrated Windows Authentication so the user's identity is available and I have a procedure that decides whether a user is authorised or not.
|
|
|
|
|
Could you provide me some example / code snippet to do that.
Gurpreet
|
|
|
|
|
Well, not really because I don't know how you want to secure it.
In my webmethods I have eg
if (isUserAuthorised(this.User.Identity.Name))
{
} else
{
}
The isUserAuthorised method takes a string that is the user name and you can then do whatever you want to determine if they are infact allowed access. It depends on how you secure things. If you use AD groups then check whether the user is in the appropriate group (google for DirectoryEntry - there should be loads of examples out there and you'd be looking for something with objGroup.Invoke("IsMember" ...) I can't remember the exact syntax). If you have some database that says whether they're allowed in then call a stored procedure.
|
|
|
|
|
|
Redesign your data, lesson 101 of normalised data is that you only store information 1 time table 4 should have BookID, AuthorID and PubID not the information.
BTW I hope that is not the name of your table.
If you want to learn about this try and get hold of microsoft Pub demo database, it deals with this exact industry.
Also please read the guidelines for posting.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
oops i am sorry........thanks for the reply
|
|
|
|
|
This is the wrong forum.
Remove this message from here and post it in the "General database" forum - this will help you in getting a better response.
My signature "sucks" today
|
|
|
|
|
Hi ever1,
I have listBox and via coding add sth to it. I would like after I add item it select.
I eana this approach for delete and undo an item from list box.
string[] Field = new string[9];
private string SaveDataBeforDel(string Fr_Name, string Sr_Name, string St_Id, double Lb_Mark, double Ass1, double Ass2, double Fnl, double TotalMark, string Grade)
{
Field[0] = Fr_Name;
Field[1] = Sr_Name;
Field[2] = St_Id;
Field[3] = Convert.ToString(Lb_Mark);
Field[4] = Convert.ToString(Ass1);
Field[5] = Convert.ToString(Ass2);
Field[6] = Convert.ToString(Fnl);
Field[7] = Convert.ToString(TotalMark);
Field[8] = Grade;
CleabTxtBox();
return string.Empty;
}
private void LstBox_SelectedIndexChanged_1(object sender, EventArgs e)
{
if (LstBox.SelectedIndex != -1)
{
ITECH3219Student s = (ITECH3219Student)LstBox.SelectedItem;
Assigningdata_Totextbox(s.Fr_name.ToString(), s.Sr_Name.ToString(), s.St_Id.ToString(), s.Lb_Mark, s.Ass1, s.Ass2, s.Fnl, s.TotalMarkCalculation(),s.Grade.ToString());
}
}
private void Btn_Del_Click(object sender, EventArgs e)
{
Btn_Del.Enabled = false;
Btn_undo.Enabled = true;
SaveDataBeforDel(Txt_name.Text, Txt_surname.Text, Txt_Id.Text,Convert.ToDouble(Txt_lbmark.Text), Convert.ToDouble(Txt_ass1.Text), Convert.ToDouble(Txt_ass2.Text), Convert.ToDouble(Txt_final.Text),Convert.ToDouble(Txt_total.Text), Txt_grade.Text);
LstBox.Items.RemoveAt(LstBox.SelectedIndex);
}
private void Btn_undo_Click(object sender, EventArgs e)
{
Btn_Del.Enabled = true;
Btn_undo.Enabled = false;
Student_Manipulation s = new Student_Manipulation();
LstBox.Items.Add(s.AddStudent_Tolist(Field[0], Field[1], Field[2]));
Txt_lbmark.Text = Field[3];
Txt_ass1.Text = Field[4];
Txt_ass2.Text = Field[5];
Txt_final.Text = Field[6];
Txt_total.Text = Field[7];
Txt_grade.Text = Field[8];
ITECH3219Student s1 = (ITECH3219Student)LstBox.SelectedItem;
Assigningdata_Totextbox(Field[0], Field[1], Field[2], Convert.ToDouble(Field[3]), Convert.ToDouble(Field[4]), Convert.ToDouble(Field[5]), Convert.ToDouble(Field[6]), Convert.ToDouble(Field[7]), Field[8]);
Do u have any idea how can I remove an item from list box. then undo that. aftyer undo that item select.
thx in advance
|
|
|
|
|
Hello,
I am using an .exe file at my client but it gives me the error "The application failed to initialize properly(0xc0000135).Click on OK to terminate the aplication".
Earlier I used to use the same .exe file which is made in the debug folder of project for other clients but I didnt face this issue.Can you please tell what must be the problem. The OS is Windows 2000 for client and I am using Windows XP.
Pritha
|
|
|
|
|
You probably need to install the .Net Framework on that computer. I think the highest version of the .Net Framework that will work on Windows 2000 is 2.0. By the way, Google is your friend.
|
|
|
|
|
The application developer used the .Net Framework, just install the framework and Re-run the application
Remember to Reboot
HAPPY WORKING
|
|
|
|
|
Hello,
Thanks for your replies.
But I have executed .exe on the PCs which do not have .Net Framework.
Are you sure that I need to load .Net Framework
Pritha
|
|
|
|
|
|
Thanks Amaan
Thanks for cooperating
|
|
|
|
|
0xc0000135 is the error code you get when your system does not include the expected version of .NET
.NET has many versions (from 1.0 up to 4.0), they can coexist (you can have many on one system), and your EXE by default needs a very specific version; the good approach is to have all of them available on your system.
Some Windows versions have some .NET versions preinstalled; XP and Vista often include 1.1, 2.0 and 3.0;
which are present can be seen by looking in C:\Windows\Microsoft.NET\Framework; the folder names (all but one) represent installed versions.
Some more details are available here[^].
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Thanks for your answer.
Does the same hold true for different versions of Excel.
Say if I have included a certain version of Excel.
Microsoft Excel 5.0 Object Library added as a reference in my project then it should work with the client only if it has that version of Object Library
Pritha
|
|
|
|
|
Excel is native code, not managed code, so it should always run fine, even without .NET present.
Excel automation through PIA (Primary Interop Assembly) may be different, and different versions of Office may require different PIA versions, I don't know any details.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
thanks for all your clarification
|
|
|
|
|
you're welcome.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Hi All,
I am writing a .net application that calls a COM interface. I can use / call this interace through out the program, just fine. But calling the same interface fails in the class destructor. I need to call it there because the COM interface has something like "disconnect" method that i need to call before exiting my app.
The error that i get (only when calling the interface from destructor):
"Unable to cast COM object of type 'MyCOMObject' to interface type 'MyCOMInterface'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{9EA75075-57E3-4DCE-AACC-B87637142867}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))"
Anybody knows what I am missing or doing wrong?
Thanks in advance!
-Chris
|
|
|
|