|
Nope. It doesn't. SystemColors provides the theme colors, or whatever they call them, wich most of arent even used when a visual style is applied. I'm after the visual styles color scheme.
|
|
|
|
|
|
Did you read my reply to Luc at all?
SystemColors contain only system colors. They're used for theme Windows, and this set of colors have been there since Windows 3.0. Themes and visual styles however, are two completly different things, and many of the system colors aren't even used when a visual style is applied. Most of the visual style consists of images but some elements are built such as the menus and toolbars used (for the first time) in Office 2003, are drawn using a color scheme. A visual style, like the default one in Windows XP, can come with many color schemes. These color schemes are NOT editable by the user, wich the system colors are. These elements seems to be built into Windows, or more likely, into .NET, so that we can build beautifully looking applications. To make my application even more beautiful I want to use some of the colors from the color scheme elsewhere, and so I need to obtain them somehow. As i said, this can be done through the registry, but this is somehow complicated, or finding the applied visual style and reading the source files -- wich would be a stupid way of solving this. Many of Microsofts own applications seems to be using these color schemes, so I'm still wondering if they ar obtainable through .NET (preferably) or through APIs?
And once again, I'm specificly looking for the colors used in the gradiend to the left in the menus. These colors are NOT present in the SystemColors class. Prove me otherwise if I'm wrong, don't just say they are, becouse I can't find them, and they do not seem to be documented by Microsoft.
|
|
|
|
|
|
I have recently moved from .NET 2003 to .NET 2005.
I have written a simple application, re-using some code from a .NET 2003 project.
The program runs fine in the .NET 2005 development environment.
I have now created a setup project to produce the two setup files.
When I run the setup files on a different machine the program installs ok.
But when I run teh program I get a JIT window with message:
An exception 'System.InvalidOperationException' has occurred in ChordFinderAssembly.exe.
I have searched the internet but cannot find any suggestions appropriate to my problem.
Can any one help?
Roel.
|
|
|
|
|
Member 1871720 wrote: I have written a simple application
Member 1871720 wrote: But when I run teh program I get a JIT window with message:
An exception 'System.InvalidOperationException' has occurred in ChordFinderAssembly.exe.
Member 1871720 wrote: Can any one help?
Help with what? What do the log files your application is generating say about the error?
led mike
|
|
|
|
|
You gotta try and at least find out where the problem is occurring. Add logic to log what's going on or at the minimum put some msgbox statements in the CTOR, load, activate, etc to narrow down where the problem is happening.
From there, you can narrow it down to a specific stanza of code. Cheers!
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Thanks for your suggestions.
I put msgbox statements in various plaves and finally traced it down to a file that the app was trying to open. However I forgot to include the file in the build. I have now also added error catch statements everywhere just in case.
Reason I put the question on the message board was that this was my first app in .NET 2005 using .NET 2004 code snippets and I automatically assumed that he problem was with 2005.
Sorry, but thanks for your help.
|
|
|
|
|
Assume I have a datatable named tb. And a bindingsource bsPlanning.
I set the bindingsource to have a datasource from tb.
And I have a datagridview to have a datasource from bsPlanning.
I made an update to database using UPDATE statement.
I reload the data to tb.
Then finally I call bindingsource bsPlanning.ResetBinding(False).
But the datagridview won't refresh the value.
Please tell me if I have done something wrong and tell me how to do this... Thank you ...
I have code like below:
Private Sub RefreshGrid(Optional ByVal intFilter As Boolean = True, Optional ByVal ReloadData As Boolean = False)
Dim strQuery As String = vbNullString
Dim sr As StreamReader = IO.File.OpenText("productionplanning.sql")
While Not sr.Peek = -1
strQuery &= sr.ReadLine & " "
End While
sr.Close()
tb = ExecuteQuery(strQuery)
If intFilter Then Call IntegrateFilter()
If ReloadData Then
Call DataLoad(bsPlanning, bnPlanning, dgv, tb)
Else
bsPlanning.ResetBindings(False)
End If
End Sub
|
|
|
|
|
Is your database getting updated properly?
Cheers!!
Brij
|
|
|
|
|
Hi,
Check first that database is updated with new values or not?
Try Calling bind function of datagridview again after ResetBinding().
Hope this helps.
Thanks
Shilpa
|
|
|
|
|
I am new at writing both C# code and with network protocol.
Let me summarize what I do know and what my problems are:
I am trying to use a UDP broadcast to send out a call and response. Basically I send out a command byte[] array with the first 5 characters being 'BURN' and 'R'. As I understand it correctly my device is listening always on the port 20034.
If "BURNR" is broadcast out correctly I should get a response from all the devices on the port 20034 that are listening to send me a byte[] array back. Later the byte[] array is parsed into a struct, but for now all I need is to establish the connection between my program and the hardware boards in the field.
I know the boards work because I have a C++ program that implements a scan to find all the IP addresses and it works. I need help implementing that code in C#.
This is what I have tried:
updClient udp = new udp();
byte[] sendBytes = Encoding.ASCII.GetBytes("BURNR");
IPEndPoint ipept = new IPEndPoint(IPAddress.Broadcast, 20034);
udp.Send(sendBytes, sendBytes.Length, ipept);
I have also tried some stuff with System.Net.Socket, but I have yet to make any sort of connection.
Please advise?
Thanks
|
|
|
|
|
Welcome to CodeProject
jwangAimCo wrote: I am new at writing both C# code and with network protocol.
jwangAimCo wrote: I need help implementing that code in C#.
This is what I have tried:
First there is no updClient class so your code does not compile, it's generally not acceptable to post code that does not compile unless your question is about the compiler error.
When you say "this is what I have tried", why did you try that? I mean are you just randomly typing things in or do you have some material (book, article, whatever) that you are using that maybe targets beginners? If not, I strongly suggest you find and use some material that is targeting beginners since you are one.
One other observation, I generally advise against a beginner jumping right into something like IPC. IPC is an advanced topic and therefore not well suited to beginners.
led mike
|
|
|
|
|
Thank you "led mike" for that judicious response. You have been as helpful as you have been welcoming.
I guess I was mistaken when I thought that this forum was for learning things and helping each other. I am sorry for being new to this, but prefacing my post with, "I am new at both writing C# code and network protocol" obviously wasn't explainitory enough.
Unfortunately for you I don't just give up on learning things I don't know. I am still hoping that somebody could lend me a hand. I apologize for not being an elite coder, but then again if I knew how to do this I wouldn't be posting.
In my pseudo code I wasn't looking for the code to be written for me, I was merely posting some of the things that I was currently playing around with, however here is the code that I am working on right now. It won't compile (disclaimer), because it is buried in a larger namespace, but I have included the localized button code and the System files that I was using. Should be a simple copy paste.
using System.Net.Sockets;
using System.Net;
private void button_SearchAgain_Click(object sender, EventArgs e)
{
byte[] data = new byte[1024];
string input, stringData;
IPEndPoint ipep = new IPEndPoint(IPAddress.Broadcast, 20034);
UdpClient udp = new UdpClient();
Socket server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
string burnR = "NRUBR";
data = Encoding.ASCII.GetBytes(burnR.ToCharArray());
udp.Connect(ipep);
udp.Send(data, data.Length);
IPEndPoint client = new IPEndPoint(IPAddress.Any, 20034);
EndPoint Remote = (EndPoint)client;
byte[] rcvdata = new byte[1024];
if (udp.Available>0)
{
MessageBox.Show("You are here.");
}
server.Close();
|
|
|
|
|
jwangAimCo wrote: Unfortunately for you I don't just give up on learning things I don't know. I am still hoping that somebody could lend me a hand. I apologize for not being an elite coder, but then again if I knew how to do this I wouldn't be posting.
Ok, good luck.
led mike
|
|
|
|
|
If you have working C++ code, you can build it into a C++/CLI dll and call it from there.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I figured it out after messing with some Ethernet sniffers and other utilities. I'm posting the code for anyone else who may find this useful in the future.
private void FindBoards()
{
ArrayList crArray = new ArrayList();
byte[] sendData = new byte[1024];
byte[] rcvData = new byte[1024];
Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
s.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, 1);
IPEndPoint localEP = new IPEndPoint(IPAddress.Any, 20034);
IPEndPoint broadcastEP = new IPEndPoint(IPAddress.Broadcast, 20034);
try
{
sendData = "whatever you want to send";
s.Bind(localEP);
s.SendTo(sendData, broadcastEP);
s.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout, 2000);
}
catch (System.Net.Sockets.SocketException se)
{
MessageBox.Show(se.Message);
}
try
{
int rcvSize;
int crIndex = 0;
DateTime rcvTimer = DateTime.Now.AddSeconds(1);
do
{
rcvSize = s.Available;
if (rcvSize > 0)
{
EndPoint local = (EndPoint)localEP;
int iRX = s.ReceiveFrom(rcvData, 0, 1024, SocketFlags.None, ref local);
}
} while ((rcvSize > 0) || (DateTime.Now < rcvTimer));
}
catch (System.Net.Sockets.SocketException se)
{
MessageBox.Show(se.Message);
}
s.Close();
}
|
|
|
|
|
Have a friend i want to take down in Scramble. Downloaded the source files and the demo, then downloaded from Microsoft the .NET Framework V2.0 50727 to run the stuff. Still won't open. What do I do now (i am an absolute amateur at this...)? Please someone save me from complete humiliation
|
|
|
|
|
It would be nice if you described what "Scramble" is and where you got it from.
And what do you mean by "won't open"?? Any error messages??
|
|
|
|
|
Scramble is an online word game on Facebook being played by many many people at the moment. The Code Project has produced a Scramble dictionary which allows the user to put in the scrambled letters (in a random 4x4 grid) into a form which provides all the possible word combinations that follow the gams rules.
The source code and demo was posted to this site on 27 November and the download required me to have .NET program. I downloaded that, but still no luck. I will post more info later today. Thanks for the reply
|
|
|
|
|
David Kinsella wrote: The Code Project has produced a Scramble dictionary
Wrong. A single person has posted an article on the CodeProject. There is a forum at the bottom of every article. Questions concerning that article should be posted in that forum.
David Kinsella wrote: The source code and demo was posted to this site on 27 November and the download required me to have .NET program. I downloaded that, but still no luck. I will post more info later today.
No luck with what?? Compiling the demo source?? Running the demo project?? What error messages do you get?? What actually happens?? Without this basic information, there's little anyone can do for you.
|
|
|
|
|
Hi,
In WPF Client application project I have one requirement where in I am required to fetch certain email attributes (Subject, From, Date etc.) from an .msg file.
How can we achieve this?
Thanks in advance.
Thanks & Regards,
Deepak.
|
|
|
|
|
|
Vietnam travel information | Vietnam tour companies | Vietnam luxury adventures | Vietnam adventures travel | Vietnam guided tours | Vietnam luxury holidays | Vietnam luxury tours | Vietnam luxury hotels | Vietnam travel agents operator | Vietnam adventures tours | Trekking tours | Biking tours | Kayking tours | Cycling tours | Walking tours | War veterans tours | Cruising tours | Birdwatching tours | Day trips tours | Honeymoon trips tours | Photo tours | Teambuilding tours | Art tours | Family tours | Cookery tours | Golfing tours | Diving tours | Excursions tours | M.I.C.E tours |Visa to vietnam | Visa to laos | Visa to cambodia | Hotels in vietnam | Hotels in laos | Hotels in cambodia | Resort in vietnam | Resort in cambodia | Restaurents in vietnam| Restaurenst in cambodia.
Vietnampathfinder Travel
Vietnam Tours
Vietnam Art tours
Hanoi Art tours
Vietnam family vacations
Vietnam Family holidays
Vietnam tours for family
Vietnam Tour Operator, Travel Agent , Vietnam 's Leading Hotels and Resorts Online Reservations www.vietnampathfinder.com offers discounted flights, hotels and resorts, car rental, visa Arrangement, first class holidays, tailor-made tour packages, eco-adventure travel to the mystical, exciting and Newly Discovered destinations in Vietnam, Laos and Cambodia.
http://www.vietnampathfinder.com
|
|
|
|
|
Hi,
It is a window application.i have a assembly of it. it have a win-form which have some control. like button or text boxes.
I want to create dynmic event of win- form control so how i can do.
|
|
|
|