|
Use P/Invoke to do this. See this[^] link.
/ravi
|
|
|
|
|
Hello,
I am not able to add the App.config file to Windows app.
Is assembly.cs a configuration file?
Regards,
Pavas
-----------------------
[http://longjump.com/]
Dynamic business applications that manage and coordinate teams and information
-----------------------
|
|
|
|
|
H,
Right click on solution explorer then select Add option in that New Item.
It will open dialog box in that, from last 3 rd option is Application config file. Select that option it will add App.config to solution.
pallavi
|
|
|
|
|
Oh thanks! I got it I was searching App.congif name...
Regards,
Pavas
-----------------------
[http://longjump.com/]
Dynamic business applications that manage and coordinate teams and information
-----------------------
|
|
|
|
|
Hello,
I'd like to write a decorator for a ListBox that draws the items in a ListBox on its own (e.g adding a border). More or less items dont need to be decorated and in these cases i want to use the default drawing routine for the particular item (e.g when specific conditions are not met).
So I'd like to know how i can call the default drawing routine from within the DrawItem-Event in case i dont want to draw the item on my own. Is there a way to skip the owner drawing of an item?
Thanks for any help on this.
Best regards
Trollpower
|
|
|
|
|
Hi,
My aim is to show a graphical grid on the window's form for alignments of labels ............n it must be show/hide type if any one knows how to do this please do let me know ...................regards
sindhu tiwari
Dont loose ur heart beat untill ur enemy dies
|
|
|
|
|
Hi all,
I do not know how can I refer objects from second(child) form.
example:
form f = new myform();
// Form f contents Label1
// I need to set some object properties at this form, for example Label1.text = "sometnihg"
f.Label1.text - it does not work.
Thank you very much.
daavena
|
|
|
|
|
|
hey passing values is a different stuff .............
if u have time try this ............make the label as public it will b in the form which contains label and then try to refer it ....it may come
its me sid
|
|
|
|
|
Hi,
I'm currently developing an application that requires that in a certain point, during the execution of some code from an event, to open a new Form.
The problem is that I need for the form that triggered the original event to be locked until the new form is closed, but if other forms are opened I don't want them to be locked (so I can't use ShowDialog).
The other obstacle is that there is code after the call to show the new form, that I want to execute only after that new form gets closed.
I'm currently doing an active wait until in a loop, executing Application.DoEvents until I have confirmation that the new form is closed but that is very inneficient (cpu stays at 100% usage).
Is there a more efficient way to do this?
Thanks in advance.
|
|
|
|
|
hi,
it will help you
1- create a public parameter of your first form in your second form
ex: inform 2 write
public Form1 frm1;
2- after you created the object of your second form(ex : Form2 frm2 = new Form2(); ), and befor showing the second form write this code:
ex: frm2.frm1 = this;
3- move the code you want execute afte closing your second form to different public methode
4- write this code in Closing event of your second form :
ex: this.frm1.(the public event)
or you can make a boolean property in your first form that shows the second form is open or not(you can use closing event of your second form to change the value of it)
and in set of the property call the methode wich include codes that you want to execute after closing your second form
PISHI#
|
|
|
|
|
I think I read about this somewhere in the past. I am trying to draw an image using the Graphics.DrawImage method in the Paint event. I want to do this to scroll a image in a panel. However, the Draw methods seem to cause the panel to clear, refresh, draw image and then refresh. This means there is a quick blink each time the control is invalidated. Is there a way to get around this in the Framework? Happens with a DrawLine also. I just want to draw over top of the existing contents.
|
|
|
|
|
Nevermind. Should have googled for flicker instead of blinking. Forgot about the whole double buffering deally.
|
|
|
|
|
Hi,
how can i do email validation in windows application
using vb.net
|
|
|
|
|
|
Hello everybody.
I have a base form "A" with two buttons. This form i inherited to form "B" and saved the project. Now for example if i add one more button to "A", it is not reflecting in form "B". I closed and opened "B" but still it is showing only two buttons. What to do for changes in "A" reflect in "B".
I am using VS 2005, C#.
Thanks
|
|
|
|
|
Hi,
if you add a Control to FormA inside its constructor (either programmatically or through
Visual Designer), it will be present in every instance of FormA, as well as in every
instance of FormB which inherits from FormA.
if you programmatically add a Control to an instance of FormA after it has been constructed,
then its FormA and FormB sibblings would not know this.
If none of the above seem to fit, please explain more and/or show the essential parts
of your code.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hi,
I want to display a background text in a treeview if there is no nodes in the tree, just like the light gray text in the searchfield in the upperright corner of IE 7.
Does anybody have an idea how to achieve this?
|
|
|
|
|
This article[^] explains how to do it with a ListView, but the concepts are the same. The implementation make work as is, after you change the base class to TreeView though.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Thanks a lot! I'll test this concept.
/ Erik
|
|
|
|
|
hello,
i want to send a net sent "test" message to a computer on the LAN by running a batch file.
Would anyone tell me the code for the required batch file, thanx in advance.
regards,
vat2do
|
|
|
|
|
Batch files are not written in C# or VB.NET, as far as I know. This means you're in the wrong forum.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I have a windows application and service. i have to monitor the service startuptype from windows application. Can any one help me in this regard.
thanks in advance
Sivakumar.V
i am software developer of Omnicell India Pvt Ltd at Bangalore
|
|
|
|
|
The ServiceController class gets you some of the service's info, but not the startup type. For that you will need to get the Handle[^] for the service to monitor and get the startup type yourself using QueryServiceConfig[^].
pinvoke.net has signature for it[^] (see the sample at the bottom).
Be sure to Dispose/Close the handle when you are done with it. It will be cleaned up automatically, but it's better to do it yourself.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
i have a class that extends the window UIElement
class MyWindow : window{
..yada yada...
}
inside MyWindow, i use a DockPanel to Dock an instance of MyGrid:
class MyGrid : Grid{
.. yada yada ...
}
inside the grid i dynamically create a bunch of TextBox()'es that gets and sets some values of an object.
MyWindow has some overrides of KeyUp and KeyDown events that i manage, for instance i campture when CTRL-keys are pressed and other stuff
my problem is that if i change a value in one of the TextBox'es, then MyWindow looses Focus (i think) -- the KeyUp and Down events are nomore being captured
one thing which is important, is that i have a Blur() method on MyGrid that removes the TextBox'es and other stuff whenever an object is de-selected from MyWindow
MyGrid.Blur(){
ColumnDefinitions.Clear();
RowDefinitions.Clear();
Children.Clear();
}
this method causes the docked grid to disapear, but the keyboard is still writing to the last (now not existing) TextBox()
What to do ???
|
|
|
|