|
Why can't we just right click, insert > picture??
Why doesn't it work?? I simply get nothing when I do that!!
If you're familiar with this problem, can you shed some light on how to set it at runtime from a path in the hard disk rather than from a database field.. Probably as a parameter or whatever way it works.
Thanks!
|
|
|
|
|
Hi ,
Is there any good tools to create a good framework(Busines Logic and Datalayer) from a database ?
With Warm Regards...
|
|
|
|
|
|
MyGeneration[^] can be used to generate sourcecode that's based on a database-structure I are Troll
|
|
|
|
|
I have a datagrid that is being populated correctly. yet only the first row shows in the grid. I have a second row that shows nothing. However, if i click on the second row then I see the data. Is there some kinda setting I'm missing in properties or is it something else?
|
|
|
|
|
Hi,
can I know your data source contains only two rows?
Also, check and set the different color for 'BackColor' and 'ForeColor' properties of DefaultCellStyle in DataGrid.
Thanks,Gopal.S
|
|
|
|
|
Hi, I'm having problems in casting object to List<Game>, Game is another class. I'm using Reflection to invoke the method, however my method return a List, but the invokeMethod in Reflection returns me an object.
object returnType;
List<Game> gameList = (List<Game>)returnType;
When i tried to do this casting, it gives InvalidCastException. I've used, getType to check they are of the same type of list, however it cannot works. When i tried to compare them, i.e returnType.GetType().Equals(gameList.getType()), they are different.
Thanks for any help/suggestion. I've tried to search but failed to find any help.
|
|
|
|
|
What happens when you do GetType().ToString()? It could be that the object is null... not sure if that would cause trouble, but maybe. Also, if the types are defined in different assemblies, that may cause problems too (e.g., if the type you are casting to is defined in a different assembly than the type stored in the object). Perhaps you can create a simplified example of code we can run that demonstrates the problem?
|
|
|
|
|
Different assemblies! oh i compiled my code to a .DLL library. I'll load that assembly and run during runtime. However, inside the project I have forgotten to add that .DLL. Is that what is causing the problem? how do i add in the assembly to my project?
|
|
|
|
|
[A]System.Collections.Generic.List`1[AutomatedTestDriver.Game] cannot be cast to [B]System.Collections.Generic.List`1[AutomatedTestDriver.Game]. Type A originates from 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadNeither' at location 'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'. Type B originates from 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadNeither' at location 'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'.
This is the exception it throws me
|
|
|
|
|
Create a simple example and perhaps I can assist you further. I've never tried it, but I'm pretty sure you are supposed to load the DLL using Reflection, and then you are supposed to get the type from that loaded assembly. But I'd need to see some simplified example of what you are doing to know for sure what's going on.
|
|
|
|
|
Hi guys,
I have question about a code-behind in C# for an ASPX file.
the thing is that I made a class and I want this class to inherit from System.Web.UI.Page.
but it seems that this refrence does not exist.the only thing that exists is System.Web!!!!
so if anybody could help me I'll appreciate it.
thanks
|
|
|
|
|
|
Hello guys,
I would like to introduce an option where my application would allow a user to use the program either with the default settings or it would allow certain customizations.
The application would allow to tweak certain parameters via controls (check boxes, radio buttons etc). What would be the best way to save them, so in future, if the application would be re-executed, that saved settings file would be initialized and appropriate actions would follow? Should I use serialization? Are there some better ideas?
Thanks.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Use Application Settings[^] You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
Thank you.
There is one issue I cannot understand.
When I tick/untick my checkbox control (causing .Checked to change), I close the window, resulting in saving my settings. Nevertheless, the config file does not get updated. The file always contains the default value of a control I had selected from the beginning, however, the application "remembers" the settings fine. So, if I were top re-execute it, the checkboxes would be appropriately checked. How come?
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Best guess is that you are looking at the wrong <appname>.exe.config file - there will be one created for your release and debug versions. Have a look at the modification dates and see if they change.
Difficult to tell from a vague description of the problem!You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
Yes, I have looked at the modification dates of both versions. Even if I copy my executable file to another folder - nothing changes in the config file.
My settings:
public bool setLOW_Inter2D {
get {
return ((bool)(this["setLOW_Inter2D"]));
}
set {
this["setLOW_Inter2D"] = value;
}
}
Saving them if the window is closed:
private void LogOptionWindow_FormClosing(object sender, FormClosingEventArgs e)
{
Settings1.Default.Save();
}
Integration of the settings:
this.cboxLOW_inter2D.AutoSize = true;
this.cboxLOW_inter2D.Checked = Settings1.Default.setLOW_Inter2D;
this.cboxLOW_inter2D.DataBindings.Add(new System.Windows.Forms.Binding("Checked", Settings1.Default, "setLOW_Inter2D"));
this.cboxLOW_inter2D.Location = new System.Drawing.Point(175, 141);
this.cboxLOW_inter2D.Name = "cboxLOW_inter2D";
this.cboxLOW_inter2D.Size = new System.Drawing.Size(115, 17);
this.cboxLOW_inter2D.TabIndex = 14;
this.cboxLOW_inter2D.Text = "Interactive 2D Grid";
this.cboxLOW_inter2D.UseVisualStyleBackColor = true;
Config file:
<setting name="setLOW_Inter2D" serializeAs="String">
<value>True</value>
</setting>
modified 1-Aug-19 21:02pm.
|
|
|
|
|
I found that my current settings modifications get stored in the user.config file that is located in
%INSTALLROOT%\Users\<user>\AppData\Local\Microsoft\ . Is there a way to save the files in the folder where my executable is?
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Hi All,
I want to develop COM dll in C# application.
Can anyone help me?
Regards,
sunil G.
|
|
|
|
|
Since .NET effectively supersedes COM, I am not sure that you can: You can go the other way via COM Interop, but I do not believe that C# can create a COM DLL. C++ can, but that probably isn't a lot of help to you... You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
How to create COM Interop in C#?
|
|
|
|
|
Google "COM interop c#" and you will get lots of hits. I know MS do a tutorial which should at least give you the basics. You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
If you have a look in the AssemblyInfo.cs file for the c# DLL there is the following entry, which you can set to true.
[assembly: ComVisible(false)]
|
|
|
|
|
i make program send and receive information between two computers with TCP connection and the IPs are 123.0.0.1 and 123.0.0.2
now i want to apply it over the internet
(what IPs should i use to apply it)
(note: i dont have a static IPs but for every connection i know the IPs)
|
|
|
|