|
can't believe I'm about to use these words but... Google. Search feature on CP.. there are a number of options you can take besides "gimme code" for a unclear problem. a little advice from a newbie that I've learned
#1 break your problem down into bits. not one huge line of garbled question about a project we have no clue what you are doing.. Break it down into individual parts.
#2 figure out how to do each part separately.
#3 if at that point you still do not know how to make a specific part work.. Show some of your attempts,, Explain what you have tried, what errors you get,,, and for crying out loud state your problem CLEARLY and CONCISELY. Then the real programmers haunting these boards will be more than happy to help you a little bit. What they are NOT happy doing is doing the entire freakin project for you. Especially when nobody but you is even sure what the project is.
Programming is a race between programmers trying to build bigger and better idiot proof programs, and the universe trying to build bigger and better idiots, so far... the universe is winning.
|
|
|
|
|
Nobody understands me - PLEASE, do my homework for me ...
|
|
|
|
|
It would be better if you tell us what is kind of a database it is and if you don't want to show it on data grid view, then where do you want it to be displayed?
|
|
|
|
|
first, the question is not well formed (ok, my english too)
second, what i read and understand: he dont like to use the datagridview "because it cannot display images".
i understand from this, that he found some piece of code in the internet, used it, but the sample uses a datagridview and databinding. and now he would like to change the sample program to search for a value, and fetch the values from the db to controls on the form, and he has absolutly no clue where to start (if this is homework, the question arise: why does he not know where to start? not listening? no teaching?).
beside the fact, that a datagridview definitly can be abused and [B][U]can[/U][/B] display ownerdrawn cells (=everthing is possible, images too), he can react on the click event of the datagrid and display the image in an additional control on his form.
all this assuming w´re talking about a windows form app. wpf would open other possibilities.
I cannot remember: What did I before google?
|
|
|
|
|
I second your thoughts Thomas. He does not even seem to be interested in replying our feeds.
|
|
|
|
|
Hi,
For your need follow these steps.
1.create a connection with your database
2.create an sql command to fetch the values from your database
3.next, fill the values in a datatable
4.and then bind those values to your grid
|
|
|
|
|
Google is your friend
♫ 99 little bugs in the code,
99 bugs in the code
We fix a bug, compile it again
101 little bugs in the code ♫
|
|
|
|
|
Hi..
I am developing an application in which I am sending a data packet using UDP 9050 port.When I run it disabling wifi, it works fine.But when I run it on a laptop with enabling wifi ON, It doesn't work.
Please guide me.
|
|
|
|
|
It's possible that you are hitting a port conflict with another application, or that the firewall is not allowing the application to pass through this port. To see if you're getting a conflict, try running netstat -a from the command prompt.
|
|
|
|
|
you may be binding to the wrong adapter... to see if this is the problem, change the order of the adapters:
To view order of adapters: on cmd prompt type: ipconfig (the result will be the default bind order)
To change order of adapters: last adapter enabled will become last in the list (so change the order by disabling/enabling in the network connections menu accordingly)
if you determine that this is the problem, then you have to manage your adapter binding a bit smarter in the code.
|
|
|
|
|
Hi,
I'm trying to create a memory mapped file file using
var mmf = MemoryMappedFile.CreateFromFile(@"C:\Temp\XMLFile.xml", FileMode.Open, "memMapFile");
in the OnStart() of the service class. The mmf gets created, but trying to access it from an application using
var mmf = MemoryMappedFile.OpenExisting("memMapFile");
leads to a FileNotFoundException.
When the file is created in an application instead in a service, this works.
What am I missing?
Thanks for your help!
|
|
|
|
|
You need to create an inter-process memory map file with MemoryMappedFile.CreateNew method. In this way you'll be able to access it from different processes.
|
|
|
|
|
Not if he's only accessing it from the Service, not from other processes.
|
|
|
|
|
Thanks for your reply Ciumac!
I went trough the description of the MemoryMappedFile class, but couldn't figure why MemoryMappedFile.CreateFromFile should deliver a result different than MemoryMappedFile.CreateNew. Nevertheless I tried it out - no success!
|
|
|
|
|
Is it a local variable in the method? Or a member of the class?
|
|
|
|
|
Thanks PIEBALDconsult!
It was a local variable.
Best regards!
|
|
|
|
|
Hello guys...
I have addin for visual studio 2005 with its '.dll' files, in 2005 you just put it in the "\Documents and Settings\user name\My Documents\Visual Studio 2005\Addins" then it will work directly, but i want to use it "same addin" in visual studio 2008 or 2010 so i need to do to make it work
thank you .
|
|
|
|
|
Take a look at this[^]. It should help.
|
|
|
|
|
Hi guys, I have the following problem.
I have 3 buttons (ProcessA, ProcessB and ProcessC) and this are the scenarios:
- By the time I push ProcessA, then disable ProcessB and ProcessC buttons
- By the time I push ProcessB, then disable ProcessC and ProcessA buttons
What I am doing now to set one button properties from an external thead are the following sentences:
if ProcessA is started, then
changeBtnStatus(btnProcessB, false);
changeBtnStatus(btnProcessC, false);
if ProcessA is stopped, then
changeBtnStatus(btnProcessB, true);
changeBtnStatus(btnProcessC, true);
and the same for processB
if ProcessB is started, then
changeBtnStatus(btnProcessC, false);
changeBtnStatus(btnProcessA, false);
if ProcessB is stopped, then
changeBtnStatus(btnProcessC, true);
changeBtnStatus(btnProcessA, true);
this is the generic method
public void changeBtnStatus(Button button, bool status)
{
button.Invoke((MethodInvoker)delegate { button.Enabled = status; });
}
ProcessB is working fine, but ProcessA button is not working well. The ProcessC button is not getting disabled by pression btnProcessA, why this happens? I have made some tests and I realized that I uncomment ProcessB block of code, ProcessA will work correctly. The problem resides in chaging btnProcessC propierties because both blocks set this property.
Hope this is enough information.
Thank you in advance!
|
|
|
|
|
Member 7812318 wrote: if ProcessA is started, then changeBtnStatus(btnProcessB, false); changeBtnStatus(btnProcessC, false); if ProcessA is stopped, then changeBtnStatus(btnProcessB, true); changeBtnStatus(btnProcessC, true);
your message isn't very clear and this isn't C# code; you probably have a minor mistake somewhere, with what you have shown and told us, I can't tell you in any detail.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Hello,
This is the situation I have an assembly A (plugin) loaded into separate app domain, that assembly fires a couple of events.
And i have a class B created using the default App domain.
Now Class A raises and event and event handler in class B catches that event, but since it is called from another App domain (A) it cannot see variables of app domain B (all variables are null) in this case a public static object that is 100% not null on app domain B.
I think i understand why the variable is null, but how do i execute event handler code in app domain B so that code executed in app domain B will see the variables initialized?
I have tried CrossAppDomainDelegate but it can only call mehods that don't have any parameters, and since this is an event handler it has parameters and not standard event signature but with a custom EventArgs.
How can i solve this problem.
Thank you!
|
|
|
|
|
Make sure the objects passed in the delegate arguments, and the result type, are either simple objects or inherit from MarshalByRefObject. You will probably need to create proxy classes for complex types in your plugin to achieve that. For example from my lobby server:
public class LobbyProxy: MarshalByRefObject {
public BaseLobby lobby;
public LobbyProxy(BaseLobby l){ this.lobby = l; }
public void Log(object sender, String msg){ lobby.Log(sender, msg); }
public MemberInfo Member(int id){ return lobby.Member(id); }
public MemberInfo GetMember(string name){ return lobby.GetMember(name); }
public bool MemberInGame(int member, int game){ return lobby.MemberInGame(member, game); }
public int MemberIndexInGame(int member, int game){ return lobby.MemberIndexInGame(member, game); }
}
public class ServerLobbyProxy: LobbyProxy {
public ServerLobby serverLobby;
public ServerLobbyProxy(ServerLobby l) : base(l) { this.serverLobby = l; }
public void SendMessage(int id, uint command, byte[] msg){ serverLobby.Server[id].SendMessage(command, msg); }
public void SendMessage(int id, uint command, byte[] msg, byte pt){ serverLobby.Server[id].SendMessage(command, msg, pt); }
}
public class ClientLobbyProxy : LobbyProxy {
public ClientLobby clientLobby;
public ClientLobbyProxy(ClientLobby l) : base(l) { this.clientLobby = l; }
public void SendMessage( uint command, byte[] msg){ clientLobby.Connection.SendMessage(command, msg); }
public void SendMessage( uint command, byte[] msg, byte pt){ clientLobby.Connection.SendMessage(command, msg, pt); }
public int MyID { get { return clientLobby.MyID; } }
public MemberInfo Me { get { return clientLobby.Me; } }
public void DoChat(int DefaultScope, String msg, int GameID){ clientLobby.DoChat(DefaultScope, msg, GameID); }
}
This is actually the other way around (so plugins can call methods in the main app domain) as I find that design cleaner. (Plugins are responsible for making sure that they respond to events and call whatever they need to in the main app domain, via these well defined interfaces.) But the same thing should work from the other side too.
|
|
|
|
|
Hi guys,
i have a project in which I'm supposed to retrieve data from the database and put d data into an XML file (with a defined schema), and send that file encrypted and all.
My problem, however, is getting the data into XML.
Please anyone knows how to achieve this?
He who goes for revenge must first dig two graves.
|
|
|
|
|
You're getting answers in Q/A for this question. Why did you post it here as well?
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
I've had no answers. I wouldn't be posting here if I had an answer to this. Pls can u help me out?
He who goes for revenge must first dig two graves.
|
|
|
|
|