Quantcast
Channel: Visual C# forum
Browsing all 31927 articles
Browse latest View live

Get enum values based on attribute

I have an enum. I'm binding values to the combo. But I should get the values based on an attribute as below? How can I do this?combo1.DataSource =...

View Article


How do i get all words from html file and in the right order ?

This is the code i'm using now:HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument(); doc.Load(@"D:\localfile.html"); // Could also download as string, and just load from the string...

View Article


Accessing the powershell object

Why I cannot access the PSObject in my laptop, cause when I am doing on my school pc. It can work but when I do at my own laptop there is problem but no errors.I doing the testing i windows form.Here...

View Article

C# FTP Send Multiple Files, log in only once

I have an FTP account on drivehq.com, and I'm trying to send all my PDF files from my desktop to it. But, because at each iteration ( i'm iterating through a string array, which contains the path file...

View Article

SerialPort.DataReceived event problem

Hi.I have written a code which sends a string only if i receive the string "O\r\n" through serial port.The problem is, when i receive the string "O\r\n" first time, the program sends the string i want...

View Article


Capturing Excel chart selection / activation event in C# Addin

I'm trying to get a little excel addin developed to help with some repetitive chart work.I can't figure out, though, how to create an event handler that fires when the user selects a chart in Excel....

View Article

TcpListener cause memory leak when receive buffer

Hello, i have tried to use ANTS Memory Profiler to check my process, which shows my program are having 2MB of bytes in used. However i have already disconnected all clients, but seems that all bytes...

View Article

Change the location of database at runtime and store it to further use

HI.Currently I'm developing an client/server visual c# app in my own pc that's so I always have the database file in the same path so I don't need to ask where the database file are located, I'm using...

View Article


Reading Through a List of Files

I have the list of files (which include .doc, .xlsx and .pdf), in a specified directory. Is there a way to read through each file to search for specific data without opening each one? I realize that...

View Article


Which of the following can one ferform to create a System.Type instance for a...

Hi,Which of the following can one ferform to create a System.Type instance for a given specialization of a generic?c. Call the GetType() method on an instance of the specialization e. Call the...

View Article

How can i extract from a text file only group of letter which have white...

This is an example of part of the text file content:CNN.com International - Breaking, World, Business, Sports, Entertainment and Video News var cnnIsHomePage=true,...

View Article

Is there an order in which c# application form accepts the code for buttons...

Hi, first of all I should say that I am very VERY new to the world of programming having come from a science background! I am working through a c# tutorial at: home and learn .com in which I am adding...

View Article

How to switch on narrator when form load occurs on c#?

I want to turn on windows narrator when my form1 load occurs and stop narrating when form closed.http://msdn.microsoft.com/en-us/library/system.speech.synthesis.aspxI went through above link but...

View Article


My game in C# : How to release unused memory?

Hello Ladies and Boys from MSDNI m making a videogame with Visual C# 2008 and SFML. It works Ok, but at a certain time, it runs out of memory. I already read some threads about the GC (Garbage...

View Article

C# pass database connection value from calling application to DLL

I have a C# 2010 desktop application that will be calling a dll. The dll is code that is to be shared between different application. I want to be able to pass database connection values to the...

View Article


Data Grid view select a row

hiI have a data grid view to show some data to user and it's just for watch and select the data from it.I need to know how can write a code that when user click on a cell all row from that cell be...

View Article

Updating .mdf table using Visual studio but when I quit its gone

Hello I am using  private void BtnUpdate_Click(object sender, EventArgs e) { try { SqlConnection con = new SqlConnection("Data...

View Article


How can i replace two strings in a file using indexof and substring ?

I know there other ways but i want to try ot use this way with indexof and substring.What i did so far :private void InsertContent() { StreamReader r = new StreamReader(localHtmlFile); StreamWriter w =...

View Article

backgroundworkers, bitmap and lockbit method

Hello all!I'm a newbie in C# and .Net programming and need help. I'm trying to understand how backgroundworkers, bitmap and lockbits method work together. In particular here is an example where a radio...

View Article

shortcut key for a toolStripMenuItem does not work

one particular menuitem under file menu lets me assign any shortcut key and enabled short key but when run short cut key does not show and of course, ignores the short key press. I tried F4, alt+F4,...

View Article
Browsing all 31927 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>