|
I can't because the dgv is databound. I would just like to know what the dgv is doing to add the new row when a user types text into a TextBoxColumn.
My code this week has no errors. But it's Monday morning and I haven't got out of bed.
|
|
|
|
|
Hi,
i heard about Process Explorer v11.3.
Is there any chance a hidden program loads without my knowledge?
i dont care about the efects of a particular software, virus or trojan, i which to know how to know all the programs that are loading at the current time. I dont know if there is a software like the above or taskmanager.
How can i create a software like this?
(code, links anything)
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
|
Are you trying to write something to monitor your system - like process explorer. Or are you trying to write something that runs hidden eg virus etc?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
You've been asking this for days. Please give it up.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Most likely there are applications loading without your knowledge.
Process explorer is a damned handy tool to view all running processes on your system. I don't see how that pertains to your question, you want to mimic PE or do you want to make your own software that will be hidden?
|
|
|
|
|
Hi All,
can someone plz let me know how can I put an .ico on windows form in c# (before the Form's "Text" property). i opened the .ico in windwos form Icon property, but it didn't appear on the form when i run it.
thanks heaps.
|
|
|
|
|
Is the ShowIcon property set to true?
Revolutionary: Disk drives go round and round.
|
|
|
|
|
Hi,
Form icons are set trough the Icon property; they only show for some FormBorderStyle values (e.g. Sizable, but not FixedDialog). Also ControlBox and ShowIcon must be true.
|
|
|
|
|
|
You're welcome.
|
|
|
|
|
Hello,
I'm writing a program that needs to know when a user do things to windows of another process (activate, drag/drop, whatever). I think I'd need to read the WndProc function of those windows, but how do I achieve that?
Also, how to notify my program in case some specific messages happens? For instance, if WM_ACTIVATE is sent to the window of another program, how can it triggers some function in my program?
Any lead is appreciated :p
Regards,
Tony
|
|
|
|
|
Tony_P,
this can be accomplished by doing the following:
- get the HWND of the application's window you want to hook to
- use GetWindowLong to get the windows WndProc and store it
- create a WndProc method in your app
- use SetWindowLong to inject your Wndproc into the other window
- after doing what you want in *your* WndProc, use CallWindowProc to pass control to the windows original WndProc (you stored it previously)
Please bear in mind that this is not possible in .NET without using DllImport to coredll.dll in order to have access to certain Win32 functions like SetWindowLong, GetWindowLong, GetWindow, CallWindowProc, etc.
Hope this helps.
Marcelo
|
|
|
|
|
I see. Don't worry I've already worked with DLLImports of the win32 api.
Thank you!
|
|
|
|
|
So I'm close to wrapping up a project, and a bug came up that only occurred to me now because I just started testing on Vista.
My application has a class autostart which writes a key to, as you probably guessed, start my application on start as requested.
Here is my class
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Win32;
using System.Windows.Forms;
namespace ClientName.Sources
{
class Autostart
{
public string errorMsg;
public string ErrorMsg
{
get { return errorMsg; }
set { errorMsg = value; }
}
public string value;
public string Value
{
get { return value; }
set { this.value = value; }
}
const string filename = "MyCSharpApplication";
RegistryKey start;
public void WriteAutoStart()
{
try
{
string RUN_LOCATION = @"SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\RUN";
start = Registry.LocalMachine.CreateSubKey(RUN_LOCATION, Microsoft.Win32.RegistryKeyPermissionCheck.ReadWriteSubTree);
bool ifExist = ifExists();
while (ifExist == false)
{
start.SetValue(filename, Application.ExecutablePath.ToString());
start.Close();
ifExist = true;
}
}
catch (Exception ee)
{
ErrorMsg = ee.Message;
}
}
public bool ifExists()
{
if (start.GetValue(filename) == null)
return false;
else return true;
}
}
}
And In my main forms on load I have AutoStart Start = new AutoStart();
start.WriteAutoStart()
This works fine on XP, it check's if it is there, if not it will write the key. On vista I get a nice little error that says Attempted to perform an unauthorized operation, even though the user double clicked my application icon.
Some research showed me right clicking on the application and clicking "run as administrator" will do the trick, but this is annoying to have a user do this each time.
So is there a way with code to bypass this? I suggested to just have a proper install file take care of this but the client doesn't want an install file. So that leaves me a bit in the dark.
Suggestions?
|
|
|
|
|
Vista sucks. It's not a bug, it's deliberate. The main answer is, you need to be testing stuff on Vista early, b/c Vista breaks a lot of stuff that used to work just fine.
It is possible to create a manifest file which causes your app to run as admin every time. I've not done it, but I remember reading about it when I had my own Vista hell.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Do you remember where you read that, anything on CP I might have missed?
|
|
|
|
|
well the quick solution was to use currentuser instead of localmachine, if you wanted to know
|
|
|
|
|
EliottA wrote: the quick solution was to use currentuser instead of localmachine
This is different behaviour to what you had before. Remember that this will only work for the currently logged in user. If someone else logs in it won't start the application until they manually start your application for the first time, thereby initiating your AutoStart code.
|
|
|
|
|
In previous versions of Windows you will also need to be an Administrator to do this. The only difference is that in Vista it will automatically run you in a lower privilage account even although you are logged in as an Administrator unless you explicitly run the application as Administrator. This is for good reason - too many people run as Admin and that can compromise your system. In Vista if an application tries anything that may compromise your system (like the code you are running) it will prevent it.
How other applications deal with it, and that includes Microsoft applications, is to restart the application as Administrator if it can. If it can't it will prompt the user to provide the appropriate credentials. Unfortunately, I can't remember the code to do this.
Remember, your application will still fail under XP if you are not logged in as Administrator too. Only admin level accounts have the rights to write to HKEY_LOCAL_MACHINE in the registry in Windows NT, 2000, XP, 2003, Vista and 2008. In Windows 95, 98 and ME anyone can write the HKEY_LOCAL_MACHINE.
|
|
|
|
|
I am new to C# and I need a lot of help. I've created an inventory database with four tables using MS Visual Studio. I need to create a user friendly GUI that can access this database. I want to do simple searches and display what is available. I am so lost I do not know where to start.
The tables are:
InvData (contains MediaType, MediaName, Description, IsAvailable)
Users (Name of users that borrow Media)
Status (When media was borrowed/returned)
DisabledMedia (When media was disabled and reason)
|
|
|
|
|
Buy a book and work through it. No-one can possibly tell you how to do this in a forum reply. But, the forum reply version is, create new forms, drag controls out onto it, and write code to hook them up to the DB.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I understand I cannot get step by step instructions on how to complete this task on a forum but I was hoping that someone can help me get started since I am new to this. Can you suggest a book atleast. Right now I have a Head First Book for C#. I was able to create the database and connect it to my form but I do not know where to go from there. Thanks.
|
|
|
|
|
Any book will do, you're talking about stuff that, any book that doesn't cover it, is kind of useless. It's a long time since I learned C#, any recommendation I would make, would not be current.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I have successfully connected my desktop application to a web service. My web reference is in http://localhost/ however when I tried it on my application for my phone, I cannot seem to connect to it. Do you know how I can connect to the web service? Is it different when connecting to it via a device application from a desktop app? Or is it just because I'm using a localhost url?
I am simulating my phone by an emulator and just cradling it.
I get this web exception: Could not established connection to network
modified on Sunday, December 7, 2008 11:36 AM
|
|
|
|