|
ComboBox1.SelectedItem returns the current selection.
|
|
|
|
|
Can anyone offer any recommendations / tips for designing an 'options' dialog.
I just have a form with tabs for the the various categories, onChange events for the various form elements and I read / write my app.config file.
Seems a bit messy and ad-hoc, is there a a better way ?
|
|
|
|
|
Hello!!
I need to get the size of all images from an html page but i cant do one thing.
Whith this expression i get only images where heigth and width come in this order.
Ex:
<img src="../home/images/topo_01.gif" height="107" width="213">
<img src="../home/images/topo_01.gif" width="213" height="107">
i can make only one to work.
How do i do this?
r = new Regex("<\\s*img.*height=\"(?<heigth>.*?)\".*width=\"(?<width>.*?)\".*>", RegexOptions.IgnoreCase | RegexOptions.Compiled);
thanks!!
Bruno Conde
pharaoh
|
|
|
|
|
r = new Regex(@"<img.+(height="?(?<height>[^"]+)"?\s+width="?(?<width>[^"]+)|width="?(?<width>[^"]+)"?\s+height="?(?<height>[^"]+)).*>")
This works fine for me
Remember you can put an "@"-sign in front of your string declaration, so you don't need to escape certain characters. This comes in very handy with regular expressions.
regards
-- modified 12-Sep-18 21:01pm.
|
|
|
|
|
I need a Cyclic Visual for a form I am developing. A cyclic is the control in a helicopter that the pilot usings to steer the aircraft. What I need is an overhead view of the position of the cylic. I.e. a circle with maybe a dot or something indicating its position. Any help would be much appreciated. Thanks
D
|
|
|
|
|
this is a really easy question....if i put a save file dialog on my form...how can i check if the user clciked the okay or cancel button...
|
|
|
|
|
hi there,
use DialogResult to achieve this.
for more detail, visit this:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformsdialogresultclasstopic.asp
<< >>
|
|
|
|
|
I've got a problem with latebind word in my app because I have to be independent from the installed office-version. With my first attemp to fill in the adresse-field of word-form it worked very efficent. I just referenced word, created a dot-file with some fields "Name, adress, zip and townname" in the form and coded oWordApp.ActiveDocument.FormFields.Item(ref cField1).Result = this.cmbAnrede.Text.Trim(); and so on. That works quiet well. But now, as I'm trying to do it latebound, to be independent of the office-version, this doesn't work anymore.
Can anybody hand me an ax to find my way out of the deep forrests?
regards
Klaus
|
|
|
|
|
It's generally best to bind to the lowest supported version of Word, and it will work on the newer versions of Word as well. So, if you support Word 2000 and Word XP, bind to Word 2000, and it will work for Word XP, too.
John
"You said a whole sentence with no words in it, and I understood you!" -- my wife as she cries about slowly becoming a geek.
|
|
|
|
|
John,
no I don't think so. That's why I tried to make it latebound <g>. In the beginning I coded it with Office97. It worked fine! Now the system is slowly turned to work with OfficeXP. The first workstation on which my routine was called, an error appeared.
I told the user "no prob. I'll compile it with OfficeXP. After a few minutes all works fine again, but from an other room they were yelling "Arrgh, my Computer is broken". You know, simple users are thinking of a ghost of/in the mashine<vbg>.
So, that's what my problem is. I'll have to make it kompatible with every thing.
thanks anyway
Klaus
|
|
|
|
|
Do you still need to support Office 97? If so, the worst case scenario would be to move this Word code into a dll, then intelligently choose which dll to load based on the Word version. This means a very small piece of code, with two (or more) versions of the same (recompiled) code, using different versions of Word.
John
|
|
|
|
|
is it advisable to port c# application to linux? If yes, how do you go abaout it? I heard of this thing called Mono? Does it work?
|
|
|
|
|
search this on CP site...
<< >>
|
|
|
|
|
|
How can implement the functionality of passing values from one form to another without creating the new instance of the second form. Actually i have to implement the "find" functionality in my application, How can i do this.
Sajid
MMIS
|
|
|
|
|
hi there,
sajjo79 wrote:
passing values from one form to another without creating the new instance of the second form
=> u can use global variable
sajjo79 wrote:
Actually i have to implement the "find" functionality in my application
can u explain more?
<< >>
|
|
|
|
|
public Payment()
{
InitializeComponent();
}
public Payment(string TableNumber)
{
string Table = TableNumber;
InitializeComponent();
}
For Example:
I wanted to pass the text of a label from the main windows form called Main to this Payment windows form.
Add another constructor with the specific type(Ex: string)
When you call it in the main form it will look like this:
In the main form i called Payment(string TableNumber)
Payment pay = new Payment(EmployeeName.Text);
pay.ShowDialog(this);
Now that i have done that Table contains the string that i needed for that form
Matt Srum
|
|
|
|
|
I want to download a file which is present in server to client, how will I do that, for eg% if the file is present in Server's D:\(which is not the virtual directory path, say virtual directory is c:\wwwroot...
|
|
|
|
|
hi there,
u mean that u want to download the file that does not belong to any site?
if so, u cannot download this through http, I think.
<< >>
|
|
|
|
|
Try HttpResponse class's WriteFile() Method.
It writes the specified file directly to an HTTP content output stream.
- ashish
|
|
|
|
|
i've started a toppic that is gone much in back... so i restart a new one.
if i create a dll i can't debug since to i create a enpty form in the same solution but a new project that call it, so i run the form project and i can debug now the dll.
i know this but i don't remember how to link the form to that dll.
How i include that working on dll at the main form?
|
|
|
|
|
Your form project has to reference the dll. In the solution explorer right-click on the references folder of your form project, select "Add references.." and in the opening dialog select your dll project.
www.troschuetz.de
|
|
|
|
|
Hi, in your first topic i explained how to create a dll manually without using Visual Studio. Now i'll explain how to reference a dll manually just for your knoledege.
The reference to the dll is added when you compile your .exe file(where you've got your form). So we'll compile the exe and add the dll reference to it.
With explorer browse to the folder where your sources (.cs files) are located (the files that your exe will use) and create a text file with notepad and add the following 2 lines to this new file:
csc.exe /target:winexe /out:MySoftware.exe /reference:MyLibrary.dll *.cs
pause
Save the file, close it and now rename its extension from .txt to .bat, this is a batch file. Now doble click on it (open it) and it will open a DOS window and will start the compiling process. The first line you added to the file will create your exe. In this line there's a '/reference:' parameter, this parameter will link your app to your dll, this example assumes that your dll is in the same path with your exe sources, in case the dll is in another folder use '/reference:MyFolder\MyLibrary.dll' (the path is relative to the batch file or you can type the complete path: C:\dev\app\MyFolder\MyLibrary.dll).
The second line in the batch file will prevent the window to close and it will keep it open so you can see the compiler's output in case something is wrong in your code.
Job's done.
-- modified at 2:04 Thursday 22nd September, 2005
|
|
|
|
|
I had to create an application, which has list of vendors supplying parts, each parts will have cost associated, when the end user clicks on the particular part, I have to make that row selected, as well as I have to calcualte the total of the parts selected.
But I need to do the following..
1) when end-user selects same part multiple times from different vendors, I have to make the previously selected part unselected, I can find out whether user has selected the part which is already selected, but I need to unselected the previous also, deduct thhe previous amount and add the new amount to the total.I am using Javascript, and does selection, calculation etc in client side, I am using Repeatrer control,I heard of RaiseBubble event, can any one help me, whether RaiseBubble event will help or not, how to select a row in Repeater? please provide me some help on RaiseBubbleEvent
Thanx...
Sony
|
|
|
|
|
Hi all!I have these two lines of codes in my program:
float time = (float)DateTime.Now.Second;
xyGraphControl1.AddPoint(time,power);
The result of the codes is that the timer starts at the same second as the clock in my computer.
How am I going to force the timer to always and only start at 0 second?
Thank you very much!
|
|
|
|