|
|
Right click on the project in Solution Explorer, click Properties, you'll find an entry for Application Icon in the resulting property grid.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Just replace the app.ico file in exe project.
|
|
|
|
|
How can i Add ToolTip to ListView Subitems.
|
|
|
|
|
You'll have to add a ToolTip to the ListView itself and then set the text according to the position of the mouse inside the ListView.
Regards,
mav
|
|
|
|
|
protected int ListViewGetStringWidth(string subItemText)
{
IntPtr hString = Marshal.StringToHGlobalAuto(subItemText);
int width = UnsafeNativeMethods.SendMessage(this.Handle, LVM_GETSTRINGWIDTHW, 0, hString);
Marshal.FreeHGlobal(hString);
return width;
}
protected void SetToolTipText(string toolTipText)
{
if (toolTipText != null)
{
this.toolTip.Active = true;
this.toolTip.SetToolTip(this, toolTipText);
}
}
in the mouse move event handler do the following
curSubItem = item.SubItems[subItemIndex];
if (curSubItem != null)
{
if (curSubItem.Text.Length > 0)
{
subItemTextWidth = this.ListViewGetStringWidth(curSubItem.Text);
if (subItemTextWidth != -1)
{
subItemTextWidth += 6;
if (subItemTextWidth > this.Columns[subItemIndex].Width)
{
this.SetToolTipText(curSubItem.Text);
}
else
{
this.HideToolTip();
}
}
}
}//end curSubItem
Live Life King Size
Alomgir Miah
|
|
|
|
|
would u like to explain this line of code
curSubItem = item.SubItems[subItemIndex];
how to get subItemIndex......
waiting 4 ur reply
|
|
|
|
|
Hi all,
I need to run a process on my client's PC's remotely from a server (Who has an administrator authority among all PC's). Could any one help? Thanks.
Kind Regards,
Mohammad
|
|
|
|
|
how are you my friend ?
you need to build a server application to listen to specific port on your server (That has authority for other clients) and then your client tool and then you run this client tool from your local lan or wan on the internet then you can handle the signals go to the server which will run it and perform the specific actions according to these commands as
the following flowchart
you are now on your client pc with the client tool you need to open a process on your remote pc then you can handle the command as the following
client------->sends the command to the server on your remote server -------> Server listens on that port you try to connect and get the command string and do or perform the specific action for that command on the pc which it is installed.
run command line prompt on the remote pc
Client sends command as "runCmd"
server gets the command through the connection and do that
as
<br />
switch(commands)<br />
{<br />
case commands[0] == "RunCmd":<br />
System.Diagnostics.Process.Start("Cmd.exe");<br />
break;<br />
}<br />
And so on
Miss With The Best And Die Like The Rest
|
|
|
|
|
Hi snouto,
Thanks for your help,
I actually try do other things, that is the server needs to run a specific programm on behalf of client's. That is at some time the server will issue the command and send it to the client without establishing a connection from the client to the server.
If you remember it is similar to sending a message in LAN between PC's in which you define the Receiver machine name.
Any how thanks for passing on my thread, and I hope you have a solution for this.
Kind Regards,
Mohammad
|
|
|
|
|
Private Shared m_vb6FormDefInstance As Form1<br />
Private Shared m_InitializingDefInstance As Boolean<br />
Public Shared Property DefInstance() As Form1<br />
Get<br />
If m_vb6FormDefInstance Is Nothing _<br />
OrElse m_vb6FormDefInstance.IsDisposed Then<br />
m_InitializingDefInstance = True<br />
m_vb6FormDefInstance = New Form1()<br />
m_InitializingDefInstance = False<br />
End If<br />
DefInstance = m_vb6FormDefInstance<br />
End Get<br />
Set(ByVal Value As Form1)<br />
m_vb6FormDefInstance = Value<br />
End Set<br />
End Property
Can anyone convert the code snippet for me into C# code.
|
|
|
|
|
private static Form1 formDefInstance;
private static bool initializingDefInstance;
public static Form1 DefInstance
{
get
{
if(formDefInstance == null || formDefInstance.IsDisposed)
{
initializingDefInstance = true;
formDefInstance = new Form1();
initializingDefInstance = false;
}
return formDefInstance;
}
set
{
formDefInstance = value;
}
}
This is the wrong way to initialize a Singleton Form. No locking is provided to ensure that two threads dont both create an instance of your form1 class.
|
|
|
|
|
Flawless !
David Anton
Tangible Software Solutions
www.tangiblesoftwaresolutions.com
Home of:
Instant C#: VB.NET to C# Converter
Instant VB: C# to VB.NET Converter
Instant J#: VB.NET to J# Converter
|
|
|
|
|
I have been developing an Outlook Addin (2003) with VS2003 C#. It has been working very well until last week when running it in debug, Outlook starts and then stops. An error is reported in the Application log "Accepted Safe Mode action : Microsoft Office Outlook." Outlook stops and so does VS no exceptions are fires even with every debug trap set on. When Outlook next runs it asks if the Addin should be de-activated.
I created a new addin project from the project template wizard with no functionality except the connect class and this does exactly the same.
Any help would be most appreciated as I can only debug it run mode using messages.
|
|
|
|
|
As is well known, the code in C# assembly is not protected and anybody can see that and can even be decompiled and recompiled after some changes.
The obfuscators are not of much help as I found that code is still visible albeit in some obscure form and even here decompilation and recompilation is possible.
After some search, I found that Salamander's .NET Protector which claims that the code cannot even be seen and cannot be recompiled after decompilation. Their claim is that they are converting the code to the native code and therefore the code cannot be seen again. Due to their high pricing, it is essential to know whether this product is really useful as claimed.
Can the esteemed developers at this site enlighten me about the usefulness of this product if anybody has used this product? Is the said product worth using for protecting one's C# assembly?
As this question is of great importance for a C# developer interested in protecting his code prepared after lots of efforts, help in this regard will be highly appreciated.
Regards,
|
|
|
|
|
Two things:
:: Once the code is compiled you can never ever get the original code back from the compiled code. What you can do is to recreate code that will do the same thing, but that is not the original C# code.
:: There is no way to completely protect the code from reverse engineering. If the code is executeable in any form, it is also possible to read. Obfuscators only make it harder to read the code.
Also:
If you use something like Salamander's .NET Protector that compiles the code to native code, you lose the dynamic compilation. That means that the code is compiled for a generic processor rather than the specific processor that will run the code. As it will not be able to use any special instructions that are not present in all processors, the code will run more slowly on some systems.
You have to weight this against what you feel that you gain by making it harder to read the code.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
is there a way to check if the latest Windows Updates are installed on a specified computer?
Thanks for your help!
|
|
|
|
|
You could probably mash something together using the Windows Update Agent API[^]. I don't think you'll find alot of examples though. This is an API that doesn't get much use outside of Automatic Updates in 2000/XP/2003.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi there
I am trying to create a software package in C# and need to connect it to a PIC microchip programmer that i have created using the serial port. Does any one know how i can implement serial communication in C#?
THANKS
|
|
|
|
|
How are you my friend ?
You can Do that By two ways .
The first Way is to use predefined Package Dll as Tapi32.dll it is dll found in your system32 of your windows Os designed for digital telephony applications and serial programming But i see that you are not trying to communicate via your modem so the second way will work with you
2- Sovage Innovacations:
For Serial Programming you can download their program which Enables you to communicate via Ports and write on Chips Like MicroControllers and others
And there are alot of useful links to other websites interested in serial programming at this website here is the site
http://www.oopic.com
Especially in robotics Designing.
Miss With The Best And Die Like The Rest
|
|
|
|
|
hi there...thanks for the answer...i am doing well..
yup am not communicating with modems...so cant use the first method...the problem with the second method is that i have to create my own software package as part of a project and cannot use an already made program and software therefore i have to implement the serial communication in my own software and for that i require help.i dnt see any built in librares for serial communication and am not sure hot to go about doing that..
thanks
|
|
|
|
|
Try this. I used it a while ago to good effect
|
|
|
|
|
It does help if you include a reference doesn't it ! Sorry
http://msdn.microsoft.com/msdnmag/issues/02/10/netserialcomm/
|
|
|
|
|
sevenacross wrote:
It does help if you include a reference doesn't it ! Sorry
http://msdn.microsoft.com/msdnmag/issues/02/10/netserialcomm/
hi thanks for the reply
I did look at this piece on the article link that you pasted but isnt that visual basic that they are explaining there? I am looking for something in C#. I am not sure where to start in that code either. maybe you can advice. what do i include as well? using System.....
Thanks
|
|
|
|
|
I just referenced the commbase.dll and added using JH.CommBase. Then inherited from CommLine and hooked into the NewLineCallback event which gave me a callback every time a new line was received. I'm sure that you don't have to take input a line at a time.
|
|
|
|