|
Banjo Ayorinde wrote: How do I resolve this
I would start by debugging
led mike
|
|
|
|
|
I want to make a transaction/entry in Microsoft Office Accounting 2007/2008 using C#.Net Application. Please give any idea about it.
|
|
|
|
|
dinker batra wrote: Please give any idea about it.
Are you an experienced software developer? If not get beginners books on Computer Science and Software Logic and Design.
Are you an experienced C# developer? If not get a beginners book on C# and .NET
Have you searched for any programming interface documentation for Microsoft Office Accounting? If not I recommend using Google and start every search phrase you try with MSDN , so an example would be: MSDN Office Accounting Object Model
led mike
|
|
|
|
|
|
HI,
I want to create a program so that I can determine if my website is down or up using C#.
Can any one give me an idea where to start. Any idea is greatly appreciated.
Thanks
Pavel
|
|
|
|
|
mdpavel wrote: Can any one give me an idea where to start.
class Program
{
static void Main(string[] args)
{
}
}
led mike
|
|
|
|
|
Vague question, but you can use tcpclient to extrapolate the status.
Namespace: System.Net.Sockets
|
|
|
|
|
Thanks Bert.
What I meant is "is there any way I can ping a website and know the status of the site?.Or anything else I can call that will tell me the status of the website(if it's up or down)?"
|
|
|
|
|
I would use tcpclient connect instead of a ping.
A ping to an ip address could just means it's responding (e.g a router) but doesn't mean the server is really active.
Connecting to an address/port/content means the server is serving content back to your client, so it's active and available.
|
|
|
|
|
hi
i want to set transparented gif images to my pictureBox, in code project, i found som article that write some methods and techniques to set transparent, like this (this is my code):
string gifPath = @"E:\Tutorial\FullComponent\Ajax Loader\ajax-loader.gif";<br />
Image gifImage = Image.FromFile(gifPath);<br />
Bitmap bm = new Bitmap(gifImage.Width, gifImage.Height, System.Drawing.Imaging.PixelFormat.Format8bppIndexed);<br />
<br />
System.Drawing.Imaging.ColorPalette pal = bm.Palette;<br />
for (int i = 0; i < pal.Entries.Length; i++)<br />
{<br />
Color col = pal.Entries[i];<br />
pal.Entries[i] = Color.FromArgb(0, col.R, col.G, col.B);<br />
}<br />
bm.Palette = pal;<br />
<br />
BitmapData src = ((Bitmap)gifImage).LockBits(new Rectangle(0, 0, gifImage.Width, gifImage.Height), ImageLockMode.ReadOnly, gifImage.PixelFormat);<br />
BitmapData dst = bm.LockBits(new Rectangle(0, 0, bm.Width, bm.Height),<br />
ImageLockMode.WriteOnly, bm.PixelFormat);<br />
<br />
((Bitmap)gifImage).UnlockBits(src);<br />
bm.UnlockBits(dst);<br />
<br />
System.IO.MemoryStream memStream = new System.IO.MemoryStream();<br />
bm.Save(memStream, ImageFormat.Gif); <br />
<br />
Image bitmap = Bitmap.FromStream(memStream);<br />
this.pictureBox1.Image = bitmap;
but in runTime, all of bitmap was removed and my pictureBox nothing display, how to solve my problem ?
thanks
|
|
|
|
|
Hello
I am wondering what the "best" method is to debug a Win - Service. I know about the following two:
1) Writing a Log - file to output the state of variables/ bugs encountered etc. (Very basic I know)
2) Start the service and then attach a debugger to it. (Better !!)
3) Try to debug the code in "Console - mode"
If anybody out there has any advice on another way to debug a windows service, then please let me know.
Thanking you in advance
ChristiaanS
ChristiaanS
|
|
|
|
|
There's no rule that says all of the code for a service has to be in the service project. I do everything I need to do in a dll assembly. Then I create a GUI that has a Start button and a Stop button. If it works correctly there, it will work correctly when I wire up OnStart and OnStop in the service.
Brent
Brent
|
|
|
|
|
Thats about how I do it too. I makes life easier
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Yep... but beware of using stuff in the DLL that won't work in a service. Such as the UI timer component (the server timer component will work, though). Sometimes violations of that rule aren't obvious....
--
Peter
|
|
|
|
|
|
Hey Guys
i need to filter the data in my DataGridView, when the window opens i query my db and bind the data to a data table and the to the data grid... this works just fine..
now the user must be able so filter these rows, here is my current code...
private void btnSearch_Click(object sender, EventArgs e)
{
DataTable filterTable = new DataTable();
string filterString = null;
string action = cmbAction.SelectedItem.ToString();
switch(action)
{
case"All":
filterString = "";
break;
case"Add":
filterString = "Action='add'";
break;
case"Edit":
filterString = "Action='edt'";
break;
case"Delete":
filterString = "Action='del'";
break;
}
DataRow[] filteredRowsArray = table.Select(filterString);
MessageBox.Show("Rows = " + filteredRowsArray.Length);
if (filteredRowsArray.Length == 0)
{
}
else
{
filterTable.Clear();
foreach (DataRow newRow in filteredRowsArray)
{
filterTable.ImportRow(newRow);
}
dataGridView.DataSource = filterTable;
}
}
everything is fine up untill i call filterTable.ImportRow(newRow) , i think its adding BLANK rows... if i foreach filterTable.Rows the rows are empty
i also tried filterTable.Rows.Add(newRow); but then it moans "This row already belongs to another table."
anybody hav some ideas?
Thanx
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)
|
|
|
|
|
hi...
what your thinking is rite.....
If the DataRow that is passed as a parameter is in a detached state, it is ignored, and no exception is thrown while importing the datarow...
Regards,
Sandeep Kumar.V
|
|
|
|
|
okay... then how do i get my desired result?
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)
|
|
|
|
|
I think instead of using
DataRow[] filteredRowsArray = table.Select(filterString);
and adding the above row to another table. You should use
DataView objdv = table.DefaultView;
and then Use objdv.RowFilter = filterstring.
It is more easy and fast compared to your above steps.
You can get more example on codeproject and google on it.
I think it will help u and may solve ur problem.
Sarvesh Upadhyay
Senior Software Engineer
Birlasoft India Ltd.
Microsoft Certified Professional Developer in Dotnet 2.0 Enterprise Application
|
|
|
|
|
Hey sarvesh
i came across the DataView class just after i posted my messages and did infact use it the way you just said and it worked
im gona try and use multiple conditions in the filterstring today, ill leave a post if i get stuck again
thanx for the reply...
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)
|
|
|
|
|
Hello,
Do someone can tell me what are the inconvenients of the method Application.DoEvents()
regards,
dghdfghdfghdfghdgh
|
|
|
|
|
It works well if your application only does one thing, but for more complex situations you may need the application to handle more than one operation at a time.
If you for example have two buttons in your application, and each button starts some kind of job and waits for the result, it doesn't work properly if you use a loop to wait for each job to finish with a DoEvents in the loop.
You can start both jobs, but when you start the second job, the waiting loop for the first job is paused, as the waiting loop for the second job is running in an event handler started by the DoEvents call inside the first loop. Therefore you will not see the result of the first job before the second job finishes.
A situation like that is typically handled using a timer instead.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
While debugging a c#.net project in vs2003, i am making changes in code but its not reflecting in application.
So, i delete the contents of debug & release folder presents inside bin folder.I read about this in this from few weeks back, to delete those contents.
Now after doing this when i rebuild the solution its giving error "post build event failed". So i checked with previous copy of solution And copies AfterBuild.Bat & PostBuildEvent.bat files from there, & it runs.
My question is:
->what information these files have in them?
->If VS builds them, then why files not get rebuild if i deleted them?
->Is copieng thme from previous solution is good idea?
|
|
|
|
|
I start a service on logon(written in C#.net). This service starts another process. My application has an interface with allows administrators to restart the service. However, when this service is restarted, it kills the child process launched from it. I want the child process to be alive even when the service is stopped on windows 2000. This issue exists only on windows 2000 by design.
Can any one help me out in this?
|
|
|
|
|
pranu_13 wrote: This issue exists only on windows 2000 by design.
That's the answer. If it's by design, I think it's not possible to work-around it.
|
|
|
|