|
Yeah i am trying Status Strip for status bar where i can show status i want to add penal one left one right.
For doing this what i should do???
|
|
|
|
|
Add three labels as I described above and set the second one's Spring property to true and clear it's Text.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Dear,
Thanks I have done it.
Sajjad
|
|
|
|
|
Hi,
How can i show media player control in my application?
Thankyou
YPKI
|
|
|
|
|
|
Hi,
Kindly let me know that, How may I check days of month using c# commands for example:
January ends on 31
February ends on 28
March ends on 31
April ends on 30
e.t.c.
Thank you in advance
(Riaz)
|
|
|
|
|
How about this[^] static method: System.DateTime.DaysInMonth(int year, int month)
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
|
hello
Trying to switch my project over from "System.Data.OracleClient" to ODP.NET "Oracle.DataAccess.Client". It failed from get go (see this article from Oracle http://www.oracle.com/technology/oramag/oracle/06-winsupp/win06odp.html[^]):
<br />
DbProviderFactory oDbFactory = DbProviderFactories.GetFactory("Oracle.DataAccess.Client");<br />
(As in article from Oracle: )[^]
Keep getting System.Configuration.ConfigurationErrorsException saying:
<br />
"Failed to find or load the registered .Net Framework Data Provider."<br />
I checked my assembly cache it's there and also referenced in my machine.config (yes I have to add them myself):
<br />
D:\Program Files\Microsoft Visual Studio 9.0\VC>gacutil /l | findstr Oracle<br />
System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77<br />
a5c561934e089, processorArchitecture=x86<br />
CoreLab.Oracle, Version=3.50.12.0, Culture=neutral, PublicKeyToken=09af7300eec<br />
23701, processorArchitecture=MSIL<br />
...<br />
See, I'm sure the assembly has been installed and in machine.config I used the right key/version. Weird thing is, Red Gate's reflector won't allow me to "Open" (from Cache) the dll, this prevented me to check if there exists "Oracle.DataAccess.Client.OracleClientFactory" within the assembly. So I select "Copy Local" and examined the dll from "Red Gates Reflector". There's no "Oracle.DataAccess.Client.OracleClientFactory" in the dll ???
See here for a Reflector screencap if you don't believe it: http://www.codeguru.com/forum/showthread.php?p=1831221#post1831221[^]
Reflector can be downloaded here: http://www.red-gate.com/products/reflector/[^]
modified on Thursday, April 9, 2009 6:32 AM
|
|
|
|
|
errr....
I added this to app.config
<br />
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><br />
<qualifyAssembly partialName="Oracle.DataAccess" fullName="Oracle.DataAccess, Version=2.111.6.20, Culture=neutral, PublicKeyToken=89b483f429c47342"/><br />
</assemblyBinding>
Seems to have fixed the problem - not sure if I understand why... suppose I need to readup on assembly binding.
dev
|
|
|
|
|
hi all
i want to use the following code to set the time of the system by some numericUpDown (hour,minute,second) objects that user input, but i don't know where is the problem when i set the time it changes but it does n't correctly change, please have a look at it, it should be something that i may do not know about it, i just have changed a code that i found on the internet, here is the code:
[StructLayout(LayoutKind.Sequential)]
public struct MyDateTime
{
public ushort Year;
public ushort Month;
public ushort wDayOfWeek;
public ushort Day;
public ushort Hour;
public ushort Minute;
public ushort Second;
public ushort Milisecond;
}
[DllImport("kernel32.dll", EntryPoint = "SetSystemTime", SetLastError = true)]
private static extern bool SetSystemTime(ref MyDateTime st);
[DllImport("kernel32.dll", EntryPoint = "GetSystemTime", SetLastError = true)]
private extern static void GetSystemTime(ref MyDateTime sysTime);
MyDateTime Persian;
.
.
.
GetSystemTime(ref Persian);
Persian.Hour = (ushort) hour.Value;
Persian.Minute = (ushort) minute.Value;
Persian.Second = (ushort) second.Value;
SetSystemTime(ref Persian );
thank you everybody
|
|
|
|
|
I don't know the structure the winapi uses for this, but I suppose I would look for clues by seeing how the method to *get* system time works. Or just double-check the structure. It immediately seems odd to me that it would use shorts for day of week, day, hour, minute, and second, all of which logically require just a byte, but I have almost no experience with system level programming so it may well be that I simply don't know what I'm talking about!
|
|
|
|
|
Hm... according to this it would appear the structure is even less compact and uses four bytes (on a 32-bit platform) for each..??
Best of luck!
|
|
|
|
|
I see nothing wrong in what you are doing. Its just that, when you use SetSystemTime(), the time set is UTC - not your local time. So, in order to set your local time, then you need to calculate the difference between your local timezone and UTC (use Offset class to calculate the difference like
Offset diff = DataTime.Now - DateTime.UtcNow). Once you know the time difference, update the hours and minutes by the Offset.Hours, Offset.Minutes and you will get the correct local time set. Hope that helps!!
|
|
|
|
|
Hi guys,
Is there any way through which I can see the list of hidden files in a drive or folder with a console application?
Your help will be appreciated,
Rajdeep.NET
Edit: Are only files with .ini extension invisible? And why do they remain hidden.....Hmmmmmm....A gr8 mystery.....maybe only for me! Help me in this regard somebody!
|
|
|
|
|
By using GetAttributes method you can check it.
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
Rajdeep.NET wrote: Is there any way through which I can see the list of hidden files in a drive
Use Directory.GetFiles . It retruns all files irrespective of hidden status. After getting the file, you need to supply the path into a FileInfo class and check Attributes[^] property. If it has Hidden attribute, consider the file as hidden.
|
|
|
|
|
Hi
I'm using list view to display files and folders of a directory. I suppose to provide an option for sorting that is when i hit column header it should get sort and group which means files should be club together and folders as like XP Windows explorer sorting. For me Name,Size sorting are works fine but date sorting doesn't looks good as files and folders are shuffled together but name and size are works as expected. Please advise.
Thanks
...
|
|
|
|
|
|
Hi All,
I am sending a structure object to another machine through TCP/IP by connecting through socket,so that i have to convert this object into byte array and also viceversa...
Please help me,it is urgent.
Regards,
Lalit Narayan
|
|
|
|
|
/ Convert an object to a byte array
private byte[] ObjectToByteArray(Object obj)
{
if(obj == null)
return null;
BinaryFormatter bf = new BinaryFormatter();
MemoryStream ms = new MemoryStream();
bf.Serialize(ms, obj);
return ms.ToArray();
}
private Object ByteArrayToObject(byte[] arrBytes)
{
MemoryStream memStream = new MemoryStream();
BinaryFormatter binForm = new BinaryFormatter();
memStream.Write(arrBytes, 0, arrBytes.Length);
memStream.Seek(0, SeekOrigin.Begin);
Object obj = (Object) binForm.Deserialize(memStream);
return obj;
}
[Serializable] attribute need to be enable serialization
|
|
|
|
|
Hi
Thanks for ur reply......
When i am deserializing the object from bytes array,then i am getting error
"Unable to find assembly 'DeviceApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'."
Please give any solution for that.
Regards,
Lalit Narayan
|
|
|
|
|
Hi,
I have a listening port using socket, number of clients will connect with that port. Lot of messages like images,text,docs etc are send between the clients using the listening port. These communication will occur concurrently.
eg: a,b,c,d .... are connected to a listening port. 'A' sent a image to 'B', at that same time 'C' send an text to 'D', 'B' to 'D', 'D' to 'A'.......etc at the same point of time.
My question.
Will the listening port can manage all these correctly?
Will there be any traffic jam? or slow in communucation?
Can the listening port manage any number of clients?
What is the standard way to manage these messages?
Can i open diffrent port for diffrent type of messages?
I am using socket.Blocking = true; method.
Thankyou
YPKI
|
|
|
|
|
If you say
socket.Blocking = true
then it is more like Synchronous call, looks like you might require Asynchronous environment as you are trying to handle multiple clients.
|
|
|
|
|