|
I would suggest you to use DateTime because it will be more convanient...
|
|
|
|
|
Thanks for all the answers, I got my problem fixed by declaring date1, and date2 as DateTime and by changing the data type in the column date from datetime to smalldatetime
aPerfectTool
|
|
|
|
|
Hi, I'm wondering if it's possible to detect whether a numeric up down box's up or down button is pressed?
|
|
|
|
|
can u explain your answer a little bit more?
sAqIb
"Our scientific power has outrun our spiritual power. We have guided missiles and misguided men."
Dr. Martin Luther King Jr.
|
|
|
|
|
Try the ValueChanged event.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Ok I have an application that I want to have the user click a button and then have the program take control of the mouse.
So for instance you could click a button and then the program would move the mouse to your start menu -> programs -> applications -> notepad
I have the
[DLLImport("user32.dll", EntryPoint = "SendMessage")]
static extern IntPtr SendMessage(IntPtr hWnd, unit Msg, UintPtr wParam, IntPtr lParam);
but I don't know if i'm forming my message correctly or even if this is the way to go
i'm trying lines of code such as:
WM_LBUTTONDOWN is 0x0201 by the way
SendMessage(0, 0x0201, new UintPtr(0x0201), new IntPtr(5 * 0x10000 + 5));
This should cause the restore/minimize/close window to pop up in the top left corner of the screen, if
1.) the IntPtr hWnd can be set to 0, I was kinda hoping this would make the message global
2.) I didn't screw up anything else, the Msg and wParam seem wrong to me...
the crazieness with the lParam is because it's two 16 bit variables in one, the first is the Y value the second is the X value.
i've also tried the form's handle with the x,y cords set to "this.Location.X + 7, this.Location.X + 7" so that I could hit my program's own menu.... help?
-Ian McCloy
|
|
|
|
|
Hi all,
I need some help from you about the idea that I want to implement it.
I need to do some sort of looping, this looping will go like day by day
once it reach the final day which set from the start it will stop.
The range of days will be determined by the user by using two dateTimePickers.
And by the beginning of range I want ot go inside the loop like check somthing
and go to the next day ... and so on.
Thanks in advance.
|
|
|
|
|
So you want two calendar controls and a timer ? What is your question ?
|
|
|
|
|
hi
i want to pass my parameters to CrystalReports in VC# 2005,but how to do?
please give me an tested example for this topic.
very thanks
|
|
|
|
|
Hello Again,
I have been succsseful in get my previous error working thanks to you you all.
Now I have another query that is baffling me.
I have the pop up window coming up now, so what I need is the window to be centered.
I need two variables that I have in Javascript to be added to the script that loads the windw to centre the window.
This is Java script - not sure how to incorporate into C#.
var left_var = (window.screen.width-1000)/2;
var top_var = (window.screen.height-700)/2;
This is then added to the window.open() as an argument.
window.open(left='+left_var+', top='+top_var)
I just need the left_var and top_var varibles in C#
Thanks in advance.
|
|
|
|
|
If you want to popup a window in center screen,C# allows it right at the begining.You can set the property of the form "StartPosition" as ScreenCenter.
If You want to use the code try to get the cordinates of the parent form and give corresponding cordinates to the child form
My small attempt...
|
|
|
|
|
Hello Every one,
I am tryin to write a pop up report for a call logging web site, I have gotten to the stage where I cannot get the code I have written to work, no complie errors just no output.
The code I am using is below.
protected void open_popup_click(object sender, EventArgs e)
{
string Call = Request.QueryString["Call"];
string popurl = "http://localhost/CrystalReportsWebSite/Popup_report.aspx?call=" + Call;
string popupScript = "window.open('" + popurl + "', 'CustomPopUp', 'width=1000, height=700, menubar=yes, resizable=no')";
Page.RegisterStartupScript("PopupScript", popupScript);
}
This is associated to a button on a ASPX page, as I mentioned before the code runs but no output is produced.
|
|
|
|
|
window.open('" + popurl + "', 'CustomPopUp', 'width=1000, height=700, menubar=yes, resizable=no')
one bug is it does not have a semi-colon after window.open('');
|
|
|
|
|
Thank you!
All fixed now
|
|
|
|
|
indianet wrote: one bug is it does not have a semi-colon after window.open('');
That is not a bug. In Javascript semicolons are used to separate the statements, not end them. As there is only one statement, there is no need for anything to separate... ehm... it.
---
b { font-weight: normal; }
|
|
|
|
|
Do you have a server form on the page, where the method can add the script?
---
b { font-weight: normal; }
|
|
|
|
|
For some reason the Environment.GetEnvironmentVariable("PATH") isn't reflecting the changes I've made in the control panel. If I restart, they return correctly. For example, if I add c:\testpath to my environment variables in window xp control panel, and then write a sample c# app to show the path (Console.WriteLine(Environment.GetEnvironmentVariable("PATH"));), the c:\testpath doesn't show up. anybody know how to fix this or if there is a way to update my environment variables?
|
|
|
|
|
First processes environment variables are derived from its parent process. Second, once the environment variables are changed outside the application it will not effect running processes.
If you change an environment variables while your application is running you won’t see it.
If you change an environment variables while the parent process of your application is running you won’t see the change when your application runs.
The later applies when you run your application in debug mode from the Visual Studio. If you run your application from the explorer (double click on it) it will get the correct environment variable.
I know that when an environment variable is changed, Windows send a broadcast Windows’ message that it happened.
Ami
|
|
|
|
|
Ami,
Thanks, that makes a lot of sense. The problem I was having is that my application stays open the entire time and won't register the new path until it's restarted. Is there any way to programatically update the enviornment variables?
|
|
|
|
|
If you have WinForm application you can override the WndProc method:
public class Form1 : Form
{
private const int WM_SETTINGCHANGE = 0x001A;
public Form1()
{
InitializeComponent();
}
protected override void WndProc(ref Message m)
{
if (WM_SETTINGCHANGE == m.Msg)
{
if (m.LParam != IntPtr.Zero)
{
string whatChanged = System.Runtime.InteropServices.Marshal.PtrToStringAuto(m.LParam);
if (null != whatChanged && "Environment" == whatChanged)
{
MessageBox.Show("Environment variable changed");
}
}
}
base.WndProc(ref m);
}
}
Ami
|
|
|
|
|
How to take a screen shot in C# and save it into some folder ??
|
|
|
|
|
|
I got this somewhere:
Rectangle rec = Screen.PrimaryScreen.Bounds;
Bitmap screenCap = new Bitmap(rec.Width, rec.Height, PixelFormat.Format64bppArgb);
Graphics myScreen = Graphics.FromImage(screenCap);
myScreen.CopyFromScreen(rec.X, rec.Y, 0, 0, rec.Size, CopyPixelOperation.SourceCopy);
screenCap.Save("D:\\Temp\\MyScreen.Jpeg", ImageFormat.Jpeg);
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
How to get the list of shared folders for a system with a particular IP address over a local area network.
Thanks.
Amit Dey
|
|
|
|
|