C Sharp :: How To Add ICO File To Use For NotifyIcon
Dec 8, 2012Simply put, i created a .ico file and i want to use it as the NotifyIcon icon. But i can not for the life of me figure it out..
View 2 RepliesSimply put, i created a .ico file and i want to use it as the NotifyIcon icon. But i can not for the life of me figure it out..
View 2 RepliesI need to find a string(&login=) from physical memory dump file.And i have to print the word or string following it.Is there any C# code for this problem?
View 3 Replies View RelatedI am creating small application using c#.net.I removed all image tag using regular expression no I want to remove all video file and flash file also in source code of webpage.
so far I have tried this ...
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
[Code] .....
I am making an application that runs on Machine1 and the purpose of the application is to copy the files from Machine1 to Machine2. It works fine but i have to share the folder of the Machine2 where i copy the files.
Is it possible without sharing.
I have a table in my database that has a 3 fields.
RuleID | RuleName | Rule
the ruleID is a randomly generated string of characters, RuleName is the name the user gives to the rule, and the Rule field is about 600 characters long and is just XML text.
I want to read that Rule field from the database and use it inside the function below.
private static List<MenuItem> LoadRules(bool evaluationType)
{
//string path = HttpContext.Current.Server.MapPath(string.Format("/Rules/{0}/{1}/", ip, evaluationType ? "Evaluation" : "Execution"));
[Code]...
This function loads an xml file from a static location and parses out some information to a context menu.
BUt i'm culeless on how to have the function read the xml info found inside my database.
I am currently having issues with the following code when trying to create a excel file using C#. This is the code that I have at the moment.
oXL = new Microsoft.Office.Interop.Excel.Application();
oXL.Visible = false;
oWK = (Microsoft.Office.Interop.Excel._Workbook)(oXL.Workbooks.Add(System.Reflection.Missing.Value));
oWK.SaveAs(path + "" + fileName);
oWS = (Microsoft.Office.Interop.Excel._Worksheet)oWK.Worksheets.get_Item(1);
oWS.Cells[1, 1] = "Student ID";
oWS.Cells[1, 2] = "Student Name";
oWK.Save();
The line that I am having issues with is
oWS = (Microsoft.Office.Interop.Excel._Worksheet)oWK.Worksheets.get_Item(1);
If I remove it, I am able to create and save teh workbook in the directory. However, I want to make some changes on a worksheet, and that is where the issue is. I have also tried using the line of code:
oWS = (Microsoft.Office.Interop.Excel._Worksheet)oWK.Worksheets[1];
This line had no luck either. The issue I am having is the error regarding InvalidOperationException: Dynamic operations can only be performed in homogenous AppDomain.
FileStream obj = new FileStream(System.Convert.ToString(row.Cells["Lec_media"].Value),
FileMode.Open, FileAccess.Read, FileShare.Read);
if (Startdate2 == JCM_NOW2) {
if (checkBox1.Checked == true)
[Code] ....
So I have this program which read single text file and write in other. Basically read every line then write to another file "this number is n times here + numbers".
How to modify this to store only 1 time the number in second file. What I mean is not like now:
Now output is:
Count of matching numbers in this group: 7
Numbers:
01070400
01070400
01070400
01070400
01070400
01070400
01070400
Is better to be:
Count of matching numbers in this group: 7
Number:
01070400
Code that I use is:
string path = "text.txt";
var result = (File.ReadLines(path)).OrderBy(x => x).GroupBy(x => x);
using (var writer = new StreamWriter("test1.txt")) {
foreach (var item in result) {
string outGrp = String.Format("Count of matching numbers in this group: {0}", item.Count());
[Code] ...
The code below is used to return a file path.
private string BrowseJournalFile(string startRelativePath)
{
string str = "Journal files (*.log)|*.log|All files (*.*)|*.*";
return PathTools.BrowseFile(startRelativePath, str, this.RootPath);
}
So once I click browse I get something like "E:New Files" But there is this .log file in this folder which I want to automatically store in this path.
Right now I have to click on this .log file and then select open. Is there a way I can directly load the file.I have been trying to use the FileStream but no luck.
How can I calculate the total of pages for all file(pdf,word,excel,txt...) types in a directory with c#?
View 2 Replies View RelatedI am developing a win form application with sq l server2005, in client system after install the application I created the folder for storing the database of running application, like that I have every year database separately, My doubt is how to connect the particular year database while loading the app?
View 1 Replies View RelatedE.g. i have a log file in which there are many entries for appGUID. Now how many appGUID's are there, for this i have a code, but how many of them are unique, for this i don't have code.
View 4 Replies View Relatedhow to do this in C#. Need to connect to Oracle db, take a file from directory then read every line of the file. Lines are like this:
123234847656|8800359898818177|A|20130401 14:51:42|
123234847212||D|20130401 14:52:08|
123234847212||M|20130401 14:55:38|
Then will split as string on every '|' char and according to this flag |A|, |D| or |M| I will add/delete/modify information inside. I have trouble with this part with the connection and read/split file and check for the flag A, D or M.
I have a dll file and i want to add this dll file in my c#.net project reference through a program. I know I can add it by clicking copying and paste ,but i want to add reference programmatically.
View 2 Replies View RelatedHow to substring first 8 digits from number?
I have text file with around 10k lines. Each line contains number with length 12-14 digits. I want to take only first 8 digits from each number and writ it in new file.
I'm using C# with VS 2010, and I've created a .rdlc report file with 1 image boxes on it. How do I add images programmatically to this report file? Images are generated at runtime.
View 3 Replies View RelatedI need to save excel file data directely into oracle database by using XML string but getting error as
ORA-01704: string literal too long
01704. 00000 - "string literal too long"
*Cause: The string literal is longer than 4000 characters.
*Action: Use a string literal of at most 4000 characters.
Longer values may only be entered using bind variables.
Error at Line: 50 Column: 31
how to split a file in equal size and when clicking on split button it split the files as well as encrypt split parts and the size information are automatically stored in groupbox and save all splitted files in folder.
View 1 Replies View Relatedi have created application using gembox i create a word file and save data on it but i want after saving it itis opened to me using microsoft word directly
it is the code
DocumentModel document1 = new DocumentModel();
Section section1 = new Section(document1);
document1.Sections.Add(section1);
[Code]....
regex pattern that takes only directory without file name
private void txtDownloadRoot_Validating(object sender, CancelEventArgs e)
{
Regex driveCheck = new Regex(@"([a-zA-Z]:[^/:*;/:?<>|]+)|({2}[^/:*;/:?<>|]+)");
if (!driveCheck.IsMatch(txtDownloadRoot.Text))
[Code].....
i can't seem to get my program to save the Set.savv file and encrypt it and decrypt it when user logs back on to there virtual file on a CD and writing it to the disk its self and closing the session
View 8 Replies View RelatedI have a .png file that my console app reads and puts into a structure that is saved as a file. The png is always the same so I thought I could just add it as a resource image to a resource file so it would be included in my program and not as a separate file. When I did that, the png shows up as a "SystemDrawingBitmap". If I examine this resource in a watch I see "Base" and "Static" members. Expanding those properties does not give me anything useful such as a pointer to the raw png data and its length in bytes.
If worse comes to worse, I can always make a hex dump of the png contents and then put the hex code into a CS file using static initialization.
Surely there is some way I can access the raw data internally and read the bytes into a byte array using C#
I am trying to open an Excel file, refresh the query behind it and then save and close the file in C#.
I have the following but I am getting errors on the
Application excel = new Application()
section:
Application excel = new Application();
Workbook theWorkbook = excelFile.Workbooks._Open(txtLocation.Text, 0, false, 5, System.
Reflection.Missing.Value, System.Reflection.Missing.Value, false, System.
[Code] .....
I have added the Microsoft.Office.Interop.Excel reference, but still have the issue?
I have tried to use File.Copy and File.Move but non of them would work as I expected .....
View 1 Replies View Relatedhow i upload excel file with value Save in database on server without show error.
Actually i have code who work correct on local host but not work on server then show error who write down Below
Microsoft.ACE.OLEDB.12.0 is not registered local machine.
I want to select three columns from my text file i.e. Empl No, Start Date and Created Date. After selecting this, I want to insert the data into a database.
I have attached a copy of the text file.
I have the following code so far:
if (File.Exists(filename))
{
string[] lines = File.ReadAllLines(filename);
for (int y = 0; y < lines.Length; y++) {
Console.WriteLine(lines[y].ToString());
}
How do i select specific details for each employee