|
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
|
|
|
|
|
Sorry ignore my previous post.
C:\Files\Download\tempunzip>install.bat
C:\Files\Download\tempunzip>gacutil.exe /if csgl.dll
'gacutil.exe' is not recognized as an internal or external command,
operable program or batch file.
C:\Files\Download\tempunzip>copy bin\csgl.native.dll C:\WINDOWS\System32
The system cannot find the path specified.
C:\Files\Download\tempunzip>copy bin\csgl.dll C:\WINDOWS\System32
The system cannot find the path specified.
C:\Files\Download\tempunzip>copy csgl.dll C:\WINDOWS\
1 file(s) copied.
C:\Files\Download\tempunzip>copy CSOpenGLLifeSaver.scr C:\WINDOWS\
1 file(s) copied.
So I see two issues here, both related to using a batch file to install with.
First I used Winzip and told it where to put the files so there is no "bin" folder the files are all in the same folder.
Second, you can find information on MSDN that states you are not to use Gacutil with installers. That is because it does not ship with the 2.0 runtime. And even on development machines like mine it is not found with a default command window environment. You have to open the the "Visual Studio Command Prompt" in the /tools menu for VS2005. It must set a environment path variable to the tools locations I suppose which is why it works.
Windows Install 2 has a built in Gacutil feature. The Visual Studio Installer project provides a very simple mechanism to put an assembly in the GAC. You should check it out.
led mike
|
|
|
|
|
So then when you put everything where it's supposed to go, does it work? I had the bin folder to seperate the two CsGL.dll files, which appear to be the same, but weren't acting the same. I'll make an installer and see what happens.
"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: does it work?
yes. Also csgl.dll will not install to the GAC since it is not strong named but the saver works without it being in the GAC. So an installer will solve your problems since installing things into SystemRoot and System32 is totally simple.
led mike
|
|
|
|
|
Jasmine2501 wrote: does it work?
Using the "Preview" button it worked the first time and then only once in the next 20 attempts so it is not yet stable. When it does not run as "expected" there is no error and the "preview" button is disabled until i move the mouse. A potential conclusion is that the saver is actually running but is not rendering or displaying it's window.
led mike
|
|
|
|
|
This assembly does not have a strong name... I may need to make my own build of it. The installer won't let me add it to the GAC without a strong name. What bugs me though is that it should be able to be used from the same folder as the application itself. On my machine where everything is working, this file is not in the GAC. I got it working on other machines using the batch file. These were machines that I had not messed around on, so they were fresh installs on systems that had never heard of CsGL... This is all very annoying because it's a really cool screensaver, and a really good demo of C# with OpenGL, but I can't even get a screenshot, so I'm the only person who has been able to enjoy it.
I have one major issue with using the installer project. I need to rename the output file from .exe to .scr, and the installer project doesn't seem to have an option for that. I was able to get around that issue with the batch file, and a post-build event, but the installer project doesn't see the .scr file, and instead it installs it as an .exe, which runs fine but won't function as a screensaver. If you rename the file to .scr, it works as expected. I'm working on that issue, and I'll post a response here when I have the installer working correctly. The installer program is only putting down two files, both into the "windows" folder... one csgl.dll and one copy of my .exe.
I used the installer project on another application and I have some issues with it, but I couldn't find any good documentation of all the options. If you know of any good links about that, I would greatly appreciate it. Thanks for all your help!
"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: but the installer project doesn't see the .scr file
What does that mean? You can add any file you want to an installer project. So you should be able to rename the .exe yourself and then add the .scr file to the installer project.
I don't think I ever stated this but I have my own screen saver authored as a native C++ application. It is old, let me see, 2001. I built the Windows Installer using an old MS Visual Studio 6 add in. From all apperances it is the same as the one bundled with the new VS. I renamed the file myself and then added it to the installer project.
led mike
|
|
|
|
|
OK I figured all that out. I used a post-build event to rename the file, then I pick up that file with the installer, instead of picking up the 'primary project output'. As for the issue with the thing freezing, it is possible that you have a version I put out there that had a performance issue, so it would freeze after a while and no longer notice the mouse movements. Performance was particularly bad if you had 'cubical' turned on, because I had inserted the background cube into my loop that draw the cells, so it was re-drawing the big cube hundreds of times... oops
I put up an installer file... let me know how that works. I'm getting reliable frame rates of 30-50 fps depending on settings. If you use really big numbers, it will use lots of memory, but there's no way around that really, since it does have to store data for each cell. Keep the 'size' under 300, and it should be ok.
LifeSaver Installer[^]
"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!
|
|
|
|
|
The installer works fine but the save still has the same erratic behavior I posted before. It runs the first time after installation. Most of the subsequent executions it does not display anything. The mouse cursor is hidden and upon mouse move it does return control back to the system as expected but there is no display of any kind. I got it work a few times after selecting other savers and running them but I cannot repeat that behavior consistently. It seems that after a time it will run again but I can't find anything consistent.
led mike
|
|
|
|
|
OK groovy
That's progress at least. I'll clean it all up a bit and see if maybe there's some non-destructed objects or something, then I'll post another installer later. Again, thanks very much for your help with this!
"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!
|
|
|
|
|
Well, I updated everything to be very clean, and I created a permanent page for this with links for the installers. Try the new version and let me know if you think I can unleash it on the public. I want to write that article...
http://www.smoothjazzy.com/prog_screensaver.htm[^]
"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!
|
|
|
|