Forgot your password?
Sign in with
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View Python questions
View C++ questions
View Java questions
All Message Boards...
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Design and Architecture
Internet of Things
C / C++ / MFC
ATL / WTL / STL
Objective-C and Swift
Hardware & Devices
Hosting and Servers
.NET (Core and Framework)
Site Bugs / Suggestions
Spam and Abuse Watch
The Insider Newsletter
The Daily Build Newsletter
Most Valuable Professionals
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
What is 'CodeProject'?
Ask a Question
Bugs and Suggestions
Article Help Forum
Comments by Itz.Irshad (Top 28 by date)
@Ron Beyer: Thanks for information. I think same as you people because if we are looking for to bypass UAC then UAC is purposeless. But, what if user still interested to get rid of UAC.
Well, there are many cases when user have no admin privileges but still they need to run the application. That's the reason behind this question.
I've tested, tabs characters are encoded correctly, but it is displayed on client program then empty spaces are eliminated.
Its not working. You can check it http://jsfiddle.net/irshad_mughal/5Zrqj/
Well, by doing this I've got below error: The ID 'DivBtnImgCopy' is already used by another control.
Got this error: Cannot create an object of type 'System.Boolean' from its string representation '<%=bool.Parse(ShowHideButton().ToString()) %>' for the 'Visible' property.
If your split-er character is ';' then OriginalGriff is right.
What I perceive from above description is that, you need to get values in Main Form (Form1) TextBox(s) controls on the Selection of row in a DataGridView in Sub-Form(Form2). If it is like that, then you just need to write some code in Selection_Changed event of Sub-Form(Form2) DataGridView and Assign the Selected Row Cells Value to TextBox Controls in MainForm. (If you need help in code then please mention your code, so I can figure out what is missing).
No, it's not like that. Code was running good. Debugging was also good. In this process, when I run code again to debug it shows me error. Interesting thing is that, Application.exe file also not present in Debug folder after this error. And, all the errors related resources which application shows don't make any sense because all resources are present at their proper locations.
No Problem, I've added Microsoft.VisualBasic Assembly. It works fine. Thanks
Strings ? Do I need to specify some reference here ? If yes then which one ?
I've tried to achieve the same thing via Regex in CurrentCellDirtyStateChanged Event. It check only first entered character and perform validation accordingly but, when user enters 2nd character or 3rd and so forth.... it didn't work accordingly. I need to check it for every key press in that specif DataGridViewTextBoxCell.
But, when we click a menu item and its dropdown is displayed. Backcolor of that dropdown is not same as control color in properties. What is this all about ?
@Aarti: Here, by declaring page level paint argument variable didn't work for me. In fact, it close the whole application.
In case of fast movement of mouse, OnPaint Event didn't perform so well.
Your're right. But, when we do mouseover the menu item its color changed from default to light yellow or mic of (Yellow and Some other color) in default behavior of menu tool strip. So, How I can update my run-time drawn rectangle color to that color on leaving mouse from menu item ?
Your answer is much accurate. But, I've something more to do. Actually, On sub-menu Item I have created a rectangle with x as a representation of close button. So, I've changed that rectangle back color to blue (highlight) on mouseover. Now, I need to change that color to default(previous). How can I do this? Code is attached below:
protected override void OnPaint(PaintEventArgs e)
Rectangle r = new Rectangle(this.Bounds.Width - 20, 2, 16, 17);
// If click on Del(Close Icon)
brush = new SolidBrush(Color.LightBlue);
brush.Color = Color.Blue;
e.Graphics.DrawRectangle(new Pen(brush, 1), r);
// If didn't click on Del(Close Icone)
brush = new SolidBrush(Color.FromKnownColor(KnownColor.Transparent));
brush.Color = Color.FromKnownColor(KnownColor.Transparent);
e.Graphics.DrawRectangle(new Pen(brush, 1), r);
//Code for Drawing Cross Lines
brush = new SolidBrush(Color.Gray);
Rectangle rCross = new Rectangle(this.Bounds.Width - 15, 8, 6, 6);
e.Graphics.DrawLine(new Pen(brush, 2), new Point(rCross.Right, rCross.Top), new Point(rCross.Left, rCross.Bottom));
e.Graphics.DrawLine(new Pen(brush, 2), new Point(rCross.Left, rCross.Top), new Point(rCross.Right, rCross.Bottom));
DataGridViewRow dgvRow = new DataGridViewRow();
dgvRow.Cells.Value = objBook.ID;
dgvRow.Cells.Value = objBook.Title;
dgvRow.Cells.Value = objBook.Author;
dgvRow.Cells.Value = objBook.Genre;
dgvRow.Cells.Value = objBook.Price;
dgvRow.Cells.Value = objBook.PublishDate;
dgvRow.Cells.Value = objBook.Description;
int totalrows = myMainApplication.dgvBooksDetails.Rows.Count;
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Got This Error:
Well, thanks Kulkarni.
But, you got my question in opposite direction. Here, I need to get value from datagridview cell to datetimepicker control. The datagridview is in main form of application and datetimepicker is at sub form in application. If any idea you've in this regard then please share it with me.
Dear Aday and Sandeep,
Thanks for consideration. Well, I got solve this. Its an issue on selection changed event. Here is elaboration:
I have a Data Grid View in WinForm Application.
Now, I want to get selected row's specific column values (e.g. row 2 and column 3) in a text box on that form.
I hope you'll got what I mean to say.
Well, I've a menu which provides three option (All, Option-1, Option-2).
And I've three main nodes in tree with their child nodes. Main Node are same as menu options (All, Option-1, Option-2).
So, I wanted to select a menu and change the selection of node in tree view.
I hope you got what I need to do.
Its done :)
What about the min size of child panels. How we can set min width/height so that controls placed in that panel will be visible to user ?
Any idea ?
Dear Mehdi Gholam,
Thanks for information. I'm trying to use it but still unable to change the size of panel at runtime. I mean, is there any property to set for allow the user to be able to drag splitter and change the size of panels.
Thanks in advance.
Let's make it simple.
I'm going to deploy new version of an application. In essence, it's totally new project but identical to previous application with some new features.
So, My user save his/her preferences in previous application and I store them in user.config file in Local Setings of that user. (As VS do usually)
Now, I'm try to retrieve those settings in my new application. This is to facilitate the user to not mention the preferences again. His/Her previous preferences will be retain in new version.
Note: Application exe have same name as previous application exe.
Now, please guide me how to do that.
Both applications are running on Win XP. Is there possibility to get that issue ?
Dear Dave Kreskowiak,
I think so but, didn't able to figure out that. Any suggestion to figure out that ?
Will it cover those users who belongs to administrator group ?
Kindly update me.
So, the summary is that message box cannot be customized to use hyper link? Anyway, Thanks for your time.
The alternate option is good for communicating information via custom message box ,but 'look and feel' of default message box is dependent of OS on which application is running. That's why I'm looking for this to use. In case of custom message box, I've to design separate message box(s) for application running of Win XP and Win 7 (for example).
Thanks for time.
Last Updated 1 Jan 1900
All Rights Reserved.