|
Just copy all the DLLs with your EXE in the bin\Release folder. That should do it.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Can a picture box display multiple images? If it can can you easily determine where they are and change the values?
|
|
|
|
|
Unless mistaken, I think you can only display a single image at a time in a picture box. Depending on your needs, you might want to consider using multiple picture boxes if possible. I hope this helps.
John 3:16: "For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life."
|
|
|
|
|
I was afraid I would have to. No problem though, it will still be possible to do it as a want with multiple. Thanks for the help.
|
|
|
|
|
Anyone know of a good method for extracting the text from an HTML document (loaded from an address). I would also be interested in knowing the size of the text as well. Any thoughts?
|
|
|
|
|
StreamReader should be able to read the text.
|
|
|
|
|
You can try applying a regex that replaces everything between < and > with empty strings. There is also this[^] SGML parser which you can use to extract the text.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi,
Can anyone tell me how to get the name of a variable as a string. Actually I want to store the values of the varibale( my varibale is a 2D array) in a text file named the same. Like if the name of the variable is myMatrix, then it should be able to store the values of the array in myMatrix.txt
One more thing I want to do is that, I want to get user input as what should be given name of the variable. So, if user says,
>>a=[1,2,3;2,3,4];
My program should be able to create a matrix with variable name a and initiate it with the values given by the user.
Regards
Amit
|
|
|
|
|
You can't create variables dynamically, so there is no point of getting the name of a variable as a string. You already know the names of all your variables.
What did you intend to use this for? I imagine that something like a collection would be more useful for you.
---
b { font-weight: normal; }
|
|
|
|
|
thanks for your answer. but, i was wondering how MATLAB creates the variable name dynamically. if you enter something like the following
>> a=[1,2;2,3]
Then it creates a variable of name a and stores its value in its workspace, which you can later access it.
Regards,
Amit
|
|
|
|
|
MATLAB most likely created their own parser that can interpret their language. Depending on how far you wish to go you could do the same thing. You'll need to create a stack that contains all of the variables and there relevant values.
If you want to just assign values to names you could create a Map of all the names to their values. You would then be able to access them like so: String myVal = (String)variables["a"]; This is a simplistic point of view on the whole matter of creating a parser though.
Look up some articles on Abstract Syntax Trees (AST), and some parser generators such as Lex, Bison, SableCC, and ANTLR.
Hope this helps.
-
Drew
|
|
|
|
|
A variable in the MATLAB user environment does not exist as a variable in the MATLAB application itself. Both the name and the contents of the user variable is data to the application. The variable names and the data is stored in a collection or something similar.
If you want the same functionality, use a collection.
---
b { font-weight: normal; }
|
|
|
|
|
you could probably model your user variable like this
public class UserVariable<br />
{<br />
private string variableName;<br />
private object variableContent;<br />
<br />
public string VariableName<br />
{<br />
get<br />
{<br />
return variableName;<br />
}<br />
set<br />
{<br />
variableName = value;<br />
}<br />
}<br />
<br />
public string VariableContent<br />
{<br />
get<br />
{<br />
return variableContent;<br />
}<br />
set<br />
{<br />
variableContent = value;<br />
}<br />
}<br />
<br />
public UserVariable(string name,object content)<br />
{<br />
this.variableName = name;<br />
this.variableContent = content;<br />
}<br />
<br />
<br />
public override string ToString()<br />
{<br />
return string.Format("{0}",variableContent);<br />
}<br />
}
this could be the head of a series of specialised Variable..
just my 2 cents
Denevers
|
|
|
|
|
I have a good authentication form, which I use to login to my app. Now
I want to be able to know which user is logged-in now, in order to fill
his answers in DB. In other words: I need to save & copy username
(stored in text box of the authentication form) to other parts of
application. I have Tried to save it in a static variable, and the call it from another form- no use.
Any idea how would I do that?
TIA,
sea#
|
|
|
|
|
You would not be able to call a static variable from another form as it would have been unique to the object form that you had running earlier.
If you need to save information accross instances of your program try saving the information to a file. You can set and get information as you need and it will last until you decide to erase it. Of course, you need to write methods to write and retrieve info, no easy way out. But it will be worth it.
CodeBlind
|
|
|
|
|
It depends, are you writing a Windows Forms or an ASP.NET application? I will assume Windows Forms.
What I do is create a User class that has properties like name, database ID, and anything else you would like to know about a user. It also has a Current static property, which is initializes by a static method taking user name and password. Something like this:
class User
{
private int id;
private string name;
public int Id
{
get { id; }
}
public string Name
{
get { return name; }
}
public User(int id)
{
....
}
static private User current;
public static User Current
{
get { return current; }
}
public static bool LogIn(string userName, string password)
{
if(found)
{
current = new User(foundId);
return true;
}
return false;
}
public static void Logout()
{
current = null;
}
} Then I always have a global object with info about the current user, so I can do things like this:
if(User.Current != null)
sbpUserName.Text = User.Current.Name;
else
sbpUserName.Text = "(please log in)"; I hope this helps! Good luck!
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Can anyone explain how I can draw a line over an existing image, then later remove it (by redrawing it in some clever way) without having to invalidate and redraw the original image?
|
|
|
|
|
chris fearnley wrote:
without having to invalidate and redraw the original image?
What's the problem? Do you have double buffering on?
David
|
|
|
|
|
David,
Is double buffering relevant?
In MFC, I used CDC::SetROP2 to get a whole range of options about combining pixels. I'm trying to find the equivalent in .NET. Thanks for replying.
|
|
|
|
|
chris fearnley wrote:
Is double buffering relevant?
Well, no . You wrote "(by redrawing it in some clever way) without having to invalidate and redraw the original image?" so I thought that you have performance problem... There was a chance that with double buffering you won't need "clever way" to do it.
Back on topic, if ControlPaint.DrawReversibleLine suggested by Mathew won't work for you, maybe you can interop with GDI. http://pinvoke.net/default.aspx/gdi32/SetROP2.html[^]. It look like there isn't managed solution, but then again I am no GDI/DGI+ expert .
David
|
|
|
|
|
ControlPaint.DrawReversibleLine works fine. A whole new class I didn't know about. Thanks to all.
|
|
|
|
|
|
I want to program realtime streaming ....I have streaming server for run Application and wait client request mpeg file... and I want to use rtsp protocol please tell me for infermation ..(thank you)
t_one
|
|
|
|
|
|
I'm trying to extract Text out of a Rich Edit TextBox. This works differently from a traditional textbox as far as I can tell.
I've been trying to use:
<br />
StringBuilder sb = new StringBuilder(txtLength.ToInt32() + 1);<br />
SendMessage(hWnd,WM_GETTEXT,txtLength,sb);<br />
I know txtLength is the proper length, but the text returned is gibberish. So if any one has ever used SendMessage to take text out of a richedit text box please help me out.
Jake
|
|
|
|