|
|
Thanks for the clicky bits.
Ever notice that MSDN code samples don't display in FireFox as they do in IE (all the linebreaks seem removed in FF). Just a peeve directed as MS.
Thanks again for the correct and fast reply.
--G
|
|
|
|
|
Glenn E. Lanier II wrote:
Ever notice that MSDN code samples don't display in FireFox as they do in IE
Nope, I always use IE.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Hi all,
I'm having a bit of a problem. The company i am working for run some scheduling software on WINNT which runs programmes at specific times. We are about to start rolling out upgraded back office PC's to our shops and we are going to be using XP for the OS.
The problem is, as if you can't see this one coming , the scheduling software isn't working on XP!
I've been looking into staring external programmes from within a C# app which i could install to run as a service. When i'm trying to run EXE's there is no problem
System.Diagnostics.Process.Start("c:\\MyExe.exe");
but, one of the applications is a Dos application and it's ran via a batch file
Set IRISDATA=j:
XM IRIS7
Simply using the command System.Diagnostics.Process.Start("j:\\iris7.exe"); doesn't work.
The question is, how can i run the batch file from a c# app?
Kev Pearman MCAD
P.S. The J drive is already mapped correctly!
|
|
|
|
|
Hi Kev!
Batch files are run by the shell, so you could write:
<br />
System.Diagnostics.Process.Start("cmd.exe", "/k startiris.bat");<br />
Regards,
mav
|
|
|
|
|
Cheers Mav.
It didn't quite work but with some modifications to the batch files i wanted to run i got there in the end.
One more question though, the program can be made full screen by pressing Alt + Enter, anyway of running the batch file full screen at start up?
Kev Pearman MCAD
|
|
|
|
|
To determine how an external program is run you'll have to resort to a different Process.Start() overload using a ProcessStartInfo argument.
There you can specify the WindowStyle to use (Hidden, Maximized, Minimized, Normal).
mav
|
|
|
|
|
ok, this is for people that have worked with the infragistics web grid. Either this grid is a piece of crap or I have the serious case of stupids..either way all I need is a solution to my problem.
When I go in to add the rows to my datagrid from the front end the dataset does not persist. Let me explain myself.
AS i click the add button on the front end the grid inserts an empty row and triggers the add row row event. In the add row event i have the following code.
this.Retrieve();
DataTable _t = this._dsCateringRev.Tables[e.Row.Band.BaseTableName];
this._row = (DsCateringRev.CateringRevMinimumPeakRow)_t.NewRow();
_row.propid = System.Convert.ToInt32(this._hotel);
_row.appyear = System.Convert.ToInt32(this._processYear);
_row.RevType= "Peak";
//this._dsCateringRev.CateringRevMinimumPeak.Rows.Add( _row );
e.Row.DataKey = _row[_t.PrimaryKey[0]];
e.Row.Cells.FromKey(_t.PrimaryKey[0].ColumnName).Value = e.Row.DataKey;
this._dsCateringRev.CateringRevMinimumPeak.Rows.Add( _row );
This is more or less according the the sample app that came with the grid. Then the grid executes the updatecellbatch event. Here is the code for that:
DsCateringRev.CateringRevMinimumPeakRow row = null;
DataTable table=null;
//this.Retrieve();
object key=e.Cell.Row.DataKey;
table=this._dsCateringRev.Tables[e.Cell.Band.BaseTableName];
//Try to find the row that needs to be updated.
if (key!=null)
row = (DsCateringRev.CateringRevMinimumPeakRow)table.Rows.Find(key);
if(row!=null)
{
try
{
row[e.Cell.Column.Key] = e.Cell.Value;
}
catch( Exception _ex )
{
this._dsCateringRev.RejectChanges();
}
}
}
Well the problem is that the first time I rub this the dataset has the rows that i just added. On subsequent runs the dataset.datatable.rows.count = 0. In other words the dataset if empty.
Got any words of advice.
Thanks
Sameer
|
|
|
|
|
This question really belongs in the ASP.NET Forum[^]. Either that, or the Infragistics Support web site.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm trying to double buffer DrawThemeBackground with a number of other custom drawings to prevent flicker.
The problem is, OpenThemeData is a handle to a window.
If i use a parent window as the handle to open the theme, the child paints fine.
The bitmap HDC value is valid. But if I try to use the HDC to draw directly to the bitmap using windows theme, it just doesn't render.
If i draw onto the bitmap using just conventional graphics comands, these draw.
It's really frustrating as I'm out of options really. I Can't just think of any other way to do this.
<br />
private void CustomDrawThisControl(IntPtr pTHEME, Graphics g)<br />
{<br />
DBGraphics l_ClientDC = new DBGraphics(); <br />
l_ClientDC.CreateDoubleBuffer(this.Width, this.Height);<br />
IntPtr l_HDC = l_ClientDC.g.GetHdc();<br />
<br />
<br />
<br />
l_ClientDC.Render(g);<br />
<br />
l_ClientDC.g.ReleaseHdc(l_HDC);<br />
}<br />
I've used a modified version of norm.net's double buffering class. But it basicaly works the same.
If anyone has anymore ideas about this, i'd be appreciative.
Cheers
Cata
|
|
|
|
|
Is this inside your custom control?
You can override from Control class and in constructor do:
SetStyle(ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true);
that way all drawing you do in OnPaint will be drawn to buffer and then painted, thus you'll avoid flickering.
|
|
|
|
|
Yes, it's in my custom control.
I've tried this, but it makes the flickering worse and hides the icons and text that are drawn on top of it. This only happens when i'm drawing windows themes however, so i was going to manauly double buffer it first.
Any more ideas?
|
|
|
|
|
i have a simple application where i open a bitmap in a picture box,iadded near it a horizontal and vertical scroll bar.
How can i actually make the bars scroll through the picture in the picture box
thank you
|
|
|
|
|
Ill just tell you the easy unsophisticated way:
In your form, insert a panel.
In that panel, insert a picture box.
set panel.autoscroll to "true".
Then you should have a "scrollable" image.
Cheers
Sebastian
|
|
|
|
|
Like this:
...
this.panel1.Controls.Add(this.pictureBox1);
...
this.pictureBox1.Size = new System.Drawing.Size(pictureBox1.Image.Width,
pictureBox1.Image.Height);
this.panel1.AutoScroll = true;
...
These are the important lines.
The first line will add "pictureBox1" to "panel1" (it is now inside the panel)
The second line will set the pictureBox1.Size to the size of the loaded image.
The third line adds "AutoScroll" to the panel.
As soon as the panel is smaller than the image of the picturebox within, Scrollbars will appear.
Cheers
Sebastian
|
|
|
|
|
I have a problem with images in my application, I cant build them in.. it allways says:
************************************************************************************************
Eine nicht behandelte Ausnahme des Typs 'System.Resources.MissingManifestResourceException' ist in mscorlib.dll aufgetreten.
Zusätzliche Informationen: Für die angegebene Kultur (oder die neutrale Kultur) in der Assembly konnten keine Ressourcen gefunden werden. Stellen Sie sicher, dass 'Form1.resources' richtig in die Assembly 'NeckingRa' eingebettet wurde.
baseName: Form1 locationInfo: NeckingRa.Form1 resource file name: Form1.resources assembly: NeckingRa, Version=1.0.1706.20859, Culture=neutral, PublicKeyToken=null
*************************************************************************************************
Its in German, but someone maybe knews what is this about???
What should I do now? Please help me.
I am beginer so please explane it so I can understand
|
|
|
|
|
Are you using a setup project to deploy your app? if so just add the files to your setup project and tell it where to put them when you project gets installed. If not then you'll have to add them as resources.
Kev Pearman MCAD
|
|
|
|
|
No, I am not creating a Setup..
Im still working on app..
I changed my code and added
public struct PointD
{
public double x;
public double y;
}
public struct node
{
public string Name;
public ArrayList Lstates;
}
and my images were gone..
|
|
|
|
|
What images, you haven't shown any code with references to any images?
Show the code that references the images.
Kev Pearman MCAD
|
|
|
|
|
Adnan,
try putting your structs into separate files or after your class, this might help.
mav
|
|
|
|
|
Done, it works, thanks mav
thanks
|
|
|
|
|
I guess that as long as it works i doesn't matter but
why would putting your structs inside a class throw the above exception?
Kev Pearman MCAD
|
|
|
|
|
Well, I've seen some strange things happen when I've added private classes to some of my form-derived classes.
Basically, the visual designer stores some resources in .resx files (for example image data).
These XML-based files hold serialized data that can be retrieved by an object name (just add a picture box to a form and than look at what's generated in InitializeComponent() ).
If, by which means ever, such a resource cannot be found than the visual designer will choke and running the application will create an exception similar to what adnan wrote.
I think that he had introduced some naming conflicts, so removing the offending struct declarations from the .cs file fixed the way .NET accesses its embedded resource streams.
mav
|
|
|
|
|
hi,
I want to change the color of the scrollbars(horizontal and vertical) that appear with panel control (when I set autoscroll true) .if anyone knows how to set different styles to scrollbars of a (container) control in C#, pl let me know..
Thanks
|
|
|
|
|
Can any one help me out. I am trying to call an external .exe file whihc creates mpeg files in my project. Is there a efficient way to do so.
Thank you
pavan
|
|
|
|