|
Please read some basic books and please do not spam the forums with your questions. You are asking things that show you're at a level below beginner, you have no idea at all of what you're doing, or what the technologies you're using are for, or what they do.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
@ Christian Graus
Thankyou so much for your kind information...
|
|
|
|
|
Or you could at least try to work the google on the interweb.
Try This[^]
If at first you don't succeed ... post it on The Code Project and Pray.
|
|
|
|
|
Hi,
I have a Windows Application that contains 3 Comboboxes that's being populated by a SQL database. Those 3 boxes are "Countries", "States" and "Suburbs". I want to code the Comboboxes so that when you select a country, the state combobox will display states for that country and when you select a state you should be able to select a suburb within the selected state.
How can I go about doing this?
Thank you!!
Illegal Operation
|
|
|
|
|
Handle the comboboxes selection changed event and bind the next combo. If you use DataBinding, just update the datasource and control will reload items automatically.
|
|
|
|
|
Write IndexChanged Event for country and states dropdown. When you change the country dropdown index get all the associated states from the db and re-bind it to the state dropdown. Similarly when you change the state dropdown get all the related suburbs for that state from the db and re-bind it to suburbs dropdown.
Use valuemember and displaymember, so that it will be easy to fetch from the db.
Regards,
Prakash N
|
|
|
|
|
hi,
i am new to this type of implementation what i need to solve is:
[gevec,geval] = eig(inv(S) * C); (this in matlab, i wish to do it in c#)
where S and c are 2-d matrices i have computed the value for.
Please let me know how can i solve this. Is there any library that can be of help...
Thanks...
|
|
|
|
|
I have no idea what you're trying to do here. You need to break this down into individual functions, and then look for hte C# equivelant. If the [gevec, geval] part is selecting a pixel value, read my image processing articles for details on how to do that in C#.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi if you could please let me know of some library that helps in solving matrices like the inverse of a 2-d matrix.
thanks
|
|
|
|
|
There are matrix classes built in to C#
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
foreach (Control control in crystalReportViewer1.Controls)
{
if (control is CrystalDecisions.Windows.Forms.PageView)
{
TabControl tab = (TabControl)((CrystalDecisions.Windows.Forms.PageView)control).Controls[0];
tab.ItemSize = new Size(0, 1); //for delete
tab.TabPages[0].Text = "گزارش";// for rename
tab.SizeMode = TabSizeMode.Fixed;
tab.Appearance = TabAppearance.Buttons;
}
}
|
|
|
|
|
|
Hi people
I was wondering whether anyone knew what button is used in Visual Studio as the "New" button? It looks like a normal button, but with a drop down next to it. I want to use a similar button in my application
Thanks
|
|
|
|
|
that is a menustrip. just look at toolbox -> menus & toolbars.
|
|
|
|
|
Add MenuStrip to your Project, then right click on it and click "Insert Standard Items"
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Sorry guys, I didn't mention that I'm using WPF and MenuStrip is not available then. Didn't want to post this in the WPF forums cuz it seemed more like a general question. Can I maybe add a reference to Windows Forms or something to enable the Menustrip to work in WPF?
|
|
|
|
|
http://msdn.microsoft.com/en-us/library/ms750559.aspx
|
|
|
|
|
I have a VS2005 web project that provides file content download. Since some files are large I want to be able to pause/resume the download. I have added the 'Range' header and byte marker but am getting two problems:
1) File name is getting corrupted with a ',' comma character on the end of the file name (i.e. 'File.zip' shows in the save dialog as 'file.zip,' - could this be a cached file name suggestion?
2) The resume won't fire (possibly due to problem 1)
Environment is IIS6, VS2k5/C#/ASPX.
Have tried with FireFox (3.5.2) and Internet Download manager.
Here's the code - TIA
<br />
if (File.Exists(strFilePath))<br />
{<br />
byte[] buffer = new byte[Int32.Parse(Config.Settings["bufferSize"])];<br />
int length;<br />
long dataToRead, dataLength, bytesDownloaded;<br />
long start = 0;<br />
<br />
string range = Request.Headers["Range"];<br />
if (range != null)<br />
{<br />
range = range.Replace("bytes=", "");<br />
range = range.Substring(0, range.IndexOf("-"));<br />
start = Int64.Parse(range);<br />
}<br />
Response.Expires = 0;<br />
bytesDownloaded = 0;<br />
using (FileStream dlStream = new FileStream(strFilePath, FileMode.Open, FileAccess.Read, FileShare.Read))<br />
{<br />
if (start > 0)<br />
{<br />
dlStream.Seek(start, SeekOrigin.Begin);<br />
dataToRead = dlStream.Length - start;<br />
}<br />
else<br />
{ dataToRead = dlStream.Length; }<br />
dataLength = dataToRead;<br />
Response.AddHeader("Content-Disposition", "attachment; filename=\"" + dlStream.Name.Substring(dlStream.Name.LastIndexOf(@"\") + 1) + "\"");<br />
Response.AddHeader("Content-Length", dlStream.Length.ToString());<br />
length = dlStream.Read(buffer, 0, Int32.Parse(Config.Settings["bufferSize"]));<br />
while (dataToRead > 0)<br />
{<br />
if (Response.IsClientConnected)<br />
{<br />
Response.OutputStream.Write(buffer, 0, length);<br />
bytesDownloaded += length;<br />
Response.Flush();<br />
buffer = new byte[Int32.Parse(Config.Settings["bufferSize"])];<br />
dataToRead -= length;<br />
}<br />
else<br />
{ break; }<br />
}<br />
try <br />
{ dlStream.Close(); }<br />
catch<br />
{<br />
if (dlStream != null)<br />
{<br />
_errors.SendErrorEmail("download.aspx", "failed to close the file stream when user " + objUser.LoginID + " attempted to download " + strFilePath + ".", objUser);<br />
}<br />
}<br />
}<br />
<br /> ;
Thank you for taking the time to look at this
Tom
|
|
|
|
|
TCHamilton wrote: Since some files are large I want to be able to pause/resume the download.
In that case, why not check out the Background Intelligent Transfer Service[^]?
"I do not care if it works on your system, I am not gonna ship your computer."
|
|
|
|
|
Hi Eddy,
I'm not familiar yet with BITS - will explore now. The issue really is how/what's missing in my attempt to facilitate 'resume a paused download...'
Web site is public facing that supports various browsers - I've been asked to make sure it can handle IE6 and Safari primarily, not sure if BITS is relevent in that context. I'm sure the target browser limitation will relax, but first I need to get 'resume' to work.
Tom
|
|
|
|
|
Check this post. This might help.
|
|
|
|
|
Still having problem - unable to set the Response Headers :
Response.AddHeader("Content-Disposition", "attachment; filename=" + Convert.ToString(Server.UrlDecode(Request["FileName"])));
Response.AddHeader("Content-Length", dlStream.Length.ToString());
The system gives message that:
Headers: 'Response.Headers' threw an exception of type 'System.PlatformNotSupportedException'
The system is Win2k3 IIS6. VS2k5
Confused...
Thank you for any help or suggestions
Tom
|
|
|
|
|
Well, mystery solved - response headers were being set, just not obvious with IIS 6, have to track them down via DEBUG/Watch with code that can enum the Custom Header array
((System.Web.HttpResponseHeader)((new System.Collections.ArrayList.ArrayListDebugView(Response._customHeaders)).Items[0])).Name "Accept-Ranges"<br />
((System.Web.HttpResponseHeader)((new System.Collections.ArrayList.ArrayListDebugView(Response._customHeaders)).Items[0])).Value "bytes"
Able to verify Header set, and respond to resume download 'Range'
Thanks all
Tom
|
|
|
|
|
I'm starting a new project and just had a few questions. Please excuse me if these seem trivial, but I have just recently taken on programming in Windows as a career. Although, I know more than enough to be dangerous.
1. This project is set to be complete Feb 1. VS2010 should be out by then. Should I used the beta version now to develop with or use VS2008 and upgrade the project when it comes out?
2. This project is porting our current application written in VB6 to C#. Are there any methods, best practices, or tools that might be helpful or make the transition easier?
3. I'd like to use WPF just because it seems like the new front end for MS, plus I like all new graphical features it brings to the table. I've been hearing a lot about if you're using WPF you should consider MVVM. Is it worth implementing MVVM now or is it something that can be done later? I realize it's always better to do it now, but I don't know much about it (although I have bookmarked Sacha Barber's articles). I don't want to jeopardize the release date for something that will not affect the user or functionality of the machine (it's an automated tooling machine). I've got several user controls that I need to update as well. Some of them are very fancy user input controls. Should this affect my decision?
Thanks for your help and suggestions. I appreciate it.
Brad
Deja Moo - When you feel like you've heard the same bull before.
|
|
|
|
|
BRShroyer wrote: 1. This project is set to be complete Feb 1. VS2010 should be out by then. Should I used the beta version now to develop with or use VS2008 and upgrade the project when it comes out?
Whatever? Compare it to learning a language, you're asking whether you should learn British or American. I'd say that either language empower you in roughly the same way, and the basic tactics will outlast the language itself. Meaning, we still speak in the same way whenever a dictionary changes.
BRShroyer wrote: 2. This project is porting our current application written in VB6 to C#. Are there any methods, best practices, or tools that might be helpful or make the transition easier?
Get the Interop Toolkit[^], and you can replace your VB6-forms one by one with .NET counterparts. There's an example on using the BackgroundWorker in VB6
"If you owe the bank $100, that's your problem. If you owe the bank $100 million, that's the bank's problem."
-- John Paul Getty
|
|
|
|