|
N a v a n e e t h wrote: But AFAIK, GC won't consider the unmanaged resources. That's what they provided Dispose() to call explicitly. What do you think ?
That is correct. The GC does not know how to release unmanaged resources, which is the reason for using the Dispose pattern. If your class properly implements the pattern, then the resources would get released when the GC runs. The public Dispose method is available to help provide a more deterministic way to release the unmanaged memory.
If you want more details, check out this article[^].
|
|
|
|
|
HI,
i am trying to work with windows form....
Pardon me for asking such a basic question....
1)i have a text box and a combo box and a button in windows form......
when i click on the button i want the item selected in my combobox to displayed in the text box......what is the code for this?? i tried the following code "txtBranch.Text = cmbBranch.SelectedIndex();"
2)similarly if i add a datagrid to this i want the data grid to display this item selected in the combobox......what is the code for this??
3)if anybody can provide any link that will help me to get familiarise in windows controls that will be good....
thanking you
j
|
|
|
|
|
kabutar wrote: i tried the following code "txtBranch.Text = cmbBranch.SelectedIndex();"
Well, that won't work. The reason is that the selected index is a number. Also, it's a property, so the brackets are wrong. You would have got error messages explaining this. Try txtBranch.Text = cmbBranch.Text
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillionOneHundredAndFortySevenMillionFourHundredAndEightyThreeThousandSixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it )
|
|
|
|
|
Hi,
ThankYou it worked.......Thanks a lot......
i tried google to find links that will help me to learn windows forms myself...
but i cannot find anything......
if its not much trouble can you get me a link .....
thanks again
j
|
|
|
|
|
How do i Add new column to the table called as “Nature of Comment" in a existing page,in that there,it has a drop down box.The drops down fields are: Bug, Suggestion, Grammar, and Formatting.thks a lot.
-- modified at 1:55 Wednesday 24th October, 2007
alok2171
|
|
|
|
|
Sounds trivial to impliment. Which bit are you stuck on ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillionOneHundredAndFortySevenMillionFourHundredAndEightyThreeThousandSixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it )
|
|
|
|
|
alok2171 wrote: Addition of a new column to the table called as “Nature of Comment",in that there,it has a drop down box.The drops down fields are: Bug, Suggestion, Grammar, and Formatting.thks a lot.
What is your question ?
|
|
|
|
|
What kind of table are you talking about? An html table? An asp:Table control? A DataTable object? A database table?
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Hello experts...
I am developing a desktop application. In that I use some web services that will fetch the data from web. As we all know the data comes from web service in the XML format and So first I parse it and then save into the msaccess databse.
When I click on button1. The web service is called and it will connect to the server and download the data in XML format and then after parsing I save it into the DB.
As obious it will take some time. It may be depends upon the net speed aur amount of data etc. Now mean while the end user thinks the application is halted. So I want to create an progress bar that will shows the current status like
Opening connections
Connection to web site
parsing the XML
saving the data
closing connections
etc.
How can I do that...? I also try threading but unable to get proper result because I have to check what is going on the code (taking data from web,parsing or saving data into the db)
Please help me
Regards
Pankaj Joshi
|
|
|
|
|
You can do your webservice calls in a backgroundworker, and then it can call the main thread with progress info. Of course, you can't provide a progress bar during an single step, such as a web service call.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillionOneHundredAndFortySevenMillionFourHundredAndEightyThreeThousandSixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it )
|
|
|
|
|
If the Application is havy background operation, use BackgroundWorker
You can also use
private void SetProgressBar(int value)
{
this.progressBar1.Value = value;
Application.DoEvents();
}
When one event is end, just change the value of progress and lable message status.
means,
lblmessg.text="connecting........"
SetPogressBar(10)
SQL_Connection()
lblmessg.text="Connecting to web sites"
SetPogressBar(30)
Connect_WebSites()
......
Similary............... You can do....
But Backgorund Worker will be better
|
|
|
|
|
hi friends
i wanna store a image in ms access database and the code is
Aurigma.GraphicsMill.Bitmap bitmap =
new Aurigma.GraphicsMill.Bitmap(@"c:\mountain.jpg");
//Resize bitmap
bitmap.Transforms.Resize(bitmap.Width / 2, 0);
System.Data.OleDb.OleDbConnection connection =
new System.Data.OleDb.OleDbConnection(connectionString);
System.Data.OleDb.OleDbCommand command =
new System.Data.OleDb.OleDbCommand("INSERT INTO [Image](Image_Data) " +
"VALUES (?)", connection);
System.IO.MemoryStream stream = new System.IO.MemoryStream();
bitmap.Save(stream, new Aurigma.GraphicsMill.Codecs.JpegEncoderOptions(70, false));
byte[] imageData = stream.GetBuffer();
System.Data.OleDb.OleDbParameter parameter = new System.Data.OleDb.OleDbParameter(
"@Image_Data", System.Data.OleDb.OleDbType.LongVarBinary, imageData.Length);
parameter.Value = imageData;
command.Parameters.Add(parameter);
connection.Open();
command.ExecuteNonQuery();
connection.Close();
I am dynamically setting the background image of the label by using a property grid so is there anyway to get the address of the picture please let me know that
regards
sindhu tiwari
its me sid
|
|
|
|
|
Hello Experts,
I developed a desktop application using C#.net 2005.
I also have a digital certificate and I want to attach it with my assembly I.e. abc.exe.
In .net IDE at signing tab
1. I check the Sign the ClickOnce manifests
and in that I also select the appropriate certificate.
2. I also enter the right time stamp URL
and
3. I also sign the assembly with storng name using a .pfx File
When I build the application it builds successfully.
But when I right click the abc.exe file and see the properties of it,
It does not cointains any certificate..
Where I creating the problem please help....
Regards
Pankaj Joshi
|
|
|
|
|
Hello Experts,
I'm developing an desktop application in VS.net 2005. I make installer of it using Setup and deployment project in .Net.
In that I add Application launch shortcut, HTML help file launch Shortcut and uninstall shortcut.
Now I want to add one more shortcut that will open my home page...
How can I do that...?
Regards
Pankaj Joshi
|
|
|
|
|
pankaj.indore wrote: Now I want to add one more shortcut that will open my home page...
Create a internet shortcut file which navigates to your home page and add this to start menu
|
|
|
|
|
Thx for your reply,
For that I have to creat an new exe that will navigates to home page.
I don't want to create any more exe's.
Is their any method to directly navigate the page...?
Regards
Pankaj Joshi
|
|
|
|
|
I am not talking about exe. A single file, internet url shortcut, clicking on the file will open up the specified website
|
|
|
|
|
Hello sir,
It's working thx a lot.
Regards
Pankaj Joshi
|
|
|
|
|
Hi Pankaj
Please check my post !!!!
|
|
|
|
|
Hi Pankaj,
Use This one, I have done the same thing few times ago.. now it will help you.
Call Function
urlShortcutToDesktop("My Home Page ", myurl);
Function Defination
private void urlShortcutToDesktop(string linkName, string linkUrl)
{
string deskDir = Environment.GetFolderPathEnvironment.SpecialFolder.DesktopDirectory);
using (StreamWriter writer = new StreamWriter(deskDir + "\\" + linkName + ".url"))
{
writer.WriteLine("[InternetShortcut]");
writer.WriteLine("URL=" + linkUrl);
writer.WriteLine("IconIndex=0");
FileStream fs = new FileStream("C:\\Internet.ico", FileMode.Create);
Resource1.Internet.Save(fs);
fs.Close();
string icon = "C:\\Internet.ico";
writer.WriteLine("IconFile=" + icon);
writer.Flush();
}
}
internet.ico store in a Resource file, as Internet. AS i used Resource1.Internet.Save(fs); U can use this icon in ur own way also
Let me know when done.
|
|
|
|
|
Thx for your reply sir,
But I am querious where to write this code and how it works...?
I am asking to ad an web page short cut with my application like
Start>Programs>ABC Corp>
1. Application
2. Help file
3. Uninstall application
4. Home page
Please reply
Regards
Pankaj Joshi
|
|
|
|
|
ok, then create a simple internet shorcut file with your home page id and store it into Program menu path [ While Creating Setup ]
In Setup project.....
There is s Sesction "User's Program Menu" where you can put this link also with all others stuff.
Good luck !!!!
|
|
|
|
|
Abhijit Jana wrote: private void urlShortcutToDesktop(string linkName, string linkUrl)
{
string deskDir = Environment.GetFolderPathEnvironment.SpecialFolder.DesktopDirectory);
using (StreamWriter writer = new StreamWriter(deskDir + "\\" + linkName + ".url"))
{
writer.WriteLine("[InternetShortcut]");
writer.WriteLine("URL=" + linkUrl);
writer.WriteLine("IconIndex=0");
FileStream fs = new FileStream("C:\\Internet.ico", FileMode.Create);
Resource1.Internet.Save(fs);
fs.Close();
string icon = "C:\\Internet.ico";
writer.WriteLine("IconFile=" + icon);
writer.Flush();
}
}
WHY all these when we have an easy option for creating internet shortcut
|
|
|
|
|
can you please inform me how we can create shortcut?
Thanks in advance.
|
|
|
|
|
Because i have a problem when view in IE and Firefox. The result view in firefox don't give me what i need like i view in IE.By some experiment,i think it's about and .
Do firefox have a problem with <iframe> ?
Can i remove <!DOCTYPE> tag ?
another question..
Can i use javascript(outside tag <html>) to decide whic DOCTYPE version to use?
Thank =)
-- modified at 23:08 Tuesday 23rd October, 2007
|
|
|
|