|
Hi,
Can any know how to create, edit and display help when F1 is clicked for each control in VB.NET
Sreepathi.
|
|
|
|
|
Hi, is there any free IDE for VB.NET/C#/.NET Framework, if there is any.........what is the most popular? (aside from web matrix, i need a free tool for windows app)
|
|
|
|
|
Emacs with a C# add in - You'll need to Google for it though.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
|
|
|
|
|
SharpDevelop and the personal edition of Borland C# builder come to mind.
Charlie
if(!curlies){ return; }
|
|
|
|
|
Where is the code that draws the graph? It sounds like the same thing could happen when ever anything else obscured the graph too. Is this the case? (Try placing another window on top of the graph then moving it off again - Do you get the same thing?)
If you put the graph drawing code in the OnPaint() method (you will need to override it from the base class) it should redraw when the window is damaged. If this is not happening then perhaps the date picker needs to notify the graph that it is damaged. In this case you will need to use Refresh() to get the graph to draw itself again.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
|
|
|
|
|
Hi,
I used the following code to know the control which has focus:
System.Windows.Forms.AccessibleObject.GetFocused
The error I got is 'GetFocused' is not a member of 'AccessibleObject', but Documentation says, it is a member.
Do you any one know how to find the focused control.
Thanks,
Sreepathi
|
|
|
|
|
This will return a currently focused control on a form IF the form does not have any container controls on it.
<br />
public Control GetFocused()<br />
{<br />
foreach(Control ctrl in this.Controls)<br />
{<br />
if (ctrl.Focused)<br />
{<br />
return ctrl;<br />
}<br />
}<br />
return null;<br />
}<br />
This is a universal way of getting the currently focused control:
<br />
public class MyForm : Form <br />
<br />
{ <br />
<br />
[DllImport("user32.dll", CharSet=CharSet.Auto, CallingConvention=CallingConvention.Winapi)] <br />
<br />
internal static extern IntPtr GetFocus(); <br />
<br />
<br />
<br />
private Control GetFocusedControl() <br />
<br />
{ <br />
<br />
Control focusedControl = null; <br />
<br />
<br />
IntPtr focusedHandle = GetFocus(); <br />
<br />
if(focusedHandle != IntPtr.Zero) <br />
<br />
<br />
focusedControl = Control.FromHandle(focusedHandle); <br />
<br />
return focusedControl; <br />
<br />
} <br />
<br />
} <br />
|
|
|
|
|
Please, help.
I have a problem: i have few .Net projects. I need to make one multimodule assembly, wich contain this projects as modiles. How can i compile project as module.
PS I can make few assemblies, but i need that my classes in assemblies where friends. (like "internal" in assembly). Can i do it.
PPS Sorry for my english.
Thank you.
sieben
|
|
|
|
|
You can't do it within Visual Studio, but if you build from the command line using csc.exe (C#) or vbc.exe (VB.NET), you can specify /target:module to build a module. By convention, modules have the extension .netmodule .
When building the main assembly, you need to use the /addmodule switch, along with /target:exe, /target:winexe or /target:library depending on whether you're building a console application, a Windows application, or a class library, respectively.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
But if i use csc.exe, a can`t compile whole project, and make module. And if my project consists of many .cs files, i should write names of all this files in command line. Isn`t it?
sieben
|
|
|
|
|
anyone has an idea about the steps to use ngen.exe tool to convert my exe assembly to a native code ???
i read the procedure in the msdn but it's not working with me..
shakooosh
|
|
|
|
|
You cant convert an assembly into 100% native code. NGEN purely takes the JIT compiler and preprocess the assembly so the JIT compiler needs not to be invoked during runtime. Your assembly also needs to be signed for this to work i think.
top secret
|
|
|
|
|
I know the framework supports side-by-side execution, and assume this to mean that if I have two apps that use two different versions of an assembly, each appdomain will load the correct version of the assembly for its host.
Now I have a requirement to process serialized objects, which are serialized from different assembly versions, i.e., I dequeue an object and check which assembly version it was serialized from, and then I need to load the correct version assembly to deserialize the object and call a method on it. The method call will be constant over all versions.
I have started looking at using Assembly.Load to load the correct version assembly, but quickly see inadequacies with this approach. It seems more like I will need to start a separate appdomain for each version as well, and use reflection or remoting to call into the appdomain.
Note that there will not be a very large number of versions, probably around five concurrent versions, so one appdomain per version is not going to be a huge resource problem.
Any comments?
My blog.
|
|
|
|
|
Hello,
how can I change the .NetFramework Version for my project's.
I have installed Version 1.0 and 1.1 on my PC.
thanks in advance
Jörg
|
|
|
|
|
When you use VS.Net 2003, open the property page for your project and choose the entry Supported Runtimes under Common Properties - General.
VS.Net 2002 only supports building applications for the 1.0 Framework, as far as i know.
|
|
|
|
|
Regard!!!
So the question of Transfers to the client an amount of the expected result of functioning WebService (value must be considered on Server side and on the client its has to be seen before that datas will go... ).
I from here try put amount (in bytes) of the message in SoapHeader, which sends by Web service to the client...
On how much I has understood I can get it this way (or I’m wrong… )
public override Stream ChainStream( Stream stream )
{
siz = stream.Length;
return newStream;
}
Here is but afterwards то. шо has got (if has got 8-)) ) Запихиваю in SoapHeader воттак
public override void ProcessMessage(SoapMessage message)
{
if (message.Stage == SoapMessageStage.ХХХХ)
{
((SizeHeader)message.Headers[0]).size=siz;
}
}
So the question is:
What must be is ХХХХ ??? ????
If BeforeSerialize, then - not understandable what happens if I somehow shall else work with stream after serialisation (well for example compress by ZIP and this is the end - an size NOT CORRECT 8-((( )
If AfterSerialize, then before SoapHeader already does not accessible ... 8-(( It already as it were packed... Here is...
Help please... Or prompt other way
In russian...
Привет !!!
Короче ТЗ 8-)))
Задачка передачи клиенту размера ожидаемого результата работы ВебСервиса (цыфра должна быть посчитана на серваке и на клиенте её нада видить до того как пошли данные... ).
Я от тут пытаюсь SoapHeader запихнуть размер (в байтах) сообщения, которое отправляет веб сервис клиенту...
На сколько я понял выхватить его можно примерно вот так (хотя может я и гоню 8-)) )
public override Stream ChainStream( Stream stream )
{
siz = stream.Length;
return newStream;
}
Вот а потом то. шо получил (если получил 8-)) ) Запихиваю в SoapHeader воттак
public override void ProcessMessage(SoapMessage message)
{
if (message.Stage == SoapMessageStage.ХХХХ)
{
((SizeHeader)message.Headers[0]).size=siz;
}
}
Так вот собсно вопрос:
Чему должен быть равен ХХХХ ????
а) Если BeforeSerialize, то тогда - не понятно что произайдёт если я как-то ещё буду работать со stream после сериализации (ну например сожму зипом и все - размер НЕ ТОТ 8-((( )
b) Если AfterSerialize, то тогда до SoapHeader уже не достучаться... 8-(( Он уже как бы упакован... Вот...
Помогите плиз... Или подскажите другой способ
|
|
|
|
|
Hello,
(this is not April 1st joke!)
I have a need to override certain non-virtual methods of System.IO.Sockets.Socket class (and create MySocket descendant of Socket class). As far as I know, this can be done by dynamic creation of code via Reflection.Emit. I am searching for some more or less real working samples or a person who can help me with doing the task (I am ready to pay reasonable sum for a working solution). Thanks in advance.
Eugene Mayevski
Cross-platform information exchange framework
http://www.msgconnect.com/
|
|
|
|
|
You can use the new keyword to override non-virtual methods in a derived class.
For example (C#):
class MySocket : System.Net.Sockets.Socket
{
public new void NonVirtualMethodName()
{
}
}
Does this help? If yes, then can you donate the "reasonable sum" to the British Heart Foundation please.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
|
|
|
|
|
Unfortunately, reintroducing the method doesn't solve any problems. What we need is to change behaviour of socket's Connect, Receive and Send methods to change the data that are being sent (this is for SSH tunneling and some other things). The idea is that the class, that knows how to use Socket, will be able to use our socket class. In this scenario the mentioned methods MUST be either virtual or our code should be executed instead of default method code (and our code will decide how to handle the request - pass it to previous version of code or handle internally). Frankly speaking, I don't understand how class designers could be SO blind and brainless to make the methods static. Such limitation makes it impossible to create any extension to socket class (and I can imagine many uses of such extensions).
Eugene Mayevski
Open-source cross-platform information exchange framework
http://www.msgconnect.com/
|
|
|
|
|
Eugene Mayeski wrote:
What we need is to change behaviour of socket's Connect, Receive and Send methods to change the data that are being sent
So what you are saying is that you want to change the behaviour in the actual Socket class rather than in a derived class. Is that right?
Also, what do you mean by change the data that is being sent? (I don't know much about SSH tunneling so this might be a naïve question) If you are trying to change IP and TCP headers then you can forget using .NET Sockets. A friend of mine has been doing his final year thesis at University using .NETs Sockets to change the IP header and gave up because .NET either transmitted two headers or replaced his header with its own. He eventually solved the problem with a hook into the system at the NDIS level.
Eugene Mayeski wrote:
Frankly speaking, I don't understand how class designers could be SO blind and brainless to make the methods static
By "static" you mean non-virtual because the methods are not actually static as in non-instance specific ("Shared" in VB.NET terminology)
As to the design of the class, and while I can't speak for the designers, I have noticed that many implementations that provide extra functionality on top of a Socket connection do so by wrapping the socket into the class as a field/member variable rather than deriving from it. This includes classes in the .NET Framework itself (such as TcpClient and TcpListener)
Anyway, sorry that I've not been able to be more helpful. If I have any more ideas I'll post another reply. In the meantime good luck.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
|
|
|
|
|
I have installed my application which is built in C#.NET in the client machine. I have used Set-Up Project for this. After then i have done slight modifications to my application and again i tried to reinstall the application. But it is giving the message like 'Another version of this project is already installed.Installation of this version cannot continue.To configure or remove the existing version of this product, Use Add/Remove Programs on the Control Panel'. Is there any way other than uninstalling and again installing the application.
Mahesh Dara.
|
|
|
|
|
Assuming that you didn't break any existing components and you didn't introduce any new components that aren't compiled into the assembly, you don't need to reinstall the application, just copy the new files over the old ones. If you have to use a setup project for some reason, you need to build the original setup project in a way that identifies that it can be updated and then create the subsequent releases as update packages. I know this is possible with installshield... I'm betting it works when you create setup projects as well. Otherwise, yes, you have to uninstall it and re-install it.
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
I had this problem when I was using wildcards in the AssemblyVersion. The way I solved it was as follows:
1. Created a class where the system constants are kept..
namespace myCo.Constants
{
public class SystemConstants
{
...
public const string SystemVersion = "2004.03.27.02";
...
}
}
2. Included the class in every AssemblyInfo file in the solution, and used the constant in the AssemblyVersion...
...
using myCo.Constants;
...
...
...
[assembly: AssemblyVersion(myCo.Constants.SystemConstants.SystemVersion)]
...
...
3. In the setup project for the app, I use the version number, converted as follows:
SystemVersion in Code Version In Setup
2004.03.27.02 04.03.2702
When the version is changed in the setup project, the system will give you a warning that the ProductCode and PackageCode should also be changed, and if you answer "Yes", the system will update them for you.
Also I have the "DetectNewerInstalledVersion" and "RemovePreviousVersions" set to true, that way the new version deletes any previous versions, but does not allow an older version to be installed.
Once we went to this procedure, I have never had a single problem with installs.
In my app, every time a version is released, a permanent copy of all the source is then archived, and the SystemVersion constant is updated accordingly, so is the setup project Version. Since the SystemVersion is in one place, it is easy to modify all of the assemblies, we have multiple setup projects, which are a bit of a pain, since I do them manually, but I do remember seeing an article here in CP that does the setup projects.
Hope this helps...
|
|
|
|
|
Thanks for your suggestion.
If i change the version no. of the setup project everytime when i rebuild then it's working fine i.e.,it is not giving any msg and it's reinstalling the whole application.
Upto here fine.but is there anyway to automate the process of changing the version number of setup project everytime when i rebuild.
|
|
|
|
|
I've done some printing in .NET by using PrintDocument and such. It worked grest when i just was printing some lists from database queries.
Now i have a RichTextBox, and want to print the content with all the text formatting (paper copies). Anybody know how to do this in an easy way?
|
|
|
|
|