|
hi
i want to use Progressbar in My Winform App.please help me that how to use it in my Winform app ?
(please give an example like copying file or ... only in winform app (not web base apps or web service or ...))
regards ...
|
|
|
|
|
msdn.microsoft.com will show you how to use a progress bar. The key point is, you can't use one for a process that you call atomically ( i.e. you can't call File.Copy and show a progress bar while that one statement runs, at least not accurately ) In either case, you need to do your action in a worker thread so that you UI is updated properly.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi all,
I new to C# and I are looking to write an app that will enumerate a range of IP addresses on a network IE: 192.168.1.1 to 192.168.1.254. I am having trouble with converting an IP address string to int32 and vice versa as the string is in a dotted decimal notation IE: 192.168.1.1
Any suggestions?
Many thanks in advance
|
|
|
|
|
You can call the split method on the string to get an array of strings, one for each number. Then convert.ToInt16 will work fine.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hi guys,
how can i get the window name of a program (e.g. MS Word) programatically? im using c#, and im using this in my program that ends/terminates an application based on data returned by some queries from a database.
i have no problems if i start a fresh instance of MS Word since i can have the window name hardcoded in my program (the default window name is "Document1 - Microsoft Word"), thus i can still close that application using my code. the problem is that when i open an existing file (thus the window name is dependent on the filename specified by the user), now when this happens, i cannot close the application since i cant get the window name dynamically. pls help.. tnx
|
|
|
|
|
Hi,
First get the active word application and iterate thru the Documents.
private void IterateWordDocs()
{
//Iterate docs
foreach (Microsoft.Office.Interop.Word.Document doc in WordApp.Documents)
{
//Your doc name
doc.Name == "YourDocName"
}
}
Regards
Gokul
|
|
|
|
|
You can use Process.GetProcesses to get the Process instances associated with MS Word and then use MainWindowTitle[^] to get the window titles.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi All,
I am interested in communicating with the USB device. I appriciate any code that would just enum all the USB deviced connection on my comp.
|
|
|
|
|
|
How can I debug attributes ?
I wrote a custom attribute for a control and I put a breakpoint in it but it does not stop in it.
the problem with the code is that it is invoked in design time (at design time of the project using my control).
is there a way to debug it ?
|
|
|
|
|
Dear all,
I need to know given a datatable wether it is sorted or not.
I need this to reverse the sorting (i.e. if it is sorted Asc make it Desc and vise verca)
Thank u alot.
Rania Adel
|
|
|
|
|
When you populate it use ORDER BY column ASC then store a boolean value with the datatable, e.g.
bool isSortedAsc = true; Then, if you need to flip the order you will know which order it is currently in by the Boolean flag.
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
Hi,
I have just learned about calling a dll method in runtime but unfortunately i could not see a successful result from the loaded dll. I got the error message, "Unable to find entry point "PostalCode" in dll "monster.dll"
I have used the following code.
[DllImport(@"C:\PRIO KOBITA\monster.dll",EntryPoint="PostalCode")]
public static extern string PostalCode(string htmlScript_Stripped);
and the dll Soure code is like,
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
using System.Data.SqlClient;
using System.IO;
namespace monster
{
public class applicationVariable
{
public string PostalCode(string bulkSource)
{
return "I am Postal code";
}
}
}
Would anyone please help me...
Emran
-- modified at 4:09 Saturday 18th February, 2006
|
|
|
|
|
If you want to call a method from .Net assebmly you dont have to use DllImport, you can juse use reflection (see System.Reflection namce space). Dllimport mainly used to interface with native dlls not .Net assebmly. For example if you want to open a file and get the file handle you may write something like
[DllImport("kernel32",CharSet=CharSet.Unicode,SetLastError=true)]
static extern unsafe int CreateFile(
string filename,
uint desiredAccess,
uint shareMode,
uint attributes,
uint creationDisposition,
uint flagsAndAttributes,
uint templateFile);
in your .Net code, and call this as like any other .Net methods.
Rao
|
|
|
|
|
Hi,
Thanks for the reply.
Can you please show me a snippet how to access my methods in a dll file which was created by me.
Thanks and regards
Emran
|
|
|
|
|
Hi All,
I need to add to my Form some table.
I need to arrange the info in this table in grid but i don't know how to do is.
I add ListView object to my form , but i can`t create grid in it to see in more clear way the info in it.
The info that i need to add to my table has no connection to database - so i cant use the example that are in here.
Thanks for any help.
|
|
|
|
|
|
question:
how to track any website name visited, visiting date,time,web pages visited by a user?using Dot net,is it possible ,if not what r the other techniques to make it possible?
Makarand Mannur
-- modified at 1:22 Saturday 18th February, 2006
|
|
|
|
|
Hi,
What is the difference between Agile and Extreme programming please?
Thanks
|
|
|
|
|
Extreme is a subset of Agile. In other words Extreme programming is a type of Agile software development.
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
Hello,
I am working on a project where i have to fill a recgangle on a panel against a button click.When the button is clicked it works fine the rectangle is drawn but the problem accours when i resize my form or some other form is open on it the drawing that is on the panel is wash out imen it is clered from the panel i am writing the code.If any one knows the solution plz let me know.
Thanks
Regards
Atif
public void btn_click(object sender,EventArgument e)
{
Graphics g=mypanel.CreatGraphic();
SolidBrush b=new SolidBursh(Color.Red);
g.FillRectanle(b,0,0,40,40);
}
|
|
|
|
|
assuming u'r working on a window's form application you should add code to the form paint event.
there are no facts, only interpretations
|
|
|
|
|
I want 2 know how 2 step up beyond the intermediate level in C#
Prynce
-- modified at 20:36 Friday 17th February, 2006
|
|
|
|
|
Program a lot, make a lot of mistakes and correct those mistakes.
|
|
|
|
|
- You can study the EMCA specs for CLI and C#.
- Data structures and algorhitms in C# (bruno preiss).
- Familiarise yourself with every single class in every assembly, starting with mscorlib.dll, use
Reflector to see what goes on inside.
- Read the MSDN docs for the classes u are not familiar with.
- Understand what can and cant be down (iow what you need to get the job done).
- Look at opensource implementations of the runtimes.
- Look how other languages integrate with C#/.NET.
- Learn the major technologies available in the .NET framework.
|
|
|
|