|
I do no experience it. How many icon files do you have?
Alexandru Ghiondea
MCP
|
|
|
|
|
Bug? In Microsoft Software? No way!!!
That one I have not seen.
|
|
|
|
|
i read the book of " Schaum’s outline series , THEORY AND PROBLEMS OF DATA STRUCTURES" BY SEYMOUR LIPSCHUTZ.
it is a cool book but in it’s programming problems he want program like in ch5
can any one help tell me if i can make it by c#
or how can i find the answers of this problems
thanks lot
|
|
|
|
|
amirafouad21 wrote: he want program like in ch5
This makes no sense.
amirafouad21 wrote: can any one help tell me if i can make it by c#
You can do pretty much any programming problem in C#.
amirafouad21 wrote: how can i find the answers of this problems
Sounds like you are asking for homework answers. This is a no-no. Also, please title your posts more appropriately rather than just using 'help.'
____________________________________________________
If at first you don't succeed, skydiving might not be for you.
|
|
|
|
|
leckey wrote: amirafouad21 wrote:
he want program like in ch5
This makes no sense.
I think he assumes we have mind reading abilities to know what is ch5
leckey wrote: Sounds like you are asking for homework answers. This is a no-no. Also, please title your posts more appropriately rather than just using 'help.'
I agree. I just love 'help' threads
If you try to write that in English, I might be able to understand more than a fraction of it. - Guffa
|
|
|
|
|
You can rewrite the question like this:
I have a homework assignment. I noticed a similar example in another language in chapter 5 of this book.... Can you rewrite the example for me in C#, so I can hand it in.
|
|
|
|
|
very thank for your advice edboe , all you write is right and this is the problem can u help me edboe.
the question in liked list in data structure, the problem is that i want an algorithm or code in c# for this case that say write a program which reads an integer K and prints the list of clients of lawyer K and test the program for each K.
i know there is a pointer in c# but how i can make it.
thx a lot
|
|
|
|
|
Could anyone tell me how I could replace the system tray clock? I have seen a lot of applications do that, like ChameleonClock, and would like to do one myself. If somebody could give me some clues on doing that, I would really, really really appreciate it.
Thanks
-----
Vandra Akos
|
|
|
|
|
I looked into doing that about a year ago. From what I remember, it required jumping through some very complicated hoops to get it done. I think you had to get the window handle of the system tray, then the handle of the clock window, take over the message pump of that window and intercept certain messages for painting. Your code essentially replaces the drawing code of the original clock... I think!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Nah, I don't really think it would be *THAT* complicated. I saw a I guy did something like this, but had a problem somewhere else, and said "I replaced the system clock, / that was simple /, but then got into some trouble..."
So I think there should be a simpler solution to this.
-----
Vandra Akos
|
|
|
|
|
No, not really. There is no seperate Clock.exe or service putting that clock up. It's built into Explorer.exe, so I seriously doubt he "just replaced it".
He more than likely wrote his own clock and put that up in the system tray.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
So, do you have some code snippets, or anything to start with, because i couldn't really understand what you said before thoroughly...
Anyhow sounds very nasty, and i wonder if it was possible for a process to draw into another process' area... If it was, that could be a huge security flaw in windows... I mean i could go on, and change any window's contents...
-----
Vandra Akos
|
|
|
|
|
Vandra Akos wrote: So, do you have some code snippets, or anything to start with
Nope. Just a few hours of Googling taught me what needed to be done, including finding the correct window handle, processing of the messages, and code injection into another process.
Vandra Akos wrote: i wonder if it was possible for a process to draw into another process' area
Yes it is. All you need in the handle to the window you want to draw in. Keeping it drawn the way you want and not having the application overdraw what you've done is the hard part.
Vandra Akos wrote: If it was, that could be a huge security flaw in windows... I mean i could go on, and change any window's contents...
Not easily, but it could be done. It's not as big a problem as you might think, though. There are security restrictions on some of the Win32 functions that you have to call to pull this off. If your a normal User, then you can't make some of the calls required to do this. If your an Administrator though...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
uh, huh?
I don't want to create an icon, I actually want to replace the system clock part in the status bar, you know where it says 15:02, something more cool, and with a pop up-menu or something like that
|
|
|
|
|
Well, you can remove the standard system clock, and create your own application,
using one (or more) NotifyIcons, where each of these icons shows (part of) the date/time/whatever, and gets updated regularly.
Main drawback of this approach is you have no control over the icon position (although
icons created in sequence by a single application seem to stay together).
The referenced article shows you how to safely update an icon that is in use.
Luc Pattyn
|
|
|
|
|
Am to develop a .NET application using C#,but this application will connect to the server which is a linux box.
Download some data from the MySQL database there ,then disconnect.
Does some one know how i can go about this?
Regards
Waskira
|
|
|
|
|
Do you dial directly into your linux box? => configure a dial server on it
If you have already a IP connection (maybe through a networking provider) then you just need to create a webservice. Have a look at mono and xsp.
For dial in configuration maybe have a look at: http://developers.sun.com/solaris/technotes/linuxppp.html
mono, xsp: http://www.mono-project.com/ASP.NET
|
|
|
|
|
Am thinking of going stand alone not web-app.
Another thing is yeah,am dialing into the box.
So,my part is getting the client application talk to the serial port.
So how do i get it to talk to the serial port
|
|
|
|
|
Is there a way to open a new console window in a Console Application? I'd like to display some output messages in a secondary screen rather than on the main one.
The alternative would be to display a form with a textbox...
Thanks.
|
|
|
|
|
How about : Process.Start("cmd.exe");
|
|
|
|
|
A console application can't have multiple windows like the windows environment. If you insist on your desing, you can make another console applcation that takes your output as arguments and display it in its own console window. In this case you can use Process.Start() ta launch your second console application.
Notice that your first application will have no control on the second one once it has started.
Regards
|
|
|
|
|
Hi, I've problem creating windows service, that can insert values into database using Sql-server 2000 and platform is ASP.NET 2.0 (C#), anyway I followed the whole code using from 'the code project' website; http://www.codeproject.com/cs/system/WindowsService.asp
I write the whole code below again, and please let me know, what's wrong...
Thanks.
// WindowsService.cs
using System;
using System.Diagnostics;
using System.ServiceProcess;
using System.Collections.Generic;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Configuration;
namespace WindowsService
{
class WindowsService : ServiceBase
{
///
/// Public Constructor for WindowsService.
/// - Put all of your Initialization code here.
///
public WindowsService()
{
this.ServiceName = "My Windows Service";
this.EventLog.Source = "My Windows Service";
this.EventLog.Log = "Application";
// These Flags set whether or not to handle that specific
// type of event. Set to true if you need it, false otherwise.
this.CanHandlePowerEvent = true;
this.CanHandleSessionChangeEvent = true;
this.CanPauseAndContinue = true;
this.CanShutdown = true;
this.CanStop = true;
if (!EventLog.SourceExists("My Windows Service"))
EventLog.CreateEventSource("My Windows Service", "Application");
}
///
/// The Main Thread: This is where your Service is Run.
///
static void Main()
{
ServiceBase.Run(new WindowsService());
Test.ConnectionManager.Instance().Cb_Wap_NewItem(); // I addded this part from my
}
///
/// Dispose of objects that need it here.
///
/// <param name="disposing" />Whether or not disposing is going on.
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
}
///
/// OnStart: Put startup code here
/// - Start threads, get inital data, etc.
///
/// <param name="args" />
protected override void OnStart(string[] args)
{
base.OnStart(args);
}
///
/// OnStop: Put your stop code here
/// - Stop threads, set final data, etc.
///
protected override void OnStop()
{
base.OnStop();
}
///
/// OnPause: Put your pause code here
/// - Pause working threads, etc.
///
protected override void OnPause()
{
base.OnPause();
}
///
/// OnContinue: Put your continue code here
/// - Un-pause working threads, etc.
///
protected override void OnContinue()
{
base.OnContinue();
}
///
/// OnShutdown(): Called when the System is shutting down
/// - Put code here when you need special handling
/// of code that deals with a system shutdown, such
/// as saving special data before shutdown.
///
protected override void OnShutdown()
{
base.OnShutdown();
}
///
/// OnCustomCommand(): If you need to send a command to your
/// service without the need for Remoting or Sockets, use
/// this method to do custom methods.
///
/// <param name="command" />Arbitrary Integer between 128 & 256
protected override void OnCustomCommand(int command)
{
// A custom command can be sent to a service by using this method:
//# int command = 128; //Some Arbitrary number between 128 & 256
//# ServiceController sc = new ServiceController("NameOfService");
//# sc.ExecuteCommand(command);
base.OnCustomCommand(command);
}
///
/// OnPowerEvent(): Useful for detecting power status changes,
/// such as going into Suspend mode or Low Battery for laptops.
///
/// <param name="powerStatus" />The Power Broadcase Status (BatteryLow, Suspend, etc.)
protected override bool OnPowerEvent(PowerBroadcastStatus powerStatus)
{
return base.OnPowerEvent(powerStatus);
}
///
/// OnSessionChange(): To handle a change event from a Terminal Server session.
/// Useful if you need to determine when a user logs in remotely or logs off,
/// or when someone logs into the console.
///
/// <param name="changeDescription" />
protected override void OnSessionChange(SessionChangeDescription changeDescription)
{
base.OnSessionChange(changeDescription);
}
private void InitializeComponent()
{
}
}
}
// WindowsServiceInstaller.cs
using System;
using System.ComponentModel;
using System.Configuration.Install;
using System.ServiceProcess;
namespace WindowsService
{
[RunInstaller(true)]
public class WindowsServiceInstaller : Installer
{
///
/// Public Constructor for WindowsServiceInstaller.
/// - Put all of your Initialization code here.
///
public WindowsServiceInstaller()
{
ServiceProcessInstaller serviceProcessInstaller = new ServiceProcessInstaller();
ServiceInstaller serviceInstaller = new ServiceInstaller();
//# Service Account Information
serviceProcessInstaller.Account = ServiceAccount.LocalSystem;
serviceProcessInstaller.Username = null;
serviceProcessInstaller.Password = null;
//# Service Information
serviceInstaller.DisplayName = "Test C# Windows Service";
serviceInstaller.StartType = ServiceStartMode.Automatic;
// This must be identical to the WindowsService.ServiceBase name
// set in the constructor of WindowsService.cs
serviceInstaller.ServiceName = "My Windows Service";
this.Installers.Add(serviceProcessInstaller);
this.Installers.Add(serviceInstaller);
}
}
}
// ConnectionManager.cs
using System;
using System.Collections;
using System.Text;
using System.Data.SqlClient;
using System.Configuration;
namespace Test
{
class ConnectionManager
{
private SqlConnection connectionSql = null;
private SqlCommand commandSql = null;
private SqlCommand commandSql2 = null;
private SqlDataReader dataReaderSql = null;
private SqlDataReader dataReaderSql2 = null;
private String queryString = String.Empty;
private ArrayList returnArrayList = null;
private ArrayList returnArrayList2 = null;
private ConnectionManager()
{
returnArrayList = new ArrayList();
returnArrayList2 = new ArrayList();
connectionSql = new SqlConnection("Server=localhost;Database=dbMsgBox;User Id=sa; password=1234");
}
public static ConnectionManager Instance()
{
return new ConnectionManager();
}
public void Cb_Wap_NewItem()
{
commandSql = new SqlCommand("Select Top 1(out_msg_id) from tbl_outbox ORDER BY out_msg_id DESC", connectionSql);
connectionSql.Open();
dataReaderSql = commandSql.ExecuteReader();
if (dataReaderSql.Read())
{
try
{
dataReaderSql.Close();
SqlDataReader reader = null;
string sql = "Select Top 1(out_msg_id) as last_id from tbl_outbox ORDER BY out_msg_id DESC";
SqlCommand command = new SqlCommand();
command.CommandText = sql;
command.Connection = connectionSql;
reader = command.ExecuteReader();
if (reader.Read())
{
long last_entried_data = Convert.ToInt64(reader[0]);
long new_entried_data;
new_entried_data = last_entried_data + 200;
long mobNo = 5555;
long in_msg_id = 6980;
string body = "habi zabi";
decimal stat = Convert.ToDecimal(0);
int msg_typ = 0;
int send_port = 3838;
reader.Close();
commandSql2 = new SqlCommand("SET IDENTITY_INSERT [tbl_Outbox] ON;insert into tbl_Outbox(out_msg_id,mobileno,in_msg_id,body,status,msg_type,send_port) values(" + new_entried_data + "," + mobNo + "," + in_msg_id + ",'" + body + "'," + stat + "," + msg_typ + "," + send_port + "); SET IDENTITY_INSERT [tbl_Outbox] OFF;", connectionSql);
dataReaderSql2 = commandSql2.ExecuteReader();
}
dataReaderSql2.Close();
connectionSql.Close();
}
catch (Exception e)
{
connectionSql.Close();
Cb_Wap_NewItem();
System.Console.WriteLine(e);
}
}
}
}
}
|
|
|
|
|
My experience with Windows services is that you have to login the service with a user account to use any network operations.
So try to change this:
//# Service Account Information
serviceProcessInstaller.Account = ServiceAccount.LocalSystem;
serviceProcessInstaller.Username = null;
serviceProcessInstaller.Password = null;
into:
//# Service Account Information
serviceProcessInstaller.Account = ServiceAccount.User;
serviceProcessInstaller.Username = yourusername;
serviceProcessInstaller.Password = yourpassword;
With the correct values of course...
|
|
|
|
|
Hi to all,
How to Save TreeView Data, so that saved data can be Load in the TreeView next-time?
TreeView data contain all TreeView related data i.e. No. of Nodes, Node Name, Tag Value of Each Node. Tag value contains different objects of User-Defined Classes.
So how can I do this?
Please help me.
Thanks & Best Regards,
Aniket Salunkhe
|
|
|
|