Software Development Network Logo
  • IE Development
  • Smart Devicet
  • Audio and Video
  • Windows Forms
  • Microsoft ISV
  • SharePoint Products
  • Windows Vista
  • .NET Development
  • Visual C#
  • Visual C++
  • VS Team System
  • Visual Basic
  • SQL Server
  • Visual Studio
  • Game Technologies

Software Development Network >> Visual C#

Visual C#

New Question

In C#, how should I use a VB ocx that is dependent on a win32 dll ?
C# Checking whether a cookie exists or not
How can I quit the execution from the recursive function?
how to Send a Fax from Fax-Server using C#............ getting Exception
bool and objects
System.Xml reference added when adding new item to project
GetEnumerator question
DateTime.ToShortDateToSting()
serialport break state
using nested namespaces in application

Top Answerers

sanwanas
JCJCJC
smtraber
robertje
P.H.
PedroSimao
Rakesh Jha
KevinDSE
DriverEntry
sdochert
sitemap
Only Title

Answer Questions

  • Animatrix What is the idea behind this program?

    Hello everybody. I would like to make a small program for my university I am in. Just a little bit of history. Very often I see people that have not logged out of their accounts. A bad person can do a lot of damage if you have left your accound logged. What I want to do is to write a program to monitor the user's activity. Let's say he/she can define a time interval. If there is no activity during this period, the prograt should log off the user automatically. That's it. So could you guys explain to me the general idea behind this program(programmer's point). How can I monitor the user's activity and stuff like that. Any help would be greatly appreciated. With all the respect, chire Ju ...Show All

  • mscherotter Modular Programming in C#

    I'm in the design phase of building a modular application in C#. I'm new to C# and .NET and I was wondering how C# handles modules. In our project, we have an executive module that is the brains for the GUI and a group of compute modules. My question is how do I get these modules to talk to each other Do I use DLLs, application domains, or compile them as executables and use remoting I'm trying to speed up the learning curve, thanks for the help! No problem. Take a bit of mine, and a bit of James' since I forgot to mention that to create a .NET DLL, you need to make it a class library project :) James: My apologies for being vague. When I use the word module, I'm describing different processes. The GUI and Executive modules ...Show All

  • Koray Samsun About Write App.config

    I use sample code with article Read/Write App.Config File with .NET 2.0 listed below         // Open App.Config of executable         System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);         // Add an Application Setting.         config.AppSettings.Settings.Add("ModificationDate", DateTime.Now.ToLongTimeString() + " ");         // Save the changes in App.config file.         config.Save(ConfigurationSaveMode.Modified); but When I run the programme, I do not see any ch ...Show All

  • Capt. KDS how to set default dataGridView row Height

    I am using a DataGridview while i am setting the height from the code it is not working if (dgviewSearchResults.RowCount != 0) { foreach (DataGridViewRow row in dgviewSearchResults.Rows) { row.Height =5; } } i am using the above code But it is not working for me Sorry I could n't find any rowCreated event in Data Grid View event and i am working in c# Hi swathi, Try this one C# DataGridViewRow row = this .dataGridView1.RowTemplate; row.DefaultCellStyle.BackColor = Color.Bisque; row.Height = 35; row.MinimumHeight = 20; sorry the event in RowCreated in GridView I confused it with old DataGrid control  declaratively you can use this line ...Show All

  • Joe K STL.NET with type parametrization in C#

    Hello, As I can see, at present there is no way to use STL.NET (cliext) in C#. We can only develop some typedef or class wrapper (with exact type instead of template!) in managed C++ and reference it in the C# project. And no type-parametrization can be organized due to STL.NET classes are templates, not generics. Or is there any tricky solution Thanks, Mae I think what you stated, using exact types, is the only way. As far as my understanding goes, the C++ compiler generates the parameterized template classes at compile-time (per def), while the CLR spews the generics out at run-time after compile-time checking. So while the two are compiled independently, you can't write C# code to parameter ...Show All

  • MrT25 Demoforge Video Driver with C#???

    I was spent lot of time to write a program which captures the screen with DemoForge Migrate Driver. I read TightVNC source code and convert VideoDriver.cpp, VideoDriver.h to C#. I think my convert code is work fine, but I met a system error while test my program. Here is error: The instruction at "0x00000000" referenced memory at "0x00000000". The memory could not be "written". Here is my converted code: ---------------------------------- VideoDriverTypes.cs ------------------------------------------------ using System; using System.Drawing; using System.Runtime.InteropServices; namespace CSharpVideoDriver { /// <summary> /// Summary description for VideoDriverTypes. /// </summary> #region struct ...Show All

  • Richard Maher Import API functions from DLL

    HI! I need to import the following functions from User32.dll libray 1) OpenWindowStation In MSDN it is described with argument and return value: HWINSTA WINAPI OpenWindowsStation(LPTSTR lpszWinSta, BOOL fInherit, ACCESS_MASK dwDesiredAccess) 2)GetThreadDesktop MSDN description: HDESK WINAPI GetThreadDesktop(DWORD dwThreadId) 3) GetUserObjectInformation MSDN description: BOOL WINAPI GetUserObjectInformation(HANDLE hObj, int nIndex, PVOID pvInfo, DWORD nLength, LPDWORD lpnLengthNeeded) I know that dll function import is made like that: [DllImport("User32.dll", ExactSpelling=true)] public static extern IntPtr GetThreadDesktop(int dwThreadId); I. The first problem is how to change variables types for types unders ...Show All

  • Sanjukta this.Invoke OR Control.Invoke ??

    What is the best why to do the invoke when working with threads I have this procedure, this works. Here I use the Control (this.txtAction) Invoke method. private void SetTxtAction(string t) {     if (this.txtAction.InvokeRequired)     {         MyDelegates.setText d = new MyDelegates.setText(this.SetTxtAction);         this.txtAction.Invoke(d, new object[] { t });     }     else     {         this.txtAction.Text = t;     } } My question is if there are any performance or other differences if I would use... this.Invoke(d, new object[] { t }); ** ...Show All

  • pmanisekaran Monitoring http using c#

    What is the best way to monitor http traffic that goes out of (and comes into) the PC Sniffing packets using raw sockets doesnt seem to serve the purpose since I'm more interested in the http data part (if I sniff each tcp packet, it looks like I need to aggregate them and try to figure out where the data is). I came across this tool "http analyzer std" ( http://www.ieinspector.com/httpanalyzer/ ) which gives the complete http along with the process that sent/received this traffic. I'd like to know if this can be done using c#. And by the way, http analyzer uses something called InjectLibrary. I have no idea what it is but from the name, I gather that it attaches to the running processes like ...Show All

  • Camulus C# Windows environment book

    Hello! I am looking for a book that covers Windows environment connected information. Like a scripting bible but for C# (Framework 2.0). A book that covers for example: * How to create a user. * How to create a mailbox. * How to set NTFS rights for a folder. * How to map a network drive. * How to add a printer. * bla, bla, bla.... I realize that some of those thing might not be bundled all in one book, so a book about ADSI edit in C# covering point one and two is better than nothing, and so on. /Leyan I think the book you need then is the O'Reilly cookbook. The sad thing is for the time being there doesn't seem to be any specialised books on the topics you are looking for. I think then the on ...Show All

  • qrli Convert a struct to stream of bytes

    I need to transmit the following structure across the network in my program. Code: struct Data { public string strName; publci string strMessage; } Now what I need to do is to change the data to a stream of bytes and transmit it. And, at the receiver end organize it back into the structure. How can I do this Quite same question has been answered here: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=888375&SiteID=1 I hope this will solve your problem! Best Regards, Rizwan I'm a little new to .NET, though a decent MFC/Win32 developer. Anyway, I will get back if I have a problem in implementing this as a DLL. Regards. ...Show All

  • lagu2653 Class names not being highlighted.

    This is probably a fairly easy question, and it might belong in a VS forum somewhere but I couldn't find a VS - General forum here. So since I'm coding in C#, I'll try here. I opened VS today and one of my files no longer has the class names highlighted in light blue. It still builds, the site works and everything, but VS doesn't seem to recognize any of the classes or references on that one page. It was fine yesterday, and other files in the web project work. Other files in the same folder work. It's just this one file. Any ideas I can specify in more detail if you need, but I didn't know if this was an easy fix or not. I've seen this problem happen when the application is not in a compilable ...Show All

  • Mark A. Richman Reading Console Arguments Bug...

    I'm passing some command line arguments to my console app and the string[] args is combining two of the arguments together. I run something like this: blah.exe /a testing /dir "C:\" /args blah and it args[4] is C:\" /args It only happens when I have a trailing \ and then a ", but how else would I do it for a directory A possible workaround would be to run this: blah.exe /a testing /dir "C:\\" /args blah blah.exe /a testing /dir "C:\Program Files\\" /args blah I know that this isn't and elegant solution... maybe someone else can post something better. Regards, Fernando Because you start a string with " the \ is considered as an escape sequnece ...Show All

  • Joe Albahari Process class used from Windows Service fails

    I'm having trouble with the Process class. I have a Windows Service running as SYSTEM and I want it to spawn processes on behalf of users. I get the user's password there securely and create a SecureString. I get a Win32Exception "Access Denied" on Process.Start. If I run the service under the same account as the user I want to start for, I still get the exception except it says "The handle is invalid". I've checked and checked the SecureString and I've made it read-only so I don't think that's it. I actually had gotten it to work some time ago if I impersonate the client but this isn't really practical since the job can be queued up waiting for some time. I've signed all the assemblies involved and I've given the ...Show All

  • soconne Error: "No overload for method "foo" takes '4' arguments"

    I have referenced a C++ project to call a function from a class within but I get the error message "No overload for method "foo" takes '4' arguments" when I compile. if I go to the deinition for the class of the following call: myClass.foo(a, b, ref c, d) I can see the following metadata: namespace SPTI {     public class myClass     {         public myClass();         public static bool foo(Target a, byte[] b, byte[] c, bool d);     } } With the following for the declaration in C++: static bool myClass::foo([Runtime::InteropServices::In]SESTool::Target a,       &nbs ...Show All

545556575859606162636465666768697071

©2008 Software Development Network

powered by phorum