|
kalaveer wrote: private void Form1_Load(object sender, EventArgs e)
{
st = "MY PROPERTY";
}
kalaveer wrote:
Form1 f = new Form1();
MessageBox.Show(f.s);
You have initialised your variable when the Form Loads (Form_LOad event). This event is fired when the form is loaded (ie. displayed). As you have not shown your form your property has not been set
Form1 f = new Form1();<br />
f.Show();
MessageBox.Show(f.s);
|
|
|
|
|
Wow thats working but it displaying the form again how can i avoid this.
my first form already visible and with f.show() its displayed again i tried to make invisible but by setting visible property to false not working as f.show is just opposite of hiding na
please suggest
|
|
|
|
|
kalaveer wrote: Wow thats working but it displaying the form again how can i avoid this.
As I already explained, you need a reference to the existing form, not creating a new one.
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
In your example, the Form_Load event has not been fired. You need to set the value in the constructor based on your logic.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Error while trying to running project: Unable to start debugging on the web server. you don not have permissions to debug the server.
verify that you are the member of the 'Debugger User' Groups on the webserver.
this is haneef
|
|
|
|
|
you have to be an administrator and/or add ur user name to the debugger users group,then only u can debug
"Change is the only constant thing in life
Either or survive or get extinct"
|
|
|
|
|
verify that you are the member of the 'Debugger User' Groups on the webserver
|
|
|
|
|
I have my windows application (C#) ready.
But whenever application shows a error message box,beep sound occurs.
I just want to disable this beep sound for message box at application level with minimum code changes.
Can u suggest me some way.
|
|
|
|
|
chravisankar wrote: i know this is not a relevant post here ,but please do not abuse like john.
this is in continuation with my previous post,
I have posted this because, i have seen in one of the posts here,some one has asked a question(NOT ME!),(i have neverasked anyone "urgent"). and people instead of answering him asked him not to put such posts.
People who abused me in filthy language,do not throw your words,it will ultimately harm you one day.i am a proud indian.people who abuse india,like john better abuse their own people
Urgent is a good way to anger people on this site, if you haven't already noticed. Another no-no is to cross post the forums
If you try to write that in English, I might be able to understand more than a fraction of it. - Guffa
|
|
|
|
|
i agree!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Check it out, the OP deleted the thread but I have the message in my post :->
Some people have a memory and an attention span, you should try them out one day. - Jeremy Falcon
|
|
|
|
|
PaulC1972 wrote: That is why I make the attempt to put the question into my reply. Then they can delete it all they want but their question still sits there in my reply
thank you paul
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hi there,
I hope that every .net programmer knows about app.ico. If not then create a windows application in c# and check out the working folder. You could see such a file there. This file is the picture file that is displayed in the exe file(check out debug folder of your application). Now what i need is, i want to change this app.ico through c# coding. Is it possible for changing the application icon at runtime without re-compiling? When i mention a .ico file, at runtime, this new .ico file should replace the existing default app.ico file and my .exe file in debug folder should also posses this image. How can this be made?
|
|
|
|
|
ok this is the fact, first you can do that for a very simple way, for instance:
System .Drawing .Icon nuevo=new Icon (@"D:\MyIconDirection.ico");
Random manual=new Random ();
int p = manual.Next (2);
if (p == 1)
base.Icon=nuevo;
else
base.Icon=null;
and I dont know, you can use for repeat that many times, a timer, thread, delegate to do that ashyncrons , you choose...
for any question or another think write me...
|
|
|
|
|
when the user clicks on a cell of the data grid, the entire row should get selected. how do i do it?
|
|
|
|
|
Set the SelectionMode property to FullRowSelect .
|
|
|
|
|
Private Sub datagrid_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles datagrid.CurrentCellChanged
dim cellcode as string= datagrid.Item(datagrid.CurrentRowIndex, 0<<
|
|
|
|
|
The following code work, but for any reason, the data did not save on the table. I can look at the data on the grid, but it is not saved.
<br />
table1TableAdapter.Insert("name1", "name2", "name3");<br />
table1TableAdapter.Update(db1DataSet1.Table1);<br />
the data did not save on the table. I want to know why and how to fix it.
|
|
|
|
|
The datble did update. There was a directory problem. Visual studio keeps two copy of the database and only one was updated.
The only problem is that it keeps updating on the same row. I want it to update the nextrow thereafter.
|
|
|
|
|
See this.[^] I got a nice OpenGL/C# screensaver working but it won't run on other machines. Has anyone had this problem?
I'm using CsGL [^] to do my OpenGL stuff. The app works fine on my machine at home and on my office machine which both have VS2005. It doesn't work on another machine in the office which also has VS2005, even after I installed CSGL on that machine. On that machine, it runs for a bit and then freezes, making strange flashes, but it wakes up and quits when you move the mouse, so I don't think it's crashed. On two machines of some groovy CP folks, there is a System.TypeInitializationException when they try to preview the screensaver, but the options box works fine. This happens even after they installed CsGL from the SourceForge site.
What could be causing the Exception? It's failing somewhere in here...
this.view = new JazzyOpenGL.MyGLView();
this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true);<br />
this.Capture = true;<br />
<br />
Cursor.Hide();<br />
Bounds = Screen.PrimaryScreen.Bounds;<br />
WindowState = FormWindowState.Maximized;<br />
ShowInTaskbar = false;<br />
DoubleBuffered = true;<br />
BackgroundImageLayout = ImageLayout.Stretch;<br />
this.view.Parent = this;<br />
this.view.Dock = DockStyle.Fill; <br />
<br />
I would bet it's failing on that first line, but how could it be messing this up, when the DLL for that is right there in the same folder? How can I make an installer that will put this DLL where it can never be lost?
"Quality Software since 1983!" http://www.smoothjazzy.com/ - see the "Programming" section for (freeware) JazzySiteMaps, a simple application to generate .Net and Google-style sitemaps!
|
|
|
|
|
Jasmine2501 wrote: this DLL
Have you run Depends on the DLL?
led mike
|
|
|
|
|
Yeah it depends only on the MSCoree.dll. I'm assuming that's going to be present on most machines.
I think I have a conflict though... there's two DLLs that end up being called "CSGL.dll", one is from the CsGL library, but the other is generated by visual studio. They have to be in the right places... the first one goes in the system32, but the VS-generated one goes in the same folder as the screen saver file... working on a batch file to do all that.
"Quality Software since 1983!" http://www.smoothjazzy.com/ - see the "Programming" section for (freeware) JazzySiteMaps, a simple application to generate .Net and Google-style sitemaps!
|
|
|
|
|
Jasmine2501 wrote: working on a batch file to do all that.
Batch file? Do you use VS2005? (yes you do). It has Windows Installer Project Type. Very easy to build a small installer like this with.
led mike
|
|
|
|
|
|
Not there yet.
An unhandled exception of type 'System.TypeInitializationException' occurred in csgl.dll
Additional information: The type initializer for 'CsGL.OSLib' threw an exception.
The InnerException might contain more revealing information.
led mike
|
|
|
|