|
|
What do you a link for, the google search[^]? The second result is an article here on code project addressing your precise question.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
Every thing we if we found in google why this forums available & why you need to ask again to search in google, Hmmmmmmmmm I found my solution by my Own
http://www.dailycoding.com/Posts/convert_image_to_base64_string_and_base64_string_to_image.aspx[^]
|
|
|
|
|
hi...
I have a question.
how to restore SQL database with SQLxpress?
suppose SQL not installed.
tanks
|
|
|
|
|
Member 4118635 wrote: how to restore SQL database
Member 4118635 wrote: suppose SQL not installed.
What are you smoking, and can I have some ?
If there's no database installed, what do you expect to restore your DB to ?
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. i am reading SAP Table data using RFC_READ_TABLE. but problem is it is working on SAP SandBox but when i try to connect it with other SAP system, it will throw RunTime exception while trying to read data.
Please advice.
Thanks
|
|
|
|
|
Vishal Dave wrote: Please advice.
Well how about looking at the exception and trying to determine what exactly it is complaining about.
|
|
|
|
|
Hi,
I am using late binding when creating a word object to generate a MS Word document from my C# program. I have successfully created tables and paragraphs, but now I am trying to format the paragraphs (left, justified, etc.).I want to insert headings (center aligned) using late binding.so can you please help?
modified on Monday, November 16, 2009 12:00 AM
|
|
|
|
|
public Ts GetMany<t, ts="">(BasicBO BO) where T : BasicBO
{
List<basicbo> BOList = DataAccess.Get(tc, BO);
List<t> TList = new List<t>();
foreach (BasicBO bo in BOList)
TList.Add((T)bo);
// error occured in the following statement
object result = typeof(Ts).GetType()
.InvokeMember("ctor",BindingFlags.CreateInstance, null, null, null);
typeof(Ts).GetMethod("AddRangeFromDB", BindingFlags.NonPublic | BindingFlags.Instance).Invoke(result, new object[] { TList });
return (Ts)result;
}
error message is : Constructor on type 'System.RuntimeType' not found
Ts is a generic list of basicBO.
please explain it.
|
|
|
|
|
I'm not at my dev machine so I can't test this, but try removing GetType() from the line so you just have
object result = typeof(Ts).InvokeMember("ctor", BindingFlags.CreateInstance, null, null, null); My bet is that the Type instance you want is from typeof(Ts) , not typeof(Ts).GetType() .
Dybs
The shout of progress is not "Eureka!" it's "Strange... that's not what i expected". - peterchen
|
|
|
|
|
Thank you very much.
You are right. I didnt care about recoding of the line Ts.GetType(). but it is already retrieved with typeof(Ts). Now it works fine.
thank you
|
|
|
|
|
If it's generic, you must have lost your generic parameters.
You may also want to specify New in the where clause so you can instantiate the class directly rather than use Reflection. But I think one of the main problems is that the constructor's name is ".ctor".
Also, when using Reflection, you may want to cache the MethodInfo rather than get it over and over again.
|
|
|
|
|
What is Application.Run();
What is its real use?
I have read the msdn but I couldn't understand. Please give me a different and easy answer
|
|
|
|
|
Application.Run(form) shows the form, runs a message pump, and waits until the form gets closed.
it exists in the Main() method of most WinForm applications.
I've never used Application.Run() without form.
Luc Pattyn [Forum Guidelines] [My Articles]
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
I'm guessing it tells an Application to Run, but some context might be helpful.
|
|
|
|
|
|
I'll wait for the OP to give context; it could be some wacky WidgetCo.Application.Run .
|
|
|
|
|
You're not the adventurous type then?
Luc Pattyn [Forum Guidelines] [My Articles]
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
Jumping to conclusions doesn't pay.
|
|
|
|
|
|
How do you know that's what the OP means?
|
|
|
|
|
|
|
Windows is basically a message-driven system. Unlike the programming model we get to play with, where we "receive events" when they occur, each application actually has to make system calls to get messages for the application from the system. These messages are generated by the OS and/or other programs and represent information such as a key changing state from up to down, the mouse moving, the program needs to redraw itself, and a gazillion other things.
So crudely put, and surely leaving out lots of detail, the Run() method displays the form passed to it, implements a loop that calls the Windows GetMessage() function and processes the messages in the queue. Messages received will be passed to relevant controls and the controls in turn raise events, providing us with a way of plugging our custom code into this loop. When the application receives a WM_CLOSE message or the form closes, the loop terminates and the Main method returns, terminating the program.
This is also why normal Windows Forms apps are terrible for implementing things like games. The GetMessage() function blocks when the message queue for an application is empty, which is very good when the application *is* event-driven and doesn't need to do anything other than in response to some external event - because it let's Windows allocate CPU to other programs that do have something in their message queue. Games however need to keep working and drawing and calculating object movements and so on even if there are no external events. They therefore implement the message loop a little differently, calling the system function PeekMessage() instead, which never blocks but returns immediately even if there are no messages. That's great for games, but it also explains why games are so unfriendly multi-taskers - they always take a lot of resources.
A digression if I may: Unfortunately this does make some seemingly simple things a bit tricky to implement in Windows Forms apps. For example, let's say you want to do something *while* a mouse button is pressed, as opposed to in response to the transition from up to down or down to up. You could do this with a timer (which is a WM_TIMER message - the lowest-priority message of all Windows Messages), but it wouldn't be very nice. You might have to start another thread doing the work when the button is pressed and cause it to stop when the button is released, but that's a bit complicated too, because the controls are not thread-safe so this other thread can't update anything in the UI, but instead has to marshal calls back to the UI thread to do the updating... Of course, if the control had an event that fired on every iteration of the program loop as long as the mouse button is pressed this would solve the problem, but generally the controls don't have any such events!
|
|
|
|
|
Hello.
Is it possible to create a program in c#, so when you log on with your username and password, to a forum, so can i create what the user can do.
Also make so he can write on forums and so on.
Also a "virtuel" browser in the program?
-Ahlm
|
|
|
|