15,891,248 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by vasanthkumarmk (Top 142 by date)
vasanthkumarmk
4-Aug-21 11:00am
View
Deleted
Kindly provide code model it would help me.
vasanthkumarmk
4-Aug-21 10:59am
View
When I deseralize using List of keyvalue pair, the second json array looks correct order [0] => key = Name; Value=Vasanthakumar etc....
But the first json array looks [0] => [0][1] => key = key; Value = Name;
key = value; value = Vasanthakumar etc...
vasanthkumarmk
18-Mar-21 9:19am
View
Thanks!!! Instead of redirecting to previous page, I need to get entire url for previous page.
vasanthkumarmk
26-Aug-20 6:10am
View
Great!!!! Thanks for your help!!!
vasanthkumarmk
26-Aug-20 4:52am
View
Thanks for reply... This value passing from InstallShield UI to C# Code. Default it returns these null values. IS its expected mentioned in forum.
vasanthkumarmk
31-May-20 8:34am
View
Sure... Thank you so much.... Happy for your response....
vasanthkumarmk
30-May-20 9:22am
View
Thanks.....Edited and improved question
vasanthkumarmk
28-May-20 1:33am
View
USE master
GO
SELECT SUSER_NAME() AS LogInName,
USER_NAME () AS UserName
GO
EXECUTE AS LOGIN = 'SERVER\User2'
GO
CREATE DATABASE ImpersonateDB
GO
SELECT SUSER_NAME() AS LogInName,
USER_NAME () AS UserName
Error = Could not obtain information about Windows NT group/user 'SERVER\User2', error code 0x5.
vasanthkumarmk
28-May-20 1:29am
View
Thank you so much for your suggestion.
But as per my requirement I could not able to create database in current user login. Only other Active directory login only I should create database.
So changing ownership is not possible. Can you pleaseee help me using EXECUTE AS to create database for others login.
It is connected in central database only.
Once again thank you so much your reply. I have been trying on the way you suggesting.
Please keep on help... Thanks!!!!!
vasanthkumarmk
27-May-20 10:14am
View
Sorry for confusion. Below I explain what customer expecting:-
Subject: Create (Windows Authentication) database using others Active directory login.
Explanation: Imagine employees using multiple systems in a office, those have single DB Administrator, DB Admin have only rights to install database for all employees in the office. So DB Admin has already added particular permissions for all employees machines (Security -> Logins -> Server/DBadmin) (also added Server Roles permission as sysadmin).
Then DB Admin has given one particular windows active directory user id (Server/DBadmin) and password (******) for all employees to install database. Employees using one c# windows application providing the DB Admin user name, password, Servername, database name then it will create (Windows Authentication) database. So once created database, then database should be TESTING9 -> Security -> Users -> dbo -> Login name -> should be '[Server/DBadmin]'
---- This is my expectation------
I am trying impersonate user before create database using SQL Query. But unable to achieve.
vasanthkumarmk
27-May-20 2:27am
View
USE master
GO
\\SERVER\Login1 is my windows default login account
GRANT IMPERSONATE ON LOGIN:: [SERVER\Login1] TO [SERVER\Login2]
GO
CREATE DATABASE TESTING9
GO
I would like to expect create database TESTING9 for using login account [SERVER\Login2]. So TESTING9 -> Security -> Users -> dbo -> Login name -> should be '[SERVER\Login2]'
vasanthkumarmk
25-May-20 1:45am
View
Thanks... I am looking to create DB using query. We can do create database use run as different user in SSMS.
vasanthkumarmk
25-May-20 1:44am
View
Thanks but no luck.
vasanthkumarmk
21-May-20 12:59pm
View
I need to do from query. If I logout my user (User1) and login to another user (User2) I can able to create database and DB right also corresponding user.
But my case connected windows authentication in User1, but need to create database for User2.
vasanthkumarmk
6-Nov-19 6:21am
View
Thanks!!!!
vasanthkumarmk
6-Nov-19 4:17am
View
If so shall I convert XML data to binaries and store it in Regx file? Will it good idea? Your suggestions please.
vasanthkumarmk
6-Nov-19 3:49am
View
Thanks for your answer, but instead of storing local folder I would need to store common place like Registry.
vasanthkumarmk
26-Feb-19 14:19pm
View
This one very helpful.
vasanthkumarmk
26-Feb-19 13:47pm
View
Say for example, using this registry path, ("\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v3.5") I have verified dotnet framework 3.5 has installed in current machine. Same like that I need to know user installed SQL 2014 or not.
vasanthkumarmk
26-Feb-19 13:44pm
View
But in my case, I would like to know exactly user has installed SQL, very particularly 2014.
vasanthkumarmk
26-Feb-19 13:35pm
View
Thanks for reply, I am checking this from InstallShield code. Which means on the time of installing the setup I am doing such kind of validations. so we have only one option to check the exact registry path.
vasanthkumarmk
26-Jul-17 8:35am
View
I need both help and Maximize Button....
vasanthkumarmk
26-Jul-17 8:34am
View
Thanks for your comments.... Is any other way to achieve it???
vasanthkumarmk
10-Jul-17 1:00am
View
Really thanks for your explanation.....
vasanthkumarmk
8-Jul-17 13:38pm
View
Thanks Alan N & Michael_Davies both answers helps lot.....
vasanthkumarmk
8-Jul-17 13:35pm
View
Thanks a lot!!!!! Its really helpfull and resolved my problem. Once again thanks!!! But one final question....
What is the use of Line -> deviceSupportedColors.TryGetValue(c.Name, out keyvalue);
vasanthkumarmk
8-Jul-17 13:26pm
View
Deleted
Ohhhh God its out right?
vasanthkumarmk
8-Jul-17 13:20pm
View
Deleted
Passing KeyValue
vasanthkumarmk
8-Jul-17 13:20pm
View
Deleted
I have modification looks below
int indextoInsert = Convert.ToInt32((from d in deviceSupportedColors
where d.Value == c.Name
select d.Key).FirstOrDefault());
//comboBox_BorderColor.Items.Insert(indextoInsert, c.Name);
//this.comboBox_BorderColor.Items.Add(c.Name);
string keyvalue = indextoInsert.ToString();
deviceSupportedColors.TryGetValue(c.Name, out keyvalue);
deviceSortedColors.Add(keyvalue, c.Name);
}
}
var list = deviceSortedColors.Keys.ToList();
list.Sort();
// Loop through keys.
foreach (var key in list)
{
comboBox_BorderColor.Items.Add(deviceSortedColors[key]);
}
vasanthkumarmk
8-Jul-17 13:11pm
View
Sorry for interact more with you. You code is working perfect if out keyvalue is not null, but I am getting null for keyvalue
vasanthkumarmk
8-Jul-17 10:49am
View
Can you pleaseee give small code snap for your recommended.
vasanthkumarmk
8-Jul-17 10:24am
View
I have improved my question, could you please recheck and let me know the answer? Its more helpful
vasanthkumarmk
8-Jul-17 10:11am
View
I need to display in the order of 'OrangeRed', 'Orange', 'Yellow' (mentioned in the List comment line).
vasanthkumarmk
8-Jul-17 10:10am
View
Deleted
private void FillComboBoxBorderColor(MoeValueMCInfo mcInfo)
{
comboBox_BorderColor.Items.Clear();
float mcVersion = 0;
if (float.TryParse(mcInfo.Version.StringValue, out mcVersion))
{
if (mcInfo.Level.ToString() == "Enterprise" && mcVersion >= 4.0)
{
Dictionary<string, string> deviceSupportedColors = new Dictionary<string, string>();
deviceSupportedColors.Add("0", "OrangeRed");
deviceSupportedColors.Add("1", "Orange");
deviceSupportedColors.Add("2", "Yellow");
//List<string> deviceSupportedColors = new List<string> { "OrangeRed", "Orange", "Yellow", "LawnGreen", "MediumSpringGreen", "Aqua", "CadetBlue", "SlateBlue", "Violet", "Magenta", "MediumVioletRed", "Gray"};
ArrayList ColorList = new ArrayList();
Type colorType = typeof(System.Drawing.Color);
PropertyInfo[] propInfoList = colorType.GetProperties(BindingFlags.Static |
BindingFlags.DeclaredOnly | BindingFlags.Public);
foreach (PropertyInfo c in propInfoList)
{
if (deviceSupportedColors.ContainsValue(c.Name))
{
/*int indextoInsert = Convert.ToInt32((from d in deviceSupportedColors
where d.Value == c.Name
select d.Key).FirstOrDefault()); */
//comboBox_BorderColor.Items.Insert(indextoInsert, c.Name);
this.comboBox_BorderColor.Items.Add(c.Name);
}
}
}
}
}
vasanthkumarmk
8-Jul-17 10:03am
View
In my case I never clear my ComboBox, need to keep the same items in the ComboBox and need to changing the position of the items.
vasanthkumarmk
26-May-16 1:52am
View
Ok thanks, But in terms of localization how to achieve this?
vasanthkumarmk
22-Dec-15 5:41am
View
I have used this.gridExporter.Export() method. But I am getting the exception like object reference not set instance of the object.
vasanthkumarmk
22-Dec-15 5:40am
View
Actually this grid is used for Infragistics, so I need to took the values and export to CSV File.
vasanthkumarmk
22-Dec-15 5:34am
View
I just want to Export Ultragrid values to CSV Format
vasanthkumarmk
7-Dec-14 12:47pm
View
Still I am in confusion, but I don't know how to explain my confusions?
vasanthkumarmk
7-Dec-14 5:58am
View
Thanks.... I will implement this code and let you know.
vasanthkumarmk
7-Dec-14 3:23am
View
Sorry mistakenly I mentioned here as 'device' instead of 'book'..... Sorry....
vasanthkumarmk
6-Dec-14 8:32am
View
Thanks...
vasanthkumarmk
6-Dec-14 8:31am
View
Deleted
reseveby.Distinct().OrderBy(x => x).ToList();
Can I use above code for remove duplicate values....
vasanthkumarmk
6-Dec-14 8:22am
View
Good one..... How to remove duplicate 'reservedBy' values, before return.
vasanthkumarmk
6-Dec-14 8:21am
View
And also one question, I want to remove duplicate values in the list before return.
vasanthkumarmk
6-Dec-14 8:14am
View
Excellent!!!!!! Answer..... I got the issue in the string[]. When I decide to ask question in this page I had saw your post. Now using the List<string> my issue got resolved. Thanks a lot......... Thanks..... Thanks....
vasanthkumarmk
6-Dec-14 6:59am
View
Ya... I missed that. Thank you so much Marcin Kozub......
vasanthkumarmk
13-Nov-14 15:42pm
View
Thanks....
vasanthkumarmk
13-Nov-14 15:41pm
View
Yeah, I want to deliver my source code to client. I have developed my source in VS2013 but my client asks VS2008.
vasanthkumarmk
13-Nov-14 15:39pm
View
Ya!!! Thanks I got it!!! But now I just want to change the entire project from VS2013 to VS2008. Is it possible? I want to open the solution in VS2008.
vasanthkumarmk
13-Nov-14 15:01pm
View
Can you please tell me how can I go and configure 2.0 from the VS 2013
vasanthkumarmk
13-Nov-14 14:54pm
View
But in that is not mentioned about namespace refactoring.
vasanthkumarmk
13-Nov-14 14:52pm
View
Sure...
vasanthkumarmk
13-Nov-14 14:42pm
View
Sorry for that, For some security purpose i could not post entire code here....
I just want to change my namespace name Ex: namespace MY.Pro.Tools.Sign.UI -> But i want to change it to my.Pro.Tools.Sign.UI....
vasanthkumarmk
13-Nov-14 14:34pm
View
I have existing with some other name. Just i want to rename that one.
vasanthkumarmk
17-Sep-14 7:53am
View
Thank you so much..... Its working fine what i am expected..... Thanks a lot....
vasanthkumarmk
17-Sep-14 7:13am
View
Still I haven't get answer.
vasanthkumarmk
16-Sep-14 15:41pm
View
I have the combination of array, not only date. I have string, int, date in my array
Ex : A[] = {Yes, No, 15 Sep 14 15:34, Unverified}
vasanthkumarmk
16-Sep-14 15:09pm
View
The actual scenario is i am using to compare the to CSV Format files. One file is constant file has contains the date format with time. Another file i have the only date in the same column. So i will get both details in the array[] then i will compare these data.
So i just want to compare with time and without time is important in my scenario. I hope you understanding is clear now.
vasanthkumarmk
16-Sep-14 11:36am
View
Thank you so much george
vasanthkumarmk
16-Sep-14 6:25am
View
yes really.
vasanthkumarmk
27-Nov-12 5:57am
View
Hi Martijn,
vasanthkumarmk
14-Nov-12 11:15am
View
Hi Martijn,
Please send overall coding......
Thanks & Regards
Vasanthakumar
vasanthakumarmk@gmail.com
vasanthkumarmk
12-Nov-12 21:53pm
View
Hi Martijin,
You have done a great work.
I applied above code and get back you, before applied this code i need to clear one more thing.
When i start my playlist, after some times if i stop the playlist it takes some times to stop and getting message box like "Playlist Stopped", How can i stop very quickly without any time longer. I added the coding below for your reference:
private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
try
{
//progressBar1.Value = 0;
if (e.Cancelled)
{
//this.listView_playlist.Items[this.listView_playlist.SelectedIndices[0]].Selected = false;
MessageBox.Show("Playlist Stopped","InSTa Title");
}
else
{
btn_PLpause_Click(sender, e);
btn_PLplay_Click(sender, e);
listView_playlist.Items[0].Selected = false;
}
}
catch { }
}
Thanks a lot Martijin......... Again and again
Regards
Vasanth
vasanthkumarmk
12-Nov-12 21:49pm
View
Deleted
Hi Martijn,
When i start my playlist, after some times if i stop the playlist it takes some times to stop and getting message box like "Playlist Stopped", How can i stop very quickly without any time longer. I added the coding below for your reference:
private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
try
{
//progressBar1.Value = 0;
if (e.Cancelled)
{
//this.listView_playlist.Items[this.listView_playlist.SelectedIndices[0]].Selected = false;
MessageBox.Show("Playlist Stopped","InSTa Title");
}
else
{
btn_PLpause_Click(sender, e);
btn_PLplay_Click(sender, e);
listView_playlist.Items[0].Selected = false;
}
}
catch { }
}
vasanthkumarmk
12-Nov-12 21:11pm
View
Hi Martijin,
Its a great Work......
I try it and will get back you.....
Thanks a lot again.....
Regards
Vasanth
vasanthkumarmk
12-Nov-12 21:08pm
View
ok Martijin
vasanthkumarmk
6-Nov-12 11:38am
View
Hi Martijn,
I hope you remember me.
After long days back i came in front of you.
I hope you remember my project.
I have 2 Issues i need your help to resolve those issues. Below i mentioned the issues.
Issue 1: (Pause & Play)
What coding you send that only i use in my project (Playlist). Thats working very well. But i need to implement the pause and play, When i start to play from the listview after click the pause button it will pause the current file from the listview and the same time while click the play it will start the next file then play.
Issue 2 : (Time for next file)
Here i mentioned your coding for play time next file one by one using Thread.Sleep() method.
But i need to give my values of particular second from the text box value Thread.Sleep(txtbox.sleep); But here time not takes properly
for (int i = 0, j = 0; i < listView1.Items.Count && j < listView1.Items.Count; j++)
{
if (!isCurrentSet)
{
j = currentSelected;
isCurrentSet = true; // Make sure j is only changed in the first call.
}
backgroundWorker1.ReportProgress(i * 100 / count, j);
Thread.Sleep(2000); //Here
if (backgroundWorker1.CancellationPending)
{
e.Cancel = true;
break;
}
sum += i;
backgroundWorker1.ReportProgress(i * 100 / count);
Thread.Sleep(2000);
}
I try it long times but not works properly Please give me the solution. I very eager to expecting your solution. You are only my hope.
Thanks & Regards
Vasanth
vasanthkumarmk
22-Sep-12 5:03am
View
Sorry it shows the error!!!
vasanthkumarmk
22-Sep-12 4:44am
View
Value is not getting from the first form.
vasanthkumarmk
20-Sep-12 1:49am
View
gud, How can I store CSV file and retrieve from CSV file.
vasanthkumarmk
19-Sep-12 1:56am
View
How can use this coding for without have microsoft office in my system.
vasanthkumarmk
18-Sep-12 7:58am
View
Thank you sir
vasanthkumarmk
17-Sep-12 5:23am
View
I am using Windows Application with C# Code.
I have ListView item contains some of the files. The listview files will store the Excel Sheet using below code.
Collapse | Copy Code
private void btn_PLLoad_Click_2(object sender, EventArgs e)
{
StringBuilder sb = new StringBuilder();
Microsoft.Office.Interop.Excel.Application xla = new Microsoft.Office.Interop.Excel.Application();
xla.Visible = true;
Microsoft.Office.Interop.Excel.Workbook wb = xla.Workbooks.Add(Microsoft.Office.Interop.Excel.XlSheetType.xlWorksheet);
Microsoft.Office.Interop.Excel.Worksheet ws = (Microsoft.Office.Interop.Excel.Worksheet)xla.ActiveSheet;
int i = 1;
int j = 1;
foreach (ListViewItem comp in listView_playlist.Items)
{
ws.Cells[i, j] = comp.Text.ToString();
//MessageBox.Show(comp.Text.ToString());
foreach (ListViewItem.ListViewSubItem drv in comp.SubItems)
{
ws.Cells[i, j] = drv.Text.ToString();
j++;
}
j = 1;
i++;
}
}
It will directly stores the listview datas to Excel sheet.
Then I Close my Application. When the click the button using open file dialogue to open that Excel Sheet (Which listview item data saved Excel Sheet). I need to retrieve again saved Excel Sheet datas to my listview.
I Posted the Question in public.
Regards
Vasanthakumar
vasanthkumarmk
17-Sep-12 4:57am
View
I am using winforms with C# language.
vasanthkumarmk
17-Sep-12 3:11am
View
WinForm
vasanthkumarmk
17-Sep-12 2:35am
View
k i wil check it
vasanthkumarmk
17-Sep-12 2:17am
View
I need the data will stores from EXCEL to LISTVIEW without any backend intraction
vasanthkumarmk
17-Sep-12 2:13am
View
ok
vasanthkumarmk
14-Sep-12 13:50pm
View
Please give reply for my questions in question page. My Question topic is :listview items save one folder
vasanthkumarmk
14-Sep-12 4:37am
View
I am using windows Application with C# language.
vasanthkumarmk
11-Sep-12 7:36am
View
ok sir thankyou
vasanthkumarmk
11-Sep-12 6:21am
View
No sir, I am Using WinForms only.
vasanthkumarmk
11-Sep-12 5:13am
View
Sir,
I have small issue. Play & Pause is working well. But some minor issues is there. While play the list, the file name appears with blue back colour identification. When I Click the Pause button it will stops the current item (without background blue colour identification) shows some Gray back colour. Then again start to click the Play button Next item only shows the blue back colour. Currently Pause items not starts with blue back colour. It shows only Gray Colour Identification.
This is my Pause button Coding :
private void btn_PLpause1_Click(object sender, EventArgs e)
{
backgroundWorker1.CancelAsync();
}
I hope this is a small issue. Where I can change the code here.
vasanthkumarmk
11-Sep-12 1:38am
View
Thank you so much sir, Your code is working good. Thank for you spending your valuable time for me. Sorry for disturbance, If any more doubts I will ask you, Please resolve my doubts. Because you only understand my task very clearly.
Thanks a lot........
Regards,
Vasanth
vasanthkumarmk
11-Sep-12 1:36am
View
Thank so much sir, your code is working good. Sorry for your disturbance. Once again I thank to you spending your valuable time for me. If any more doubts I will ask you sir. Don't Mistake me. Because you know very well clear about my task.
Regards
Vasanth
vasanthkumarmk
11-Sep-12 0:51am
View
Dear sir,
Thank you very much for your reply. I am trying that code and I get you sir.
Thanks again
vasanthkumarmk
10-Sep-12 8:00am
View
Dear sir,
This is my Final Question. I need to keep the pause and play button in this task. Pause -> Listview items stops the Which current items selected. Play -> Listview items starts play from which items stops (not from first items). I tried that it will pause the selected item. But when i click the play it will from top most first item. It won't play from the next of the pause item. Please give this final solution.
vasanthkumarmk
23-Aug-12 5:14am
View
Ok, thank you very much for help me to finishing my task. Thanks a lot.
vasanthkumarmk
23-Aug-12 2:18am
View
Sure!!! I have Clear what doubt in your mind.
1. Store time in the Listview:
I have entered time in the txtbox_timertime (Textbox) using below code. Just i click the first item from list view, enter the time in the textbox , then click the second item from listview, enter the time in th text box,
Code :
if (listView_playlist.SelectedItems.Count > 0)
{
listView_playlist.SelectedItems[0].Tag = txtbox_timertime.Text;
txtbox_timertime.Text = "";
txtbox_timertime.Text = listView_playlist.SelectedItems[0].Tag.ToString();
string a = listView_playlist.SelectedItems[0].Tag.ToString();
listView_playlist.SelectedItems[0].SubItems.Add(a);
MessageBox.Show("File Name of " + listView_playlist.SelectedItems[0].Text + " set " + a.ToString() + " Seconds");
// MessageBox.Show(listView_playlist.SelectedItems[0].Tag.ToString());
// textBox2.Text = listView_playlist.SelectedItems[0].Tag.ToString();
}
else
{
MessageBox.Show("Please Select Item and set the value", "InSTa Title");
}
2.File name getting:
Just I get my file name and path to store two temporary text boxes (txtpath.Text, txtfilename.Text),
Code as belows:
if (openFileConfig.ShowDialog(this) == DialogResult.OK)
{
try
{
//Adding files to playlist
var fileNamenoextension = System.IO.Path.GetFileNameWithoutExtension(openFileConfig.FileName);
txtpath.Text = openFileConfig.FileName;
txtfilename.Text = fileNamenoextension;
if (listView_playlist.Items.Count >= 0)
{
//listview.Items.Add(System.IO.Path.GetFileNameWithoutExtension(openfile.FileName),openfile.FileName);
listView_playlist.Items.Add(txtfilename.Text).SubItems.Add(txtpath.Text);
}
}
catch (Exception) { }
I hope now you little bit clear, otherwise i am ready to come teamviewer.
One small suggestion please give some personal id for our both communication, This out public post queries is not good. If your wish.
Regards
Vasanth
vasanthkumarmk
22-Aug-12 13:46pm
View
Thanks for you asking this.... Lets i explain my aim of the task:
I have below items in my project,
1. Listview
2. Buttons - 4 [Add,Play,Pause,Settime]
3. Textbox -1 [Enter the Time for play (in seconds)]
While i click the Add button, The open dialog will opened i have to choose files and added in the List view item (For Example 10 Files), First i have to Click top most First item (Index 0) From the List View. Then enter the Time in the textbox then Click settime Button.
It will shows the Listview second column near the appropriate File name. Like that i have done all 10 items.
Then i click the Play button, The item selection (with blue backcolor) select the First
item then based on the our Entered Timing (Seconds) selection will moves one by one upto
the last time, then i will loop again start from first item.
When i Click the Pause Button Selected item will pause.
What I have done sofar this task:
Textbox:
Time for play ---> Enter the timing for every playlist item was finished.
Add --> Adding the files part everything is was finished.
Play--> While i click the play using background worker it will plays one by one
But My problem is:
1. Timing not set properly
2. I need to select Particular file from listview (Ex:Index=8) then click the
Play button, File will play from selected file (It is not possible). Itwill select first file and our selected file (Index=8) both are playing at same time.
Pause -> When i click the pause entire playlist will stop, But pause the play is not works
I hope now you cleared my idea. If you want to post this one as New Question i am ready to post. But i sure others not understand this c Except you. You only understand this because i am using your code
and the same time you know my task details from beginning to so far.
Regards,
Vasanth
vasanthkumarmk
22-Aug-12 5:41am
View
ok i can check this.
vasanthkumarmk
22-Aug-12 5:10am
View
Dear Sir,
I need to set Seconds for play items one by one from the list view. so I have set time using single text box. Code as below for set timing for selected list view items.
listView_playlist.SelectedItems[0].Tag = txtbox_timertime.Text;
txtbox_timertime.Text = "";
txtbox_timertime.Text =
listView_playlist.SelectedItems[0].Tag.ToString();
string a = listView_playlist.SelectedItems[0].Tag.ToString();
listView_playlist.SelectedItems[0].SubItems.Add(a);
MessageBox.Show("File Name of " + listView_playlist.Selected
i am getting timing from text box (named as txtbox_timertime.Text) and i make some alteration of what you code gave me. Just instead sleep i am using the textbox time. As below shows for your code include my alteration:
try
{
int count = (int)e.Argument;
int sum = 0;
for (int i = 0, j = 0; i < listView_playlist.Items.Count && j < listView_playlist.Items.Count; j++)
{
backgroundWorker1.ReportProgress(i * 100 / count, j);
int time = Convert.ToInt32(txtbox_timertime.Text);
Thread.Sleep(time * 1000);
if (backgroundWorker1.CancellationPending)
{
e.Cancel = true;
break;
}
sum += i;
backgroundWorker1.ReportProgress(i * 100 / count);
Thread.Sleep(time * 1000);
}
e.Result = sum;
}
catch { }
What my problem is the Seconds not works proper timing. If we give 25 Seconds it will works for 2 seconds only.
So What changes i have do for recertify this solution
Awaiting your reply.
Regards
Vasanth
vasanthkumarmk
22-Aug-12 5:09am
View
Dear Sir,
I need to set Seconds for play items one by one from the list view. so I have set time using single text box. Code as below for set timing for selected list view items.
listView_playlist.SelectedItems[0].Tag = txtbox_timertime.Text;
txtbox_timertime.Text = "";
txtbox_timertime.Text =
listView_playlist.SelectedItems[0].Tag.ToString();
string a = listView_playlist.SelectedItems[0].Tag.ToString();
listView_playlist.SelectedItems[0].SubItems.Add(a);
MessageBox.Show("File Name of " + listView_playlist.Selected
i am getting timing from text box (named as txtbox_timertime.Text) and i make some alteration of what you code gave me. Just instead sleep i am using the textbox time. As below shows for your code include my alteration:
try
{
int count = (int)e.Argument;
int sum = 0;
for (int i = 0, j = 0; i < listView_playlist.Items.Count && j < listView_playlist.Items.Count; j++)
{
backgroundWorker1.ReportProgress(i * 100 / count, j);
int time = Convert.ToInt32(txtbox_timertime.Text);
Thread.Sleep(time * 1000);
if (backgroundWorker1.CancellationPending)
{
e.Cancel = true;
break;
}
sum += i;
backgroundWorker1.ReportProgress(i * 100 / count);
Thread.Sleep(time * 1000);
}
e.Result = sum;
}
catch { }
What my problem is the Seconds not works proper timing. If we give 25 Seconds it will works for 2 seconds only.
So What changes i have do for recertify this solution
Awaiting your reply.
Regards
Vasanth
vasanthkumarmk
19-Aug-12 15:30pm
View
ok thank you very much..... Your posting very useful for me. So many thanks to you
vasanthkumarmk
19-Aug-12 0:39am
View
Thanks a lot, its working. But
Can you explain about these two signatures.
ReportProgress(int);
ReportProgress(int, object);
Where i can declare in my program.
vasanthkumarmk
19-Aug-12 0:20am
View
Ok thanks, i can it.
vasanthkumarmk
18-Aug-12 5:46am
View
Deleted
Database Classes
vasanthkumarmk
18-Aug-12 1:37am
View
Another solution i needed for, How can i stop the for loop using other button click event. Here by i posted my question. iF 'For' loop is running my program other button controls not able to access. Please resolve that problem.
vasanthkumarmk
18-Aug-12 1:05am
View
When i start the for loop,i couldn't able to access other buttons.
vasanthkumarmk
17-Aug-12 16:30pm
View
ok, But i just ask you for some simple implementation
vasanthkumarmk
17-Aug-12 16:18pm
View
Thanks a lot.......
vasanthkumarmk
17-Aug-12 14:51pm
View
Thank you very much for that link.............
vasanthkumarmk
17-Aug-12 13:33pm
View
I hope it will working, But i couldn't understand your explanation. I suggest you post the example coding what you said the above solution.
vasanthkumarmk
17-Aug-12 13:32pm
View
Deleted
Give some example code here.
vasanthkumarmk
17-Aug-12 13:29pm
View
Make alteration of my code, and implement your ideas please put the coding here. I try out but it shows some errors. I know its my probs. If you give example coding i have understand. So I request give the coding what you said above solution.
vasanthkumarmk
17-Aug-12 13:22pm
View
can you post the codings please?
vasanthkumarmk
17-Aug-12 13:21pm
View
k i can try this one.
vasanthkumarmk
17-Aug-12 7:54am
View
Using timer the process will be too slow
vasanthkumarmk
15-Aug-12 9:53am
View
k
vasanthkumarmk
15-Aug-12 7:24am
View
textBox2.Text = Listview1.SelectedItems[0].Tag.ToString(); This line shows this type of error
Null Reference Exception was unhandled
Object reference not set to an instance of an object.
vasanthkumarmk
15-Aug-12 7:22am
View
k i can change this
vasanthkumarmk
15-Aug-12 7:04am
View
if (Listview1.SelectedItems[0].Tag != null) This line shows this type of error
" InvalidArgument=Value of '0' is not valid for 'index'.
Parameter name: index "
vasanthkumarmk
15-Aug-12 6:57am
View
ok thanks, i can implement and check out this code..
vasanthkumarmk
15-Aug-12 6:56am
View
If any one not understand my explanation please feel free ask, I ready to explain. But give solution very soon.
vasanthkumarmk
12-Aug-12 14:41pm
View
con.Open();
str = "update tb set ename = '" + textBox5.Text + "', expe= '" + textBox6.Text + "', eplace='" + textBox7.Text + "' where eno='" + textBox1.Text + "' ";
cmd = new SqlCommand(str, con);
dr = cmd.ExecuteReader();
MessageBox.Show("Successfully updated");
con.Close();
This is my update coding
vasanthkumarmk
12-Aug-12 14:40pm
View
I can able to insert,delete everything but i can't do the update
vasanthkumarmk
10-Aug-12 15:04pm
View
But how?
vasanthkumarmk
10-Aug-12 15:03pm
View
Just i have list view control contains some 20 items, when i click the button the top most item will select and after few seconds that selection will move to next, like that it will move up to end of the list one by one.
Thats why i am using timer to selection moves.
vasanthkumarmk
10-Aug-12 6:35am
View
really thanks for your code..
vasanthkumarmk
10-Aug-12 5:58am
View
any other solutions?
vasanthkumarmk
10-Aug-12 5:30am
View
k thanks, i can try it..
vasanthkumarmk
10-Aug-12 5:25am
View
i don't have a datasource,i can add item directly.......
vasanthkumarmk
6-Aug-12 6:03am
View
Don't remove any thing just select one by one....
vasanthkumarmk
6-Aug-12 5:22am
View
Listbox items will move one by one from Up to Bottom.... Like songs play from mp3 player
vasanthkumarmk
18-Jul-12 15:23pm
View
This is not a homework?
vasanthkumarmk
14-Jul-12 8:22am
View
k
vasanthkumarmk
5-Jul-12 7:36am
View
Deleted
i am using List View box.........
vasanthkumarmk
5-Jul-12 7:33am
View
I am using List view items that first link shows the list box up & down,
second link shows using WPF. please give any using LIST VIEW ITEMS
vasanthkumarmk
5-Jul-12 7:24am
View
ok i have to check......
vasanthkumarmk
5-Jul-12 7:21am
View
Please give a sample code....
vasanthkumarmk
3-Jul-12 8:26am
View
how can i set for this same as panel1.SetBackground(????);
vasanthkumarmk
3-Jul-12 8:25am
View
Sorry !!! Its not working.......
vasanthkumarmk
27-Jun-12 8:52am
View
how i will takes the width & height size using mouse over
vasanthkumarmk
27-Jun-12 7:28am
View
I want to move while runtime using mouse.......
vasanthkumarmk
26-Jun-12 8:03am
View
if (openFileDlgImg.ShowDialog(this) == DialogResult.OK)
{
try
{
m_objMLCharGen.AddNewItem(openFileDlgImg.FileName, 36, 29, 0, 0, ref strItemID); //Using My SDK to add the image
}
catch (Exception) { }
// UpdateList();
}
Dear Friends,
My project we are using one SDK, using that SDK i added the image, But i am very sure it won't add the picturebox format. i need that will re size while runtime.
vasanthkumarmk
26-Jun-12 8:03am
View
Deleted
if (openFileDlgImg.ShowDialog(this) == DialogResult.OK)
{
try
{
m_objMLCharGen.AddNewItem(openFileDlgImg.FileName, 36, 29, 0, 0, ref strItemID); //Using My SDK to add the image
}
catch (Exception) { }
// UpdateList();
}
Dear Friends,
My project we are using one SDK, using that SDK i added the image, But i am very sure it won't add the picturebox format. i need that will re size while runtime.
vasanthkumarmk
26-Jun-12 8:02am
View
if (openFileDlgImg.ShowDialog(this) == DialogResult.OK)
{
try
{
m_objMLCharGen.AddNewItem(openFileDlgImg.FileName, 36, 29, 0, 0, ref strItemID); //Using My SDK to add the image
}
catch (Exception) { }
// UpdateList();
}
Dear Friends,
My project we are using one SDK, using that SDK i added the image, But i am very sure it won't add the picturebox format. i need that will re size while runtime.
vasanthkumarmk
26-Jun-12 2:06am
View
ok Thank you..........
vasanthkumarmk
25-Jun-12 9:02am
View
Very Very Thanks for your code.....Its working but i confusing set the boundaries, Please tell me once, How can i set the boundaries.
vasanthkumarmk
25-Jun-12 7:36am
View
Here below i shown the code what i am using, But this one is suitable for only Left and Top side (Controls not moves outside of panel), This type not support for Right and Bottom Side, Both sides controls moves outside of panel. Please give me the coding for Right and Bottom position controls not move outside of panel.
if (e.Button == MouseButtons.Left)
{
if (pictureBox1.Left + (e.X - x) > 0)
pictureBox1.Left += (e.X - x);
if (pictureBox1.Top + (e.Y - y) > 0)
pictureBox1.Top += (e.Y - y);
}
Show More