|
Now it's more clear, thanks.
|
|
|
|
|
how to not allowing windows service shut down?
Best Regards.
Tayfun UZUN
Istanbul/Turkey
|
|
|
|
|
I may be wrong, but only system services are prevented from being stopped. In other words, you cannot prevent your own service from being stopped.
|
|
|
|
|
I have been searching all over the place for a way to put a C# form beneath the desktop icons. I have tried using SetWindowPos and I can find the handle for the desktop icons using:
IntPtr hDesktopListView = IntPtr.Zero;
IntPtr hProgman = (IntPtr)FindWindow("Progman", null);
IntPtr hDesktop = IntPtr.Zero;
if (hProgman != IntPtr.Zero)
{
hDesktop = FindWindowEx(hProgman, IntPtr.Zero, "SHELLDLL_DefView", null);
if (hDesktop != IntPtr.Zero)
{
hDesktopListView = FindWindowEx(hDesktop, IntPtr.Zero, "SysListView32", null);
}
}
return hDesktopListView;
However, no matter what I do, I can't place a form beneath the desktop icons. Can someone tell me if this is even possible to do?
|
|
|
|
|
I've never heard of it being done (apart from when Windows had Active Desktop but that was about it).
I doubt it. If it isn't intuitive then we need to fix it. - Chris Maunder
|
|
|
|
|
hai..
i have got some problem in crystal reports and doesnot understand how to
come over it.
i have connected my reports to server name infosoft. when i deploy
my application through msde deployment tool kit every thing works fine.
but when i open crystal report error that sql-server does not exists or
access ids denied.
actually during deployment i change the config connectionstring to
server=enviornment.machinename+MSQL$+infosoft
this works fine
but how can i change connection of the report
or you can say that i want to change the name of server which i had used
in report
thanks in advance
|
|
|
|
|
I define some keyboard hook that catch all keys press (I'm using WH_KEYBOARD_LL ).
My problem is that i don't know when the key press is up case or down case and when the key ENTER pressed.
<br />
public struct keyboardHookStruct<br />
{<br />
public int vkCode;<br />
public int scanCode;<br />
public int flags;<br />
public int time;<br />
public int dwExtraInfo;<br />
}<br />
<br />
public int keyboardHook(int code, int wParam, ref keyboardHookStruct lParam)<br />
{<br />
if (code >= 0 && ( wParam == WM_KEYDOWN || wParam == WM_SYSKEYDOWN))<br />
{<br />
Keys key = (Keys)lParam.vkCode;<br />
<br />
KeyEventArgs keyEventArgs = new KeyEventArgs(key);<br />
<br />
char ch = Convert.ToChar(keyEventArgs.KeyValue + ' '));<br />
<br />
string Str = ch.ToString();<br />
<br />
LogTextBox.Text = LogTextBox.Text + Str;<br />
}<br />
<br />
return 0;<br />
}<br />
|
|
|
|
|
hi
i have a richTextBox in my form and write some text to it at runTime, i want my richTextbox is autoScrolling to display last text that insert to it, but how to do ?
thanks
|
|
|
|
|
richtextbox1.selectionstart = richtextbox1.textlength
richtextbox1.scrolltocaret()
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
I have an exercise:
Use C# to view structure of .mdb file (MS Access file). All the names of tables from file will be viewed in one listbox, all column-names (fields) of table, which is choiced from that list box, will be view in another listbox. And one checkbox will show if the field that we select from 2nd listbox is key or not.
This is the first time I work with mdb file in C#, please masters, help me to resolve this exercise.
This is code that I've tried to do:
<br />
string DBPath;<br />
OleDbConnection DBConnection;<br />
DataTable SchemaTable;<br />
DataColumn SchemaColumn;<br />
DataSet dbSet = new DataSet();<br />
<br />
(blah blah..)<br />
<br />
DBPath="Provider=Microsoft.Jet.OLEDB.4.0; Data Source = " + openFileDialog1.FileName.ToString();<br />
DBConnection = new OleDbConnection(DBPath);<br />
DBConnection.Open();<br />
SchemaTable = DBConnection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, new Object[] { null, null, null, "TABLE" });<br />
lstbox_tables.Items.Clear();<br />
for (int i = 0; i < SchemaTable.Rows.Count; i++)
{ lstbox_tables.Items.Add(SchemaTable.Rows[i].ItemArray[2].ToString());
}<br />
........something need to be added here from you..My code that was not correct is here:<br />
<br />
int table_index = lstbox_tables.SelectedIndex;
<br />
<br />
<br />
<br />
MessageBox.Show(number_of_columns.ToString());<br />
lstbox_fields.Items.Clear();<br />
for (int i = 0; i < number_of_columns; i++)<br />
{<br />
}<br />
<br />
<br />
<br />
<br />
<br />
<br />
modified on Saturday, May 24, 2008 1:41 PM
|
|
|
|
|
My application is a windows application and is an active alarm of notes
it gets hidden in sidebar and an icon is shown near the clock
Clicking this icon will launch the application again
How do I launch this application by pressing a ceratin key or combination of keys while it is sunning in sidebar
The application is in C#
thanks for the help
Sakshi
|
|
|
|
|
Do a search on CodeProject for keyboard hooks and hopefully that'll explain things.
I doubt it. If it isn't intuitive then we need to fix it. - Chris Maunder
|
|
|
|
|
sakshismriti wrote: sunning in sidebar
Sounds like a cool thing to do on a Saturday afternoon
Dave
|
|
|
|
|
Hi
I am working on a Semantic Web project that the Ontology's defined in Protege. Jena is required in order to make an GUI; but the problem is that Jena is Java based framework! I have installed IKVM to convert the Java library to be alble to be applied in .NET framework; Now I need to apply a piece of code to be able to connect the Protege(database) to run the query.
Thanks
|
|
|
|
|
I am working with DataGridView which has a ComboBox with associated datasource.
i would like to have this ComboBox editable that users can also add their values to comboBox.
plz let me have which property i can use to make editable.
Thanks in Advance.
Abdul Rahaman Hamidy
Senior Student Student in Computer Science
Kabul, Afghanistan
Software Developer
|
|
|
|
|
Good Day,
In the past, when I want to compute for the hash of a certain file, what I do is I open it first then compute for the HASH like so:
byte[] myfile = File.ReadAllBytes(path);
SHA1CryptoServiceProvider SHA1 = new SHA1CryptoServiceProvider();
Console.WriteLine(Convert.ToBase64String(SHA1.ComputeHash(myfile)));
In that code, you can see the presence of the File.ReadAllBytes reads the entire file.
Is there any other way to compute for the SHA-1 Hash of the file without actually opening it?
Thanks.
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
|
|
|
|
|
No, since the hash is merely an operation on a collection of data, which in this case happens to be the contents of the file.
/ravi
|
|
|
|
|
Have you tried using the overload method
public byte[] ComputeHash(
Stream inputStream
)
If it takes a stream, then it maybe calculates the hash by not reading all bytes at once, but sequentially.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi all
I need to get list of files in the remote directory in C#.NET, its a windows based application.
eg: http://192.168.1.65/project1/directory/
URL = http://192.168.1.65/project1/directory
I tried in System.IO.Directory.GetFiles(URL), but it throws an error "URI format is not supported"
please tell me if anybody knows
Thanks & Regards
Kumaran
|
|
|
|
|
AFAIK, Directory.GetFiles() only supports the file:// protocol.
/ravi
|
|
|
|
|
System.IO is managing local resources. Check out the System.Web or System.Net namespaces.
|
|
|
|
|
Hi all,
Please help to solve the below problem.
I am having a string as below. From that how to replace the line break to HTML break tag
<body>
This is line one
This is line two after the line break
</body>
In the above i have to replace the space between the two lines using HTML break tag <br/>
Thanks in advance
Know is Drop, Unknown is Ocean
|
|
|
|
|
You could use regular expressions for that.
Something like that:
Regex regex = new Regex(@"^\r\n", RegexOptions.Multiline);
html = regex.Replace(html, @"<br/>");
replaces all the carriage return and newline groups with <br/> from the beginning of a line.
|
|
|
|
|
While the string is in memory it'll likely contain only the '\n', not the '\r'.
|
|
|
|
|
Nope, it contains the carriage return and the newline also.
|
|
|
|