|
Thanks N a v a n e e t h,
Question answered.
regards,
George
|
|
|
|
|
Considering the number of questions of this type you keep asking, and your lack of acceptance when you are given a good answer, why not go out and buy yourself a book on C#. Most of you questions are about subjects that, in the real world of programming, make very little difference to anyone - the amount of bloat that MS build into their systems means that the odd little tweak you can do by worrying about what MSIL is generated are really meaningless. If performance worries you, good coding practice and structure will give bigger gains that worrying about a few extra lines of MSIL.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
|
hy everyone!
i do have a strange problem maybe someone of you knows a solution to this or a good way to find out:
i do have a console application (parser) which reads from file, splits the input if necessary and writes the data to outputfiles. the number of outputfiles depends on the input type, meaning if the file is split into parts then there are as many outputfiles as there are parts.
the program searches a directory using a search pattern, then splits the file if necessary and performes the parsing and inserts data which match the tokens in the output template and renames the final file from tmp to the final extension.
sounds easy. on my system it works well (Vista, Visual Studio 2005).
But when I execute the program on a Win2003 Server it looks like some parts of the code are left behind.
e.g. i do have two files, the first one is split into two parts, but i do only get one output file. a second file which is parsed afterwards (the instance is still running because i first read all filenames which match the pattern) and is not split returns the one outputfile.
so somewhere the second outputfile of the first inputfile is lost, the program doesn't crash it doesn't write a failure into log (because i write a log entry when starting, when finishing and when an exception occures). the start logentry is in the logfile, but no failure nore the finish entry. but both files are moved to the success folder and not to the error folder, so it looks like it was parsed correctly. but after the move statement in the code the logmessage is insert into the logfile. so the code has to be used because the one file is there as well.
so to me it looks like as if the parser just sends some input to nirvana and not to the output or "ignores" parts of the code.
and the strange thing is, when i run the program on my vista machine, everything is ok.
well, the main problem in my case is, i can't install Visual Studio on the server because it is not mine, it's a client's machine i programmed the parser with. so my first idea would be to insert logfile entries when entering one of my functions and one when leaving to see, when the operation suddenly stopps.
did anyone of you encounter similar problems during coding console applications in circumstances like me? or does anyone of you have a hint on which could be the reason to help me solve this strange behaviour more quickly?
thanks for any advice and hints, because i nevery had behaviours like this before. all my programs i coded bevour could be used no matter which operating system or hardware was used. and as i described above, why is the operation successful on the one hand side and on the other side it is not because the output is lost somewhere?!
stephan.
|
|
|
|
|
No idea. But make sure that .net is updated?
|
|
|
|
|
Multiple combo-boxes are being populated using a single Access database.........but everytime I select any of the combo-box, the values in all other combo boxes also changes accordingly........since I want to generate a report using multiple selections of combo-box I want all combo-boxes to have different values of my choice.......how can i do that.........pls help me out.......!!!
- Thanks
|
|
|
|
|
Use multiple data sources, not just one.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Do you know where I can find a list of all compiler warnings associated with each compiler warning level?
For example, Warning Level 1 is associated with CS0657, CS0658, CS0659....
|
|
|
|
|
|
Yeah - That is the information that I am looking for.
However, I need the warnings in more of a spreadsheet format for easy reference.
The format of the information at the url requires me to click on the compiler code in order to see the compiler message. I need to see that information on the same page.
|
|
|
|
|
I have to select multiple rows from datagrid and want to drop it into tree.Below code is working fine for selecting one row and adding it into tree but how to implement multiple selected rows ??? where can I apply a loop ???I am new to C#.
Thanks
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Tree DragDrop
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
private void treeView_DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
{
if (e.Data.GetDataPresent("System.Data.DataRowView", false))
{
Point pt = ((TreeView)sender).PointToClient(new Point(e.X, e.Y));
TreeNode DestinationNode = ((TreeView)sender).GetNodeAt(pt);
DataRowView view = (DataRowView)e.Data.GetData("System.Data.DataRowView");
DestinationNode.Nodes.Add(new TreeNode(view.Row[0].ToString()));
DestinationNode.Expand();
}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Datagrid DragDrop
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void dgview1_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
DataGridView.HitTestInfo info = dgview1.HitTest(e.X, e.Y);
if (info.RowIndex >= 0)
{
DataRowView view = (DataRowView)dgview1.Rows[info.RowIndex].DataBoundItem;
if (view != null)
dgview1.DoDragDrop(view, DragDropEffects.Copy);
}
}
}
|
|
|
|
|
Hi - I have a MonthCalendar control which displays 12 months and all I'd like to do now is print the stupid thing. Is there anyway to accomplish this?
|
|
|
|
|
You could manually write a print routine (good luck ). Or you could try creating html or rtf code and print the contents from a richtextbox or a webbrowser control. Or you could look into screen capture and printing screen captures.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
I ended up just printing the screen:
void btnPrintCalendarClick(object sender, EventArgs e)
{
graphics = this.calendar1.CreateGraphics();
Size _size = this.panel1.Size;
calendarBmp = new Bitmap(_size.Width, _size.Height, graphics);
this.calendar1.DrawToBitmap(calendarBmp, this.calendar1.Bounds);
PrintPreviewDialog pvw = new PrintPreviewDialog();
pvw.Document = this.printDocument1;
pvw.ShowDialog();
}
void PrintDocument1PrintPage(object sender, PrintPageEventArgs e)
{
e.Graphics.DrawImage(calendarBmp, 0, 0);
}
|
|
|
|
|
Hi,
I have a two part question, can be written in either C++ or C#
1. How to figure out which versions of VC++ runtime installed on the computer?
2. How do I write a bootsrap program that checks if Visual C++ 2008 Libraries installed or not and then goes and install Visual C++ 2008 Redistributable Package if not installed?
Thanks
Ben
|
|
|
|
|
1. IIRC, there's a Windows Side by Side (SxS) "assembly cache" for native dlls that might contain this information. Ask in the C++ forums for more info.
2. There's already a bootstrapper package in Visual Studio 2008 for this. See \Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages. Or, if you're building your own setup program inside Visual Studio, right-click on your setup project, Add Merge Module, then it will list the VC 2008 modules to include.
Life, family, faith: Give me a visit.
From my latest post: "A lot of Christians struggle, perhaps at a subconscious level, about the phrase "God of Israel". After all, Israel's God is the God of Judaism, is He not? And the God of Christianity is not the God of Judaism, right?"
Judah Himango
|
|
|
|
|
How can I control the types of warning that VS2008 displays?
For example, the compiler currently warns of public members without comments. I want to supress this warning. How can I do that in VS?
|
|
|
|
|
In your project properties under "Build" you can set the warning level of the compiler (0-4) and also enter a list of warning numbers to suppress.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
If that one is bothering you, turn off XML Documentation in the Project->Settings->Build options.
Scott P
“It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.”
-Edsger Dijkstra
|
|
|
|
|
OK - So when I select a project in the Solution Explorer, I can select Project > [Project Name] Properties... from the VS menu. Then I can select the "Build" side tab and update the "Errors and warnings" section to suppress the comment warnings.
This is good. However, my solution has 10 projects so I would like to configure this setting at the solution level. Do you know if this is possible?
|
|
|
|
|
Not that I know of. It's on a project by project basis. You could put the XML comments in....
Scott P
“It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.”
-Edsger Dijkstra
|
|
|
|
|
In my previous topic I asked how to create more Labels with a button,
That works now, but. How do I make it so, that if I click on one a textbox needs to change.
This is impossable with my current code(?)
Thanks in advance.
|
|
|
|
|
So what you want to do is clicking on a label needs to change the text inside a TextBox?
If that's what you're trying to do, just hook up the LinkClicked event of the label, and inside the handler, set the text of the TextBox.
Life, family, faith: Give me a visit.
From my latest post: "A lot of Christians struggle, perhaps at a subconscious level, about the phrase "God of Israel". After all, Israel's God is the God of Judaism, is He not? And the God of Christianity is not the God of Judaism, right?"
Judah Himango
|
|
|
|
|
private void CreateTextButton(string text)
{
int StartLocationX = 212;
int SpaceBetweenButtons = 5;
int NewPositionX;
if (LastPositionX != 0)
{
NewPositionX = LastPositionX + NPCTextButton.Width + SpaceBetweenButtons;
}
else
{
NewPositionX = StartLocationX;
}
this.NPCTextButton = new System.Windows.Forms.Label();
this.NPCTextButton.AutoSize = true;
this.NPCTextButton.BackColor = System.Drawing.Color.Transparent;
this.NPCTextButton.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.NPCTextButton.Location = new System.Drawing.Point(NewPositionX, PosY);
this.NPCTextButton.Name = text;
this.NPCTextButton.Size = new System.Drawing.Size(32, 16);
this.NPCTextButton.TabIndex = 4;
this.NPCTextButton.Text = text;
this.NPCTextButton.Click += new EventHandler(NPCTextButton_Click);
this.pictureBox1.Controls.Add(NPCTextButton);
this.NPCTextButton.BackColor = Color.FromArgb(0, NPCTextButton.BackColor);
LastPositionX = NewPositionX;
if (LastPositionX >= 452)
{
PosY += 24;
LastPositionX = 0;
}
NPCText.Text = NewPositionX.ToString();
}
NPCTextButton.Text returns me the 'newest' value created.
So, how can i check which one is clicked?
Thanks.
|
|
|
|
|
The sender argument of the event handler will be the one that was clicked.
Life, family, faith: Give me a visit.
From my latest post: "A lot of Christians struggle, perhaps at a subconscious level, about the phrase "God of Israel". After all, Israel's God is the God of Judaism, is He not? And the God of Christianity is not the God of Judaism, right?"
Judah Himango
|
|
|
|